aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c b/gcc-4.9/gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c
new file mode 100644
index 000000000..55cc5eb66
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2002 Free Software Foundation, Inc. */
+
+/* { dg-do preprocess } */
+/* { dg-options "-Wno-endif-labels -pedantic-errors" } */
+
+/* Tests combinations of -pedantic and -Wno-endif-labels; see extratokens2.c
+ for more general tests. */
+
+/* Source: Phil Edwards, 25 Mar 2002. Copied from endif-pedantic1.c and
+ modified. */
+
+#if 1
+#if 0
+#else foo /* { dg-error "extra tokens" "tokens after #else" } */
+#endif / /* { dg-error "extra tokens" "tokens after #endif" } */
+#endif
+