comparison gcc/testsuite/gcc.dg/cpp/trad/argcount.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
5 5
6 #define f(x) x 6 #define f(x) x
7 #define g(x, y) x y 7 #define g(x, y) x y
8 #define h() 8 #define h()
9 9
10 f(); /* { dg-bogus "requires 1" "no arg is 1 empty arg" } */ 10 f(); /* { dg-bogus "-:requires 1" "no arg is 1 empty arg" } */
11 f( ); /* { dg-bogus "macro" "1 arg to 1 param macro" } */ 11 f( ); /* { dg-bogus "-:macro" "1 arg to 1 param macro" } */
12 f(1,); /* { dg-error "passed 2" "2 args to 1 param macro" } */ 12 f(1,); /* { dg-error "-:passed 2" "2 args to 1 param macro" } */
13 f(1,2); /* { dg-error "passed 2" "2 args to 1 param macro" } */ 13 f(1,2); /* { dg-error "-:passed 2" "2 args to 1 param macro" } */
14 h(); /* { dg-bogus "macro" "no arg to 1 param macro" } */ 14 h(); /* { dg-bogus "-:macro" "no arg to 1 param macro" } */
15 h( ); /* { dg-error "passed 1" "1 arg to 0 param macro" } */ 15 h( ); /* { dg-error "-:passed 1" "1 arg to 0 param macro" } */
16 h(1,2); /* { dg-error "passed 2" "2 args to 0 param macro" } */ 16 h(1,2); /* { dg-error "-:passed 2" "2 args to 0 param macro" } */
17 g(); /* { dg-error "requires 2" "0 args to 2 param macro" } */ 17 g(); /* { dg-error "-:requires 2" "0 args to 2 param macro" } */
18 g( ); /* { dg-error "requires 2" "1 args to 2 param macro" } */ 18 g( ); /* { dg-error "-:requires 2" "1 args to 2 param macro" } */
19 g( ,2); /* { dg-bogus "requires 2" "2 args to 2 param macro" } */ 19 g( ,2); /* { dg-bogus "-:requires 2" "2 args to 2 param macro" } */
20 g(,); /* { dg-bogus "requires 2" "2 args to 2 param macro" } */ 20 g(,); /* { dg-bogus "-:requires 2" "2 args to 2 param macro" } */
21 g(1,2,3); /* { dg-error "passed 3" "3 args to 2 param macro" } */ 21 g(1,2,3); /* { dg-error "-:passed 3" "3 args to 2 param macro" } */