| 1 |
/* Test for redefining macros with insignificant (i.e. whitespace) |
| 2 |
differences. */ |
| 3 |
|
| 4 |
/* { dg-do preprocess } */ |
| 5 |
|
| 6 |
#define foo bar |
| 7 |
#define /* x */ foo /* x */ bar /* x */ |
| 8 |
/* { dg-bogus "redefined" "foo redefined" { target *-*-* } .-1 } */ |
| 9 |
/* { dg-bogus "previous def" "foo prev def" { target *-*-* } .-3 } */ |
| 10 |
|
| 11 |
#define quux(thud) a one and a thud and a two /* { dg-line quux_def_1 } */ |
| 12 |
#define /**/ quux( thud ) /**/ a one and a /**/ thud /**/ and /**/ a two /* { dg-line quux_def_2 } */ |
| 13 |
/* { dg-bogus "redefined" "quux redefined" { target *-*-* } quux_def_2 } */ |
| 14 |
/* { dg-bogus "previous def" "quux prev def" { target *-*-* } quux_def_1 } */ |
| 15 |
|
| 16 |
#define quux(thud) a one and a thud and a two /* bah */ /* { dg-line quux_def_3 } */ |
| 17 |
/* { dg-bogus "redefined" "quux redefined" { target *-*-* } quux_def_3 } */ |
| 18 |
/* { dg-bogus "previous def" "quux prev def" { target *-*-* } quux_def_2 } */ |