aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/cpp/syshdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/cpp/syshdr.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/cpp/syshdr.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/cpp/syshdr.c b/gcc-4.9/gcc/testsuite/gcc.dg/cpp/syshdr.c
new file mode 100644
index 000000000..310d5d0d2
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/cpp/syshdr.c
@@ -0,0 +1,13 @@
+/* Test for proper suppression of warnings in system headers,
+ and only in system headers. */
+/* FRAGILITY WARNING: The only way we have to distinguish the good error
+ from the bad error is that the good error is on line 4 and the bad is
+ on line 5 (of their respective files). dg.exp doesn't have any way to
+ condition error matchers on the file they're in. */
+
+/* { dg-do preprocess } */
+/* { dg-error "include_next" "good error" { target *-*-* } 4 } */
+
+#include "syshdr1.h"
+/* { dg-message "" "In file included from:" { target *-*-* } 0 } */
+#include "syshdr2.h"