diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/20000207-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/20000207-2.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/20000207-2.c b/gcc/testsuite/gcc.dg/cpp/20000207-2.c new file mode 100644 index 000000000..fbdf39e14 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/20000207-2.c @@ -0,0 +1,16 @@ +/* { dg-do preprocess } */ + +/* Test for proper handling of unary plus in #if. */ + +#if !(+1) +#error Error /* { dg-bogus "Error" "case !(+1)" } */ +#endif + +#if !+1 +#error Error /* { dg-bogus "Error" "case !+1" } */ +#endif + +#if +1 +#else +#error Error /* { dg-bogus "Error" "case +1" } */ +#endif |