aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/redef1.c
blob: 2b5304cb8b9c5325573f6040fb401a306d72425e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* Test for redefining macros with insignificant (i.e. whitespace)
   differences.  */

/* { dg-do preprocess } */

#define foo bar
#define /* x */ foo /* x */ bar /* x */
/* { dg-bogus "redefined" "foo redefined"	{ target *-*-* } .-1 } */
/* { dg-bogus "previous def" "foo prev def"	{ target *-*-* } .-3 } */

#define quux(thud) a one and a thud and a two /* { dg-line quux_def_1 } */
#define /**/ quux( thud ) /**/ a one and a /**/ thud /**/ and /**/ a two /* { dg-line quux_def_2 } */
/* { dg-bogus "redefined" "quux redefined"	{ target *-*-* } quux_def_2 } */
/* { dg-bogus "previous def" "quux prev def"	{ target *-*-* } quux_def_1 } */

#define quux(thud) a one	and a thud and a 	two /* bah */ /* { dg-line quux_def_3 } */
/* { dg-bogus "redefined" "quux redefined"	{ target *-*-* } quux_def_3 } */
/* { dg-bogus "previous def" "quux prev def"	{ target *-*-* } quux_def_2 } */