This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
macro __VAR_ARGS_ bug??
- From: Reza Roboubi <reza at linisoft dot com>
- To: gcc_bugs <gcc-bugs at gcc dot gnu dot org>
- Date: Sat, 03 Aug 2002 17:45:58 -0700
- Subject: macro __VAR_ARGS_ bug??
- Organization: Linisoft
Hi guys,
According to these documents:
http://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html
http://gcc.gnu.org/gcc-3.1/c99status.html
it seems fairly clear that the following command
>> gcc test.c -Wall -E
when test.c is as follows:
#define eprintf(format , ...) fprintf (stderr, format , ## __VA_ARGS__)
eprintf ("success!\n",)
should NOT produce the following output:
fprintf (stderr, "success!\n")
but that there should be an extra comma in the output, like this:
fprintf (stderr, "success!\n",)
I am using gcc 3.1 and I'm getting the incorrect output. Am I doing
something wrong or is this a bug?