This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Possible variadic macro bug
- From: seebs at plethora dot net (Peter Seebach)
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Neil Booth <neil at daikokuya dot demon dot co dot uk>, gcc-bugs at gcc dot gnu dot org
- Date: Wed, 14 Nov 2001 12:44:28 -0600
- Subject: Re: Possible variadic macro bug
- Reply-to: seebs at plethora dot net (Peter Seebach)
[Get raw message]
In message <20011114103631.A25636@codesourcery.com>, Zack Weinberg writes:
>On Tue, Nov 13, 2001 at 10:21:47PM +0000, Neil Booth wrote:
>> I agree with Clive Feather's point that the use of ## is ugly because
>> it gives 2 meanings to ##; I said as much over a year ago when this
>> was discussed. So I'm in favour of a clean replacement. I didn't
>> like any of his three suggestions at all, though.
>Do you have a reference to what he said?
Well, he had an interesting point:
# , ## __VA_ARGS__
Does this mean
",__VA_ARGS__"
?
>",##" is known to work in a lot of production code and is therefore
>the safer move - but it is indeed ugly. I don't think it is
>particularly _confusing_, though; commas can't be token-pasted with
>anything, so the notation is unambiguous.
Clive pointed out correctly that it can inside a #.
-s