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: glibc 2.1.1pre2 breaks libstdc++-v3 build


On Fri, Jan 12, 2001 at 06:12:53PM +0000, Neil Booth wrote:
> Joseph S. Myers wrote:-
> 
> > I'll also suggest that warnings about what ISO C99 requires make sense
> > only for C99-style variadic macros, not for GNU-style ones with named rest
> > arguments.
> 
> OK, that's fair enough I think.

Careful.  I want named rest arguments to be completely orthogonal to
all other extensions to varargs macros.  This is because named rest
arguments have a good chance of being accepted for standardization,
but the others don't.

So the behavior of

#define printf(format, args...)  fprintf(stdout, format, ##args)

should be _identical_ to

#define printf(format, ...)  fprintf(stdout, format, ##__VA_ARGS__)

and IMO that includes the warnings it generates.

[Glibc should be doing

#define printf(args...) fprintf(stdout, args...)

which will DTRT with all versions of GCC that support varargs macros
at all.]

zw

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