This is the mail archive of the gcc@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]

Re: varargs macros and ##


On Wed, May 17, 2000 at 11:46:34AM -0700, Bruce Korb wrote:
> Zack Weinberg wrote:
> > #    It might be better to discard the last preprocessor token instead
> > # of the last preceding sequence of non-whitespace characters; in
> > # fact, we may someday change this feature to do so.  We advise you...
> > 
> > ....  Now, it happens that I
> > am reimplementing macro expansion, and it will be much easier for the
> > reimplementation to discard the last preprocessor token.  It's my
> > opinion that it is definitely better to do so; the behavior is less
> > surprising to the user, and much more likely to be what they wanted.
> > 
> > Does anyone object to my changing this behavior?
> 
> Do it.  If it ever gets into a C spec someday, it will certainly
> be this behavior, and not the non-whitespace-gobbling behavior!

C99 has varargs macros, but they're somewhat more limited, and there
is no special treatment of ## before the rest argument.  I agree that
the 'delete previous token' semantic is much more likely to be
standardized.

zw

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