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 703112 - Backward documentation comments are not allowed in Fortran type-bound procedures
Backward documentation comments are not allowed in Fortran type-bound procedures
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.4-GIT
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2013-06-26 10:58 UTC by Javier Martin
Modified: 2013-08-23 15:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add TypedefBodyContains as a valid context for "!<" recognition (642 bytes, patch)
2013-06-26 10:58 UTC, Javier Martin
none Details | Review

Description Javier Martin 2013-06-26 10:58:58 UTC
Created attachment 247811 [details] [review]
Add TypedefBodyContains as a valid context for "!<" recognition

In Fortran 2003+, type-bound procedures are specified in a CONTAINS part within the TYPE definition. Such specifications are usually single-line, because the procedure interface/definition is not given there; the PROCEDURE statement only _references_ either an actual procedure or an abstract interface (for DEFERRED = pure virtual procedures).

Currently Doxygen does not allow such specifications to be annotated with a backwards documentation comment "!<", only with forward comments "!>". Furthermore, the contents of the would-be documentation comment are actually _parsed_ by the program as source text because the recognition of comments as text to be ignored is explicitly disabled for comments followed by either ">" or "<".

The proposed patch adds the TypedefBodyContains context to the rule that triggers the recognition of backwards documentation comments. AFAIK, the existence of a CONTAINS part in a TYPE definition is in itself a feature of F2003+, so this change would not affect earlier code (F95-).


Example:

module m
  type my_t
    contains
    procedure myProc1 !< This does not work, adds fake procedures instead.
    !> But this does.
    procedure, nopass :: myProc2 => func
    procedure(abstractProc), deferred :: myProc3
  end type
  ! Definition of an ABSTRACT INTERFACE with an abstractProc procedure goes here
  contains
  ! Definitions of myProc1 and func go here
end module
Comment 1 Dimitri van Heesch 2013-07-02 14:38:10 UTC
Thanks, I'll include the patch in the next GIT update.
Comment 2 Dimitri van Heesch 2013-08-23 15:04:44 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.5. 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.