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 626476 - FORTRAN label before end statement
FORTRAN label before end statement
Status: VERIFIED FIXED
Product: doxygen
Classification: Other
Component: general
1.7.1
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2010-08-09 19:46 UTC by albert
Modified: 2011-11-01 11:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow label before end statement (74 bytes, patch)
2010-11-07 19:56 UTC, albert
none Details | Review
Allow label before end statement (673 bytes, patch)
2010-11-08 20:51 UTC, albert
none Details | Review

Description albert 2010-08-09 19:46:58 UTC
In case a label appears in front of an end statement of a subroutine (and probably also function and module) Doxygen will give an error message:

Preprocessing C:/Users/user/AppData/Local/Temp/Excite/lab1.f90...
Parsing file C:/Users/user/AppData/Local/Temp/Excite/lab1.f90...
********************************************************************
Error in file C:/Users/user/AppData/Local/Temp/Excite/lab1.f90 line: 5, state: 4

********************************************************************

This occurs for fixed formatted code and for free formatted code.

Source code:
!
Subroutine tst()
9999  end
Comment 1 albert 2010-11-07 19:56:19 UTC
Created attachment 174018 [details] [review]
Allow label before end statement

Allow label before end statement of a program unit.
Comment 2 Dimitri van Heesch 2010-11-08 20:48:02 UTC
Hi Albert,

Something seems to have gone wrong with this patch. The attachment only contains the command to make the patch not the patch itself.
Comment 3 albert 2010-11-08 20:51:30 UTC
Created attachment 174099 [details] [review]
Allow label before end statement

Oops was indeed the script to generate the patch. I hope this attachment is better.
Comment 4 Dimitri van Heesch 2010-11-08 21:15:17 UTC
Review of attachment 174099 [details] [review]:

wouldn't it be better to do

^{BS}([0-9]*{BS_})?"end"...

i.e. should a number always be following by a blank, or is it also valid Fortran to write

10end
Comment 5 albert 2010-11-08 21:36:20 UTC
Just tried it with a compiler but 10end is accepted in free formatted code by this compiler. In the standard I could not find anything further, but I did find that the label can contain a maximum of 5 digits and that at the label 00000 is not allowed.

I think the code should be compilable, so Doxygen does not have to bother with the fact if the code is valid or not. The rules in Doxygen can be a bit less stringent.

Personally I would never write 10end in a program, but always use a space in between.
Comment 6 Dimitri van Heesch 2010-11-08 22:16:18 UTC
If it is allowed, then doxygen should support it, so I'll include your patch as is.
Comment 7 Dimitri van Heesch 2011-01-03 19:01:00 UTC
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.
Comment 8 albert 2011-11-01 11:49:44 UTC
Label recognized properly