diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/trad/hash.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/trad/hash.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/hash.c b/gcc/testsuite/gcc.dg/cpp/trad/hash.c new file mode 100644 index 000000000..8108c89fb --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/trad/hash.c @@ -0,0 +1,14 @@ +/* Test for erroneously thinking comments are token-pastes. + From XFree86 4.0. */ +/* { dg-do preprocess } */ + +#ifndef foo +#define foo /**/ +#endif + +#ifndef foo +#define foo /* as nothing */ +#endif + +/* { dg-bogus "(start|end) of macro" "paste at end" { target *-*-* } 7 } */ +/* { dg-bogus "(start|end) of macro" "comment at end" { target *-*-* } 11 } */ |