diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/c-c++-common/cpp/eof-1.c | 7 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/cpp/eof-2.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/cpp/eof-2.h | 4 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/cpp/eof-3.c | 8 |
4 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/cpp/eof-1.c b/gcc/testsuite/c-c++-common/cpp/eof-1.c new file mode 100644 index 0000000..0a06f09 --- /dev/null +++ b/gcc/testsuite/c-c++-common/cpp/eof-1.c @@ -0,0 +1,7 @@ +/* PR preprocess/95183 */ + +/* { dg-do preprocess } */ + +#define f(x) x + +f( /* { dg-error "-:unterminated" "unterminated macro" } */ diff --git a/gcc/testsuite/c-c++-common/cpp/eof-2.c b/gcc/testsuite/c-c++-common/cpp/eof-2.c new file mode 100644 index 0000000..3a4af7f --- /dev/null +++ b/gcc/testsuite/c-c++-common/cpp/eof-2.c @@ -0,0 +1,8 @@ +/* PR preprocess/95183 */ + +/* { dg-do preprocess } */ + +#define f(x) x + +#include "eof-2.h" + /* { dg-regexp {[^\n]*eof-2.h:4: error: unterminated argument list invoking macro "f"\n} } */ diff --git a/gcc/testsuite/c-c++-common/cpp/eof-2.h b/gcc/testsuite/c-c++-common/cpp/eof-2.h new file mode 100644 index 0000000..48ad857 --- /dev/null +++ b/gcc/testsuite/c-c++-common/cpp/eof-2.h @@ -0,0 +1,4 @@ + +#define f(x) x + +f( /* Error here */ diff --git a/gcc/testsuite/c-c++-common/cpp/eof-3.c b/gcc/testsuite/c-c++-common/cpp/eof-3.c new file mode 100644 index 0000000..316918e --- /dev/null +++ b/gcc/testsuite/c-c++-common/cpp/eof-3.c @@ -0,0 +1,8 @@ +/* PR preprocess/95183 */ + +/* { dg-do preprocess } */ +/* { dg-additional-options "-include $srcdir/c-c++-common/cpp/eof-2.h" } */ + + /* { dg-regexp {[^\n]*eof-2.h:4: error: unterminated argument list invoking macro "f"\n} } */ + +token ) |