Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fortran: issues with interfaces (Origin: bugzilla #637610) #4056

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Copy link
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.7.2-SVN on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2010-12-19 21:27:41 +0000, Daniel Franke wrote:

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.

On 2010-12-19 21:28:30 +0000, Daniel Franke wrote:

Created attachment 176720
proposed patch

On 2010-12-19 21:29:35 +0000, Daniel Franke wrote:

*** Bug 636949 has been marked as a duplicate of this bug. ***

On 2010-12-19 21:41:13 +0000, Dimitri van Heesch wrote:

Hi Daniel,

I think you attached the wrong file for the patch. Please have a look.

On 2010-12-19 21:49:21 +0000, Daniel Franke wrote:

Created attachment 176721
proposed patch, 2nd try

On 2010-12-19 21:54:54 +0000, Dimitri van Heesch wrote:

Thanks. I'll include the patch in the next subversion update.

On 2010-12-25 18:13:56 +0000, Daniel Franke wrote:

(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

On 2011-01-03 19:01:02 +0000, Dimitri van Heesch wrote:

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.

On 2011-11-01 11:09:09 +0000, albert wrote:

As far as I can see this bug is fixed, I cannot set it to verified though.

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.