This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

Re: deprecated GNU ## extension used


Ulrich Drepper wrote:-

> And your point is?

Oh Ulrich, please.  My point was that what you appeared to be claiming
to be not possible within the bounds of the standard in fact is
possible.  I quote one of your mails:-

> Zack, Neil, you have to remove this.  How else will you write
> something like the `eprintf' macro from the manual?

I agree with you that the alternative it not as convenient; my point
was that it does exist.

> The ## operator only has to have a special meaning
> when preceded by a comma.  This is not the case in your example so
> where is the problem?

You seem to agree with me that previous behaviour was too loose.  What
you state above is not the documented behaviour of previous
preprocessors.

I propose a compromise.  How about:-

i) The effect of pasting a comma and the placemarker token of a
variable argument is a placemarker token.

ii) The effect of pasting a comma and any other token from a variable argument
is the two separate tokens.

iii) For i) and ii) we only warn under -pedantic, otherwise we warn
normally.

I'm not sure whether the above should only apply to GNU rest args, or
to ... arguments as well.

This would seem to satisfy the vast majority (95%) of current use, and
not cause standards problems (under "pasting of two tokens that does
not form a token is undefined" I guess).

If Zack has no objections, I'll submit a patch for this.  Zack?

Neil.

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