[OFFTOPIC] gcc and macros var args in rh7



Hello!

I've found some weird things in Red Hat Linux 7.0 and its gcc
(gcc-2.96-69).

The following simple program shows a warning:


$ cat a.c
#define aaa(args...) ccc(## args)
int main (void) { return 0; }
$ gcc a.c
a.c:1:25: warning: nothing can be pasted after this token
$


But, if there's a named argument in the macro, there's no warning:


$ cat a.c
#define aaa(x, args...) ccc(x, ## args)
int main (void) { return 0; }
$ gcc a.c
$


How could I disable the warning? (I like to use -Werror, it help me to
write less buggy code).


	Saludos!
	Greetings!

-- 
Name:  Arturo Tena
email: arturo directmail org
ICQ:   63292893





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]