2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / cpp / redef1.c
bloba5fe2bacc53c5305905423fcddcd82fefa901ff3
1 /* Test for redefining macros with insignificant (i.e. whitespace)
2 differences. */
4 /* { dg-do preprocess } */
6 #define foo bar
7 #define /* x */ foo /* x */ bar /* x */
9 #define quux(thud) a one and a thud and a two
10 #define /**/ quux( thud ) /**/ a one and a /**/ thud /**/ and /**/ a two
11 #define quux(thud) a one and a thud and a two /* bah */
13 /* { dg-bogus "redefined" "foo redefined" { target *-*-* } 7 } */
14 /* { dg-bogus "redefined" "quux redefined" { target *-*-* } 10 } */
15 /* { dg-bogus "redefined" "quux redefined" { target *-*-* } 11 } */
17 /* { dg-bogus "previous def" "foo prev def" { target *-*-* } 6 } */
18 /* { dg-bogus "previous def" "quux prev def" { target *-*-* } 9 } */
19 /* { dg-bogus "previous def" "quux prev def" { target *-*-* } 10 } */