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]
Other format: [Raw text]

Bug in traditional cpp in gcc 3.3.2 ?


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.


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