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: macros with traditional cpp


Philip Blundell wrote:
> The preprocessor used to accept code like this both with and without 
> -traditional:
> 
> 	#define foo(x...) x
> 	foo(one,two)
> 
> Now, -traditional causes an error like:
> 
> t.c:1: badly punctuated parameter list in #define
> 
> Is this intentional?

Ah yes, that is one form of a varargs bug I've been meaning to report.
I've got macros which work fine with GCC 2.95, but don't work with _or_
without -traditional now.  (Sorry, I'll try to provide an example
tomorrow).

It's a bummer -- I have to use an older preprocessor because I've a file
full of those kinds of macros and I can't think of a way to rewrite them
to work with the current preprocessor, or with C99 varargs.

I do hope the old behaviour is restored, and furthermore, the GNU
extension form isn't deprecated.  I simply can't think of a way to write
many of my varargs macros in C99 syntax.

-- Jamie

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