This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bug in traditional cpp in gcc 3.3.2 ?
- From: Andreas Schwab <schwab at suse dot de>
- To: espie at nerim dot net
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 25 Nov 2003 14:27:50 +0100
- Subject: Re: Bug in traditional cpp in gcc 3.3.2 ?
- References: <20031125125336.GA3717@tetto.gentiane.org>
Marc Espie <espie@nerim.net> writes:
> The following fragment is giving me errors I don't understand.
>
> b.c
> #ifdef HAVE_PROTOTYPES
> # include <stdarg.h>
> # define SH_VA_START(va, argn) va_start(va, argn)
> #else
> # include <varargs.h>
> # define SH_VA_START(va, argn) va_start(va)
> #endif /* HAVE_PROTOTYPES */
An even simpler test case:
#define a(b,c)
#if 0
#define b(x,y) a(x)
#endif
cpp.c:3: macro "a" requires 2 arguments, but only 1 given
Interestingly, changing #if 0 to #if 1 removes the error.
> Is there something I'm not getting, or is this a genuine bug.
The latter.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."