diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/empty-include.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/empty-include.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/empty-include.c b/gcc/testsuite/gcc.dg/cpp/empty-include.c new file mode 100644 index 000000000..6b6c0753f --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/empty-include.c @@ -0,0 +1,14 @@ +/* + * Copyright 2004 Free Software Foundation, Inc. + * Contributed and written by Nathanael Nerode. + * + * GCC 3.4 would attempt to open stdin as the included file + * (PR 17610), causing a sort of hang. + * + * We should get an error. + */ + +/* { dg-do preprocess } */ +/* { dg-options "-fshow-column" } */ +#include "" /* { dg-error "10:empty" "error on empty filename in include" } */ +int x; /* Otherwise we have an empty file and get more errors. */ |