2018-01-24 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / cpp / c90-empty-macro-args.c
blobe90f8e6cb69c1e817187caef3957c51c6751a8aa
1 /* { dg-do compile } */
2 /* { dg-options "-std=c89 -pedantic" } */
4 #define f(a,b) f2(a,,b)
5 #define f2(a,b,c) a; b; c;
6 #define f3(a) a
8 #define g() p()
10 void p(void) {}
13 void foo(void)
15 f(p(),p()); /* { dg-warning "macro f2 argument 2: empty macro arguments are undefined" } */
16 f2(p(),,p()); /* { dg-warning "macro f2 argument 2: empty macro arguments are undefined" } */
17 f3(); /* { dg-warning "macro f3 argument 1: empty macro arguments are undefined" } */
18 g();