aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/cpp/Wtrigraphs.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/cpp/Wtrigraphs.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/cpp/Wtrigraphs.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/cpp/Wtrigraphs.c b/gcc-4.9/gcc/testsuite/gcc.dg/cpp/Wtrigraphs.c
new file mode 100644
index 000000000..d4be2040c
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/cpp/Wtrigraphs.c
@@ -0,0 +1,27 @@
+/* { dg-do preprocess } */
+/* { dg-options "-std=gnu99 -Wtrigraphs" } */
+
+/* Test we don't double warn for trigraphs immediately after preceding
+ text. Source Neil Booth. 22 Nov 2000. */
+
+abcdef??< /* { dg-warning "ignored" } */
+123456??> /* { dg-warning "ignored" } */
++??= /* { dg-warning "ignored" } */
+
+/* Test we warn of escaped newlines only in comments. Source Neil
+ Booth. 4 May 2003. */
+
+/* { dg-bogus "ignored" } Test ??< ??= a few ??/ random things in
+ { dg-warning "ignored" } some ??/
+ { dg-bogus "ignored" } ??< comments. */
+
+// { dg-bogus "ignored" } More ??/ comment ??> tests.
+
+// { dg-warning "ignored" } Another ??/
+ Test
+
+// { dg-warning "ignored" } And another with space after ??/
+ the escape
+
+// { dg-bogus "ignored" } A tricky one ??/\
+