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 695277 - protected statement in Fortran
protected statement in Fortran
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.3.1
Other All
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2013-03-06 10:51 UTC by dummfikk
Modified: 2013-05-19 12:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
PATCH: protected and publuic/private are not on the same level (3.91 KB, patch)
2013-03-06 18:17 UTC, albert
none Details | Review

Description dummfikk 2013-03-06 10:51:20 UTC
The protected statement in Fortran allows to set global (public) variables to be write protected.

In the following case


-----------------begin numerics.f90
 integer(pInt), dimension(2) , protected, public :: &
   numerics_integrator  =  1_pInt   !< method used for state integration
-----------------end numerics.f90

Doxygen classifies "numerics_integrator" as private and finds additional the entities "public" and "protected"

-----------------begin documentation
integer(pint), dimension(2) numerics::numerics_integrator = 1_pInt
integer(pint), dimension(2) numerics::protected
integer(pint), dimension(2) numerics::public
-----------------begin documentation

In the case of only "public" or "private" statements, I don't see any problems.

For further examples, explanation, etc. don't hesitate t contact me
Comment 1 albert 2013-03-06 17:50:02 UTC
I think in the FORTRAN scanner there is a misinterpretation of the usage of public, private and protected, they exclude each other. I see in the standard that public and private exclude each other and that protected can be used independently of this (I'll have a look this). 

In the mean time when running the above "example" I don't get the above mentioned problem, I get that numerics_integrator is only public. So please attach an example to this bug report signaling this problem problem, but I think this problem will disappear as well with the future bug fix.
Comment 2 albert 2013-03-06 18:17:30 UTC
Created attachment 238220 [details] [review]
PATCH: protected and publuic/private are not on the same level

The keyword protected is independent of public/private, in the past these 3 keywords were mutual exclusive, now protected is possible with public/private
Comment 3 dummfikk 2013-03-07 16:47:50 UTC
I checked it again, it was not working in 1.8.3 but seems to be ok in 1.8.3.1
Comment 4 albert 2013-03-07 17:57:05 UTC
In version 1.8.3.1 I saw that when public or private was used together with protected that in that case only one attribute was given. So I think the separate lines in the documentation might have gone, but the underlying problem was still present so the PATCH is still valid.
Comment 5 dummfikk 2013-03-07 21:17:12 UTC
cool, at least this report was any help to you and not just spam by me.

thanks for the fast response, I really appreciate your work.
Comment 6 Dimitri van Heesch 2013-03-31 13:16:32 UTC
Thanks, I'll include the patch in the next subversion update.
Comment 7 Dimitri van Heesch 2013-05-19 12:36:30 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.4. 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.