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


   Date: Wed, 12 Jul 2000 07:22:12 +0900
   From: Neil Booth <NeilB@earthling.net>

   firstly this use of ## has nothing to do with token pasting,

True, but inelegance is not enough justification to break
longstanding, documented behavior.

   and secondly that it breaks real standards-conforming code,

No it doesn't.  The GNU C extension uses a different syntax, e.g.:

#define debug(format, args...) printf(format ,## args)

Supporting this GNU extension cannot possibly break
standard-conforming code, since the "args..." part of the GNU C syntax
violates a C99 constraint.  Perhaps the current preprocessor code
doesn't work correctly here, but it shouldn't be hard to fix.


Please fix this.  GCC should not warn about the use of GNU extensions
unless the user requests this with the -pedantic option.  This is
longstanding GCC tradition, and for good reason; please don't change it.

In case you didn't know, the C standardization committee did not look
at GCC when it designed __VARARGS__.  They couldn't be bothered to
read GCC's documentation, and by the time I found out about their
__VARARGS__ spec, it was too late to change it.  This may help to
explain why the committee specified a varargs macro syntax that in
some ways is inferior to GNU C's syntax.  But the committee's mistake
does not justify dumbing down GCC.

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