GNOME Bugzilla – Bug 637610
Fortran: issues with interfaces
Last modified: 2011-11-01 11:09:09 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.
Created attachment 176720 [details] [review] proposed patch
*** Bug 636949 has been marked as a duplicate of this bug. ***
Hi Daniel, I think you attached the wrong file for the patch. Please have a look.
Created attachment 176721 [details] [review] proposed patch, 2nd try
Thanks. I'll include the patch in the next subversion update.
(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
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.
As far as I can see this bug is fixed, I cannot set it to verified though.