summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/_Pragma2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/_Pragma2.c')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/_Pragma2.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/_Pragma2.c b/gcc/testsuite/gcc.dg/cpp/_Pragma2.c
new file mode 100644
index 000000000..24c4457ed
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/_Pragma2.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc. */
+
+/* { dg-do preprocess } */
+
+/* Don't allow directives in a _Pragma string. */
+
+/* Contributed by Neil Booth 14 Nov 2000. */
+
+_Pragma("#define test")
+
+#ifdef test
+#error Do not allow directives in _Pragma strings
+#endif