GNOME Bugzilla – Bug 703112
Backward documentation comments are not allowed in Fortran type-bound procedures
Last modified: 2013-08-23 15:04:44 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
Thanks, I'll include the patch in the next GIT update.
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.