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 731985 - Variadic macros failing to expand if trailing ... is empty
Variadic macros failing to expand if trailing ... is empty
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.6
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2014-06-20 19:46 UTC by rorzik
Modified: 2014-08-21 17:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description rorzik 2014-06-20 19:46:36 UTC
With MACRO_EXPANSION=yes, in the following simplified example, the entries for VAR_MACRO1 expand, while the first entry for VAR_MACRO2 does not.  The C++ preprocessor considers all of them correct syntax, so the expected result is that each macro would expand.  (Thanks for taking a look.)

/// \file simpletest.h

#define VAR_MACRO1(...) void DemoFunction1(__VA_ARGS__) { }

VAR_MACRO1();
VAR_MACRO1(int x);
VAR_MACRO1(int x, float y);

#define VAR_MACRO2(T, ...) T DemoFunction2(__VA_ARGS__) { }

VAR_MACRO2(void);
VAR_MACRO2(void, int x);
VAR_MACRO2(void, int x, float y);

////////////////////

The documentation generated looks like:

void 	DemoFunction1 ()
void 	DemoFunction1 (int x)
void 	DemoFunction1 (int x, float y)
 	VAR_MACRO2 (void)
void 	DemoFunction2 (int x)
void 	DemoFunction2 (int x, float y)
Comment 1 Dimitri van Heesch 2014-06-24 19:10:34 UTC
Confirmed. Should be fixed in the next GIT update.
Comment 2 Dimitri van Heesch 2014-08-21 17:15:31 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.8. 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 (preferrably in the form of a self-contained example).