This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Bug in traditional cpp in gcc 3.3.2 ?
- From: Marc Espie <espie at nerim dot net>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 25 Nov 2003 13:53:36 +0100
- Subject: Bug in traditional cpp in gcc 3.3.2 ?
- Reply-to: espie at nerim dot net
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 */
cpp -traditional-cpp -DHAVE_PROTOTYPES b.c >/dev/null
b.c:6: macro "va_start" requires 2 arguments, but only 1 given
Note that line 6 is the define SH_VA_START which is NOT taken.
What business does traditional-cpp have complaining about a usage
of va_start that doesn't even exist ?
The problem vanishes in non -traditional-cpp mode...
Is there something I'm not getting, or is this a genuine bug.