diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/direct2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/direct2.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/direct2.c b/gcc/testsuite/gcc.dg/cpp/direct2.c index 52d1e31..433cf93 100644 --- a/gcc/testsuite/gcc.dg/cpp/direct2.c +++ b/gcc/testsuite/gcc.dg/cpp/direct2.c @@ -10,15 +10,24 @@ #define HASHDEFINE #define #define HASHINCLUDE #include -HASH include "somerandomfile" /*{ dg-error "syntax|parse" "non-include" }*/ +HASH include "somerandomfile" /*{ dg-error "stray" "non-include" }*/ /*{ dg-bogus "No such" "don't execute non-include" { target *-*-* } 13 }*/ -HASHINCLUDE <somerandomfile> /*{ dg-error "syntax|parse" "non-include 2" }*/ -/*{ dg-bogus "No such" "don't execute non-include 2" { target *-*-* } 15 }*/ +int resync_parser_1; /*{ dg-error "parse" "" }*/ -void g () +HASHINCLUDE <somerandomfile> /*{ dg-error "stray" "non-include 2" }*/ +/*{ dg-bogus "No such" "don't execute non-include 2" { target *-*-* } 17 }*/ +int resync_parser_2; + +void g1 () +{ +HASH define X 1 /* { dg-error "stray|undeclared|parse|for each" "# from macro" } */ + int resync_parser_3; +} + +void g2 () { -HASH define X 1 /* { dg-error "syntax error" "# from macro" } */ -HASHDEFINE Y 1 /* { dg-error "syntax error" "#define from macro" } */ +HASHDEFINE Y 1 /* { dg-error "stray|undeclared|parse|for each" "#define from macro" } */ + int resync_parser_4; } #pragma GCC dependency "direct2.c" @@ -34,4 +43,4 @@ void f () #define starslash *##/ slashstar starslash /* { dg-error "(parse|syntax) error" "not a comment" } */ -/* { dg-warning "does not give" "paste warning(s)" { target *-*-* } 36 } */ +/* { dg-warning "does not give" "paste warning(s)" { target *-*-* } 45 } */ |