This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Possible variadic macro bug

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]