diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp-if5.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp-if5.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp-if5.c b/gcc/testsuite/gcc.dg/cpp-if5.c new file mode 100644 index 0000000..2eac73b --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp-if5.c @@ -0,0 +1,12 @@ +/* Regression test: #ifdef 0 should not crash. Problem noted by + Jakub Jelinek <jakub@redhat.com>. */ +/* { dg-do preprocess } */ + +#ifdef 0 /* { dg-error "with invalid argument" } */ +#error not seen +#endif + +#ifndef 0 /* { dg-error "with invalid argument" } */ +#else +#error not seen +#endif |