--- Comment #5 from sabre at nondot dot org 2009-04-27 01:31 ---
Sorry I can't give a more detailed analysis of what is going on, I have no idea
how the placemarker system works in gcc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35010
--- Comment #4 from sabre at nondot dot org 2009-04-27 01:31 ---
If the definition is:
#define debug(format, ...) format,## __VA_ARGS__)
Then we should still get:
Z, );
W, );
If the definition is:
#define debug(format,...) format,##__VA_ARGS__)
Then we should get:
Z,);
W,);
(and gcc cu
--- Comment #3 from b07584 at freescale dot com 2009-04-08 17:46 ---
(In reply to comment #0)
> This testcase:
>
> #define debug(format, ...) format, ## __VA_ARGS__)
> debug(X);
> debug(Y, 1, 2);
> debug(Y, 1, 2 );
> debug(Z, );
> debug(W,);
>
> Should preprocess to:
>
> X);
> Y, 1, 2
--- Comment #2 from neil at gcc dot gnu dot org 2008-05-15 02:56 ---
Never mind, I see your point. The comma isn't being eaten, right.
--
neil at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #1 from neil at gcc dot gnu dot org 2008-05-15 02:54 ---
Chris - unless I'm missing something I disagree. The
, ## __VA_ARGS__
token sequence is being eaten in its entirety by the empty argument. Then
between "format" and the ')' on the #define line, which is the ')' tha