aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/include2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/include2.c')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/include2.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/include2.c b/gcc/testsuite/gcc.dg/cpp/include2.c
new file mode 100644
index 0000000..6a67f76
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/include2.c
@@ -0,0 +1,15 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc. */
+
+/* { dg-do preprocess } */
+
+/* Tests that #include does not allow the terminating '>' or '"' to be
+ escaped, as per the standard. */
+
+/* Source: Neil Booth, 4 Nov 2000. */
+
+#include <silly\>> /* { dg-warning "extra tokens" "" } */
+#include "silly\"" /* { dg-error "missing" "" } */
+
+/* { dg-error "No such file" "" { target *-*-* } 10 } */
+/* { dg-error "No such file" "" { target *-*-* } 11 } */
+/* { dg-warning "extra tokens" "" { target *-*-* } 11 } */