aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2009-06-17 13:21:23 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2009-06-17 13:21:23 +0000
commit5eb4df45ce442bdb807cc674e45dbc31fdf3d4ba (patch)
treea18365a2a12b66e43938e6451b9ef906434cd866 /gcc/testsuite
parent6958c7802c3e7e62f3f56a0b0319beed6879d7e8 (diff)
downloadgcc-5eb4df45ce442bdb807cc674e45dbc31fdf3d4ba.zip
gcc-5eb4df45ce442bdb807cc674e45dbc31fdf3d4ba.tar.gz
gcc-5eb4df45ce442bdb807cc674e45dbc31fdf3d4ba.tar.bz2
c-pch.c (get_ident): Don't set size of templ array.
./: * c-pch.c (get_ident): Don't set size of templ array. (pch_init): Don't set size of partial_pch array. * c-typeck.c (digest_init): If -Wc++-compat, warn about using a string constant to intialize an array whose size is the length of the string. testsuite/: * gcc.dg/Wcxx-compat-14.c: New testcase. From-SVN: r148611
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/Wcxx-compat-14.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 42ec514..3e42e51 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-17 Ian Lance Taylor <iant@google.com>
+
+ * gcc.dg/Wcxx-compat-14.c: New testcase.
+
2009-06-17 Aldy Hernandez <aldyh@redhat.com>
* gcc.dg/func-ptr-conv-1.c: Update column info.
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 0000000..2378371
--- /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";