This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: macros with traditional cpp
- To: Philip Blundell <philb at gnu dot org>
- Subject: Re: macros with traditional cpp
- From: Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>
- Date: Sun, 24 Sep 2000 22:57:10 +0200
- Cc: gcc at gcc dot gnu dot org
- References: <E13dHl8-0005rl-00@kings-cross.london.uk.eu.org>
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