preprocessor/9764: Varargs macro extension incorrectly expands if the varargs argument is the macro itself
Neil Booth
neil@daikokuya.co.uk
Thu Feb 20 06:49:00 GMT 2003
Ryan Mallon wrote:-
> #define func(a, varargs...) _func(a, ##varargs)
>
> The problems occurs when the macro name itself is used in the varargs
> part: e.g
>
> func(a, func(b, c));
>
> Incorrectly expands to:
>
> _func(a, func(b, c));
>
> Without the token paste opperator in the defintion it works as expected,
> but then I cannot have varargs=0. Im working with a large amount of
> existing code, so I cannot alter the actual calls on the macro definition.
What makes you think it's incorrect?
Neil.
More information about the Gcc-bugs
mailing list