macro __VAR_ARGS_ bug??

Neil Booth neil@daikokuya.co.uk
Mon Aug 5 12:48:00 GMT 2002


Neil Booth wrote:-

> You're right - pasting with a placemarker is valid (even if the other
> token is a comma) and gives the other token.  There is only one
> correct answer, and it is what Zack originally documented.  I'll post
> a fix soon; it should appear in 3.2.1 (not in 3.2).

Bah, humbug.  We've had at least one bug report in the past about this
case, using production code, that expects the comma to be swallowed.

See gcc.dg/cpp/macro8.c and vararg2.c.  These both fail if I change
the code to have the correct semantics.

So I'm unsure what to do: break existing code that is strictly not C99
compliant, or be C99 compliant on a corner case that clearly no-one
cares about or we'd have heard about it by now.

I'd appreciate your advice, Zack.

Neil.



More information about the Gcc-bugs mailing list