GNOME Bugzilla – Bug 619560
unnamed enum generates an anonymous enum in PDF
Last modified: 2011-10-25 22:53:44 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.
Created attachment 191500 [details] Anonymous enum issue
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.
OK, how about download_device_types for the enum name and the document title would be Download Device Types.
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?
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.
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