After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 637610 - Fortran: issues with interfaces
Fortran: issues with interfaces
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.7.2-SVN
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
: 636949 (view as bug list)
Depends on:
Blocks: 521867 636946
 
 
Reported: 2010-12-19 21:27 UTC by Daniel Franke
Modified: 2011-11-01 11:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (2.23 KB, patch)
2010-12-19 21:28 UTC, Daniel Franke
none Details | Review
proposed patch, 2nd try (12.34 KB, patch)
2010-12-19 21:49 UTC, Daniel Franke
none Details | Review

Description Daniel Franke 2010-12-19 21:27:41 UTC
In Fortran there are three types of INTERFACEs, specific, generic and abstract INTERFACEs. As of r749, doxygen only handles generic interfaces somewhat reasonably, misinterprets specific interfaces and doesn't know about abstract interfaces.

Examples:
 * specific interfaces are listed in an INTERFACE block without a (generic)
   name after INTERFACE; multiple interfaces may be listed in one INTERFACE 
   block. This example, should result in two INTERFACE entries in documentation:

     INTERFACE
       FUNCTION f(x)
         REAL :: f, x
       END FUNCTION
       FUNCTION g(x, y)
         REAL :: g, x, y
       END FUNCTION
     END INTERFACE

 * generic INTERFACEs have a generic name, all INTERFACEs should be listed
   under this name in documentation. Example:

     INTERFACE f
       FUNCTION f4(x)
         REAL(4) :: f4, x
       END FUNCTION
       FUNCTION f8(x)
         REAL(8) :: g, x
       END FUNCTION
     END INTERFACE f

 * like specific interfaces, ABSTRACT interfaces do not have a generic name
   and multiple interfaces may be listed in one interface block. This example,
   should again result in two INTERFACE entries in documentation:

     ABSTRACT INTERFACE
       FUNCTION f(x)
         REAL :: f, x
       END FUNCTION
       SUBROUTINE s
       END SUBROUTINE
     END INTERFACE


Attached patch handles all INTERFACE types. However, a disambiguation of INTERFACEs, e.g. in a listing of a MODULE would be useful, i.e. instead of prefixing INTERFACE to any interface, it would be nice to have "ABSTRACT INTERFACE" and "GENERIC INTERFACE" and use "INTERFACE" for specific interfaces only.

The patch also fixes #521867.
Comment 1 Daniel Franke 2010-12-19 21:28:30 UTC
Created attachment 176720 [details] [review]
proposed patch
Comment 2 Daniel Franke 2010-12-19 21:29:35 UTC
*** Bug 636949 has been marked as a duplicate of this bug. ***
Comment 3 Dimitri van Heesch 2010-12-19 21:41:13 UTC
Hi Daniel,

I think you attached the wrong file for the patch. Please have a look.
Comment 4 Daniel Franke 2010-12-19 21:49:21 UTC
Created attachment 176721 [details] [review]
proposed patch, 2nd try
Comment 5 Dimitri van Heesch 2010-12-19 21:54:54 UTC
Thanks. I'll include the patch in the next subversion update.
Comment 6 Daniel Franke 2010-12-25 18:13:56 UTC
(In reply to comment #5)
> Thanks. I'll include the patch in the next subversion update.

Please include this in the next update, I forgot about operators with arguments, e.g. "INTERFACE OPERATOR(+)"

Thanks.


Index: src/fortranscanner.l
===================================================================
--- src/fortranscanner.l        (revision 751)
+++ src/fortranscanner.l        (working copy)
@@ -424,7 +428,7 @@
                                           // interface body is a scope of its own
                                         }
 
-^{BS}interface{BS_}{ID}                 { ifType = IF_GENERIC;
+^{BS}interface{BS_}{ID}{ARGS}?          { ifType = IF_GENERIC;
                                           yy_push_state(InterfaceBody);
 
                                           // extract generic name
Comment 7 Dimitri van Heesch 2011-01-03 19:01:02 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.3. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.
Comment 8 albert 2011-11-01 11:09:09 UTC
As far as I can see this bug is fixed, I cannot set it to verified though.