Varargs macros subtly broken
Jamie Lokier
egcs@tantalophile.demon.co.uk
Tue Sep 26 10:24:00 GMT 2000
Neil Booth wrote:
> > For other tokens, perhaps C99 requires that the token preceding
> > ##__VA_ARGS__ is not deleted, if it is possible to paste them?
>
> C99 has no concept of token deletion like this at all. It's purely an
> extension.
Precisely the reason we why should not, in general, delete tokens.
However deleting the comma may be permitted by the standard precisely
because you can't paste a comma with another token anyway. Hmm.
I wonder what happens to argument prescan of __VA_ARGS__ in the presence
of ##.
-- Jamie
More information about the Gcc
mailing list