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 686581 - Fortran: quote in normal comment breaks Doxygen output
Fortran: quote in normal comment breaks Doxygen output
Status: VERIFIED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.2-SVN
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2012-10-21 16:29 UTC by albert
Modified: 2013-01-20 17:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Source and Doxifile file showing the problem (22.09 KB, application/octet-stream)
2012-10-21 16:29 UTC, albert
  Details
PATCH: handle single quotes in normal Fortran comment (5.43 KB, patch)
2013-01-09 19:36 UTC, albert
none Details | Review

Description albert 2012-10-21 16:29:12 UTC
Created attachment 226931 [details]
Source and Doxifile file showing the problem

When we have a '(single quote) or " (double quote) in a normal Fortran comment (odd number of quotes), the Doxygen comment convert parser is broken.
When we have the source code (aa.f):
!  A normal comment line with a ' (single quote) in it.

!> just a comment
!> \MY_ALIAS
         SUBROUTINE TST
         END

And the alias MY_ALIAS defined as MY_ALIAS=some text one would expect the text
"just a comment some text" in the output, but just the text "just a comment" is shown and the error messages in the console output (twice): aa.f:4: warning: Found unknown command `\MY_ALIAS'

Some investigation lead to the statement:
<Scan>[^"'!\/\n\\#\\-]*           { /* eat anything that is not " / or \n */
in commentcnv.l on line 264, here all characters are skipped till a quote (start of a string) in case of a non-comment line, but the normal Fortran comments are not recognized properly, only Doxygen Fortran comments are recognized.

In Fortran there is of course the problem that we have the ! comments, but in the fixed format also th C,c,*,! in column 1 (and excluding the ! in columns 6 as continuation character, but this is quite rare that this is used and error prone so we can forget this one in my opinion)
Comment 1 Dimitri van Heesch 2012-11-18 11:06:54 UTC
Changed version 'latest' to '1.8.2-SVN' so I can remove 'latest' as an option as it is a moving target.
Comment 2 albert 2013-01-09 19:36:08 UTC
Created attachment 233099 [details] [review]
PATCH: handle single quotes in normal Fortran comment

Comment handling for Fortran (fixed and free formatted) has been improved so that when there is a single quote (' or ") in normal comment this is not breaking the handling of aliases etc.
Comment 3 Dimitri van Heesch 2013-01-15 20:19:39 UTC
Confirmed. Should be fixed in the next subversion update.
Comment 4 Dimitri van Heesch 2013-01-20 13:34:55 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.3.1. 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 5 albert 2013-01-20 17:00:15 UTC
Code is integrated and works as expected.
Comment 6 albert 2013-01-20 17:06:39 UTC
Forgot to set it to verified.