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 label before end statement (Origin: bugzilla #626476) #3895

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

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status VERIFIED severity normal in component general for ---
Reported in version 1.7.1 on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2010-08-09 19:46:58 +0000, albert wrote:

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

On 2010-11-07 19:56:19 +0000, albert wrote:

Created attachment 174018
Allow label before end statement

Allow label before end statement of a program unit.

On 2010-11-08 20:48:02 +0000, Dimitri van Heesch wrote:

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.

On 2010-11-08 20:51:30 +0000, albert wrote:

Created attachment 174099
Allow label before end statement

Oops was indeed the script to generate the patch. I hope this attachment is better.

On 2010-11-08 21:15:17 +0000, Dimitri van Heesch wrote:

Review of attachment 174099:

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

On 2010-11-08 21:36:20 +0000, albert wrote:

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.

On 2010-11-08 22:16:18 +0000, Dimitri van Heesch wrote:

If it is allowed, then doxygen should support it, so I'll include your patch as is.

On 2011-01-03 19:01:00 +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:49:44 +0000, albert wrote:

Label recognized properly

@doxygen doxygen closed this Jul 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment