summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wcxx-compat-14.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/Wcxx-compat-14.c')
-rw-r--r--gcc/testsuite/gcc.dg/Wcxx-compat-14.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/Wcxx-compat-14.c b/gcc/testsuite/gcc.dg/Wcxx-compat-14.c
new file mode 100644
index 000000000..23783711b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wcxx-compat-14.c
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-Wc++-compat" } */
+
+char a1[] = "a";
+char a2[1] = "a"; /* { dg-warning "C\[+\]\[+\]" } */
+char a3[2] = "a";