preprocessor/9764: Varargs macro extension incorrectly expands if the varargs argument is the macro itself
neil@gcc.gnu.org
neil@gcc.gnu.org
Wed Feb 19 23:48:00 GMT 2003
Synopsis: Varargs macro extension incorrectly expands if the varargs argument is the macro itself
State-Changed-From-To: open->closed
State-Changed-By: neil
State-Changed-When: Wed Feb 19 23:48:50 2003
State-Changed-Why:
3.1 and later give the following, which is correct. I've not checked 3.0, but I expect it's similar.
$ cat /tmp/bar.c
#define func(a, varargs...) _func(a, ##b)
func(a, func(a, b));
$ gcc -E /tmp/bar.c
# 1 "/tmp/bar.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "/tmp/bar.c"
/tmp/bar.c:3:19: pasting "," and "b" does not give a valid preprocessing token
_func(a,b);
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9764
More information about the Gcc-bugs
mailing list