tree-optimization/115599 - reassoc qsort comparator issue
[official-gcc.git] / gcc / testsuite / gcc.dg / cpp / trad / redef1.c
blobba175698024b8f54a05f9a019b51fc88e13f955a
1 /* Test for redefining traditional macros with insignificant
2 (i.e. whitespace) differences. */
4 /* { dg-do preprocess } */
7 #define foo bar
8 #define /* x */ foo /* x */ bar /* x */
9 /* { dg-bogus "redefined" "foo redefined" { target *-*-* } .-1 } */
10 /* { dg-bogus "previous def" "foo prev def" { target *-*-* } .-3 } */
12 #define quux(thud) a one and a thud and a two /* { dg-line quux_def_1 } */
13 #define /**/ quux( thud ) /**/ a one and a /**/ thud /**/ and /**/ a two /* { dg-line quux_def_2 } */
14 /* { dg-bogus "redefined" "quux redefined" { target *-*-* } quux_def_2 } */
15 /* { dg-bogus "previous def" "quux prev def" { target *-*-* } quux_def_1 } */
17 #define quux(thud) a one and a thud and a two /* bah */ /* { dg-line quux_def_3 } */
18 /* { dg-bogus "redefined" "quux redefined" { target *-*-* } quux_def_3 } */
19 /* { dg-bogus "previous def" "quux prev def" { target *-*-* } quux_def_2 } */
21 #define f(x, y)x "x y z" y
22 #define f(x, y) x "x y z" y
23 /* { dg-bogus "redefined" "f redefined" { target *-*-* } .-1 } */
24 /* { dg-bogus "previous def" "f prev def" { target *-*-* } .-3 } */
26 #define baz() whiz bang
27 #define baz() whiz bang
28 /* { dg-bogus "redefined" "baz redefined" { target *-*-* } .-1 } */
29 /* { dg-bogus "previous def" "baz prev def" { target *-*-* } .-3 } */
31 #define g foo
32 #undef g
33 #define g
34 /* { dg-bogus "redefined" "g redefined" { target *-*-* } .-1 } */
35 /* { dg-bogus "previous def" "g prev def" { target *-*-* } .-4 } */