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 649103 - Regression: parsing pointer to pointer missing one '*'
Regression: parsing pointer to pointer missing one '*'
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.7.4-SVN
Other All
: Normal major
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2011-05-01 18:10 UTC by Albrecht Schlosser
Modified: 2011-08-23 13:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to revert regression in parser. (610 bytes, application/octet-stream)
2011-05-01 18:10 UTC, Albrecht Schlosser
Details

Description Albrecht Schlosser 2011-05-01 18:10:26 UTC
Created attachment 186984 [details]
Patch to revert regression in parser.

Starting with Release-1.7.1-20100728 (svn -r 738) there is a regression in parsing function return values of type pointer to pointer (or array), e.g.

int *const* test ( ) { return &array; }

In the resulting documentation (html and pdf) one asterisk ("*") is missing.
This worked well in release 1.7.1, and it is still broken in the latest version (svn -r 765).

Here is a short reproducer:
-- snip --
static int *array = 0;
/** This is wrong :-( */
int * const * test1 ( ) { return &array; }
/** This is wrong :-( */
int *const* test1a ( ) { return &array; }
/** This is wrong :-( */
int * * const test2 ( ) { return &array; }
/** This is correct. */
int **  const test3 ( ) { return &array; }
/** This is correct. */
int **  test4 ( ) { return &array; }
/** This is wrong :-( */
int * * test5 ( ) { return &array; }
-- snip --

In the resulting docs, all functions marked with "This is wrong" are missing the second "*". Only test3 and test4 are correct.

I tracked this down to one particular change in svn r 738. Please see attached patch of file src/scanner.l to revert this change and make it work again.

Please note that I don't want to say that this is a correct fix, because I don't know why this change was done in the first place, but I can clearly see that this fixes the issue above.

Thanks for all your work and your attention to this bug report.

Regards
Albrecht
Comment 1 Dimitri van Heesch 2011-05-01 18:31:29 UTC
Hi Albrecht,

Thanks for the detailed analysis. This change was made to solve bug 623023, but it obviously has unwanted side-effects as you observed. I'll implement a better solution.
Comment 2 Dimitri van Heesch 2011-08-14 14:05:19 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.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.
Comment 3 Albrecht Schlosser 2011-08-23 13:54:59 UTC
Thanks, the issue is indeed fixed.