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

unnamed enum generates an anonymous enum in PDF (Origin: bugzilla #619560) #3781

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

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.7.4-SVN on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2010-05-24 22:21:40 +0000, Lori Boyters wrote:

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.

On 2011-07-07 22:35:26 +0000, Lori Boyters wrote:

Created attachment 191500
Anonymous enum issue

On 2011-08-09 08:38:16 +0000, Dimitri van Heesch wrote:

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.

On 2011-08-09 15:49:01 +0000, Lori Boyters wrote:

OK, how about download_device_types for the enum name and the document title would be Download Device Types.

On 2011-08-09 19:52:41 +0000, Dimitri van Heesch wrote:

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?

On 2011-08-14 14:05:25 +0000, Dimitri van Heesch wrote:

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.

On 2011-10-25 22:53:44 +0000, Lori Boyters wrote:

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

@doxygen doxygen closed this Jul 2, 2018

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