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 774741 - truncating parameterized macro function attribute
truncating parameterized macro function attribute
Status: RESOLVED WONTFIX
Product: doxygen
Classification: Other
Component: general
1.8.11
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2016-11-20 06:52 UTC by Yong Bakos
Modified: 2016-11-22 20:32 UTC
See Also:
GNOME target: ---
GNOME version: 3.21/3.22


Attachments
Screenshot of generated doc showing truncation (18.02 KB, image/png)
2016-11-20 06:52 UTC, Yong Bakos
Details
Second screenshot of generated doc showing truncation (19.08 KB, image/png)
2016-11-20 06:53 UTC, Yong Bakos
Details

Description Yong Bakos 2016-11-20 06:52:49 UTC
Created attachment 340342 [details]
Screenshot of generated doc showing truncation

Given the following macro definition:

#if defined(__GNUC__) && __GNUC__ >= 4
#define WL_PRINTF(x, y) __attribute__((__format__(__printf__, x, y)))
#else
#define WL_PRINTF(x, y)
#endif
And given the following use, as a gcc function attribute:

typedef void (*wl_log_func_t)(const char *, va_list) WL_PRINTF(1, 0);
Doxygen seems to be truncating part of the function attribute, appearing like image01.png and image02.png (attached)

Doxygen also truncates it similarly in other cases where I use the macro function attribute, so the problem seems consistent (it's not about this being a (typedef). It documents the macro itself just fine.

My .doxygen config is:

PROJECT_NAME           = "Wayland"
PROJECT_NUMBER         = 1.12.90
OUTPUT_DIRECTORY       = ../../doc/doxygen
JAVADOC_AUTOBRIEF      = YES
TAB_SIZE               = 8
QUIET                  = YES
HTML_TIMESTAMP         = YES
GENERATE_LATEX         = NO
MAN_LINKS              = YES
PREDEFINED             = WL_EXPORT=
MACRO_EXPANSION        = YES
EXPAND_ONLY_PREDEF     = YES
DOT_MULTI_TARGETS      = YES
ALIASES                += comment{1}="/* \1 *<!-- -->/"
OPTIMIZE_OUTPUT_FOR_C  = YES
EXTRACT_ALL            = YES
EXTRACT_STATIC         = YES
GENERATE_HTML          = NO
GENERATE_XML           = NO
GENERATE_MAN           = NO
Comment 1 Yong Bakos 2016-11-20 06:53:15 UTC
Created attachment 340343 [details]
Second screenshot of generated doc showing truncation
Comment 2 Yong Bakos 2016-11-20 06:54:07 UTC
Also see: https://bugzilla.gnome.org/show_bug.cgi?id=773399
Comment 3 Dimitri van Heesch 2016-11-20 10:22:04 UTC
Hi Yong,

Did you already try one of the following?

1) set 
   EXPAND_ONLY_PREDEF = NO
   then doxygen will also process macro definitions like WL_PRINTF
2) set 
   PREDEFINED = WL_PRINTF(x,y)=
   then doxygen will remove the WL_PRINTF macro definition
Comment 4 Yong Bakos 2016-11-22 16:12:49 UTC
Thank you for the response. I can do what you suggest, but this only removes the entire function attribute from the documentation, rather than just fix the truncation.

Is there a way to only solve the truncation issue?
Comment 5 Dimitri van Heesch 2016-11-22 20:32:01 UTC
No, the attribute is a non standard language extension, and is not supported by doxygen.