summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/warn-comments.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/warn-comments.c')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/warn-comments.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/warn-comments.c b/gcc/testsuite/gcc.dg/cpp/warn-comments.c
new file mode 100644
index 000000000..1cdf75cf2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/warn-comments.c
@@ -0,0 +1,7 @@
+// { dg-do preprocess }
+// { dg-options "-std=gnu99 -fdiagnostics-show-option -Wcomments" }
+
+/* /* */ // { dg-warning "\"\.\*\" within comment .-Wcomment." }
+
+// \
+ // { dg-warning "multi-line comment .-Wcomment." "multi-line" { target *-*-* } 6 }