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 619560 - (anonomous_enum) unnamed enum generates an anonymous enum in PDF
(anonomous_enum)
unnamed enum generates an anonymous enum in PDF
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.7.4-SVN
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2010-05-24 22:21 UTC by Lori Boyters
Modified: 2011-10-25 22:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Anonymous enum issue (853.05 KB, application/pdf)
2011-07-07 22:35 UTC, Lori Boyters
Details

Description Lori Boyters 2010-05-24 22:21:40 UTC
Doxygen generates in the PDF "Anonymous enum" as the paragraph title for enums without a name. Unable to add name because engineer says this will change the size of the enum. Also in the TOC, Doxygen generates weird characters at the title. So far, our only workaround is to NOT document anonymous enums.
Comment 1 Lori Boyters 2011-07-07 22:35:26 UTC
Created attachment 191500 [details]
Anonymous enum issue
Comment 2 Dimitri van Heesch 2011-08-09 08:38:16 UTC
Hi Lori,

I need to give some name to the section. If you have a better name than "anonymous enum", please let me know.

The TOC entry is indeed wrong. I'll correct that in the next release. It will also appear as "anonymous enum" in the TOC.
Comment 3 Lori Boyters 2011-08-09 15:49:01 UTC
OK, how about download_device_types for the enum name and the document title would be Download Device Types.
Comment 4 Dimitri van Heesch 2011-08-09 19:52:41 UTC
Hi Lori,

The problem with that name is that it is fine for your specific case, but not appropriate anywhere else.

I have another solution:

Why not put the following in the code:

#define DOWNLOAD_DEVICE_TYPES_ENUM
enum DOWNLOAD_DEVICE_TYPES_ENUM
{
  Val1,
  Val2
};

Because of the #define, the C compiler will parse this as an enum without name, e.g.:

enum
{
  Val1,
  Val2
};

Then you configure doxygen as follows:

ENABLE_PREPROCESSING   = YES
MACRO_EXPANSION        = YES
EXPAND_ONLY_PREDEF     = YES
PREDEFINED             = DOWNLOAD_DEVICE_TYPES_ENUM:=download_device_types

This will make doxygen ignore the #define and parse the enum as:

enum download_device_types
{
  Val1,
  Val2
};

Would this be an acceptable solution for the case where an unnamed 
enum is required?
Comment 5 Dimitri van Heesch 2011-08-14 14:05:25 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 6 Lori Boyters 2011-10-25 22:53:44 UTC
Hey Dimitri, Sorry I dropped the ball on this. I sent to MK to see what he thought of your idea and he is not for doing this. So, not sure how to resolve this. For now we are manually changing the title in the tex files.
Guess we can drop this issue for now. Thanks, Lori