aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.bugs/900404_01.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.bugs/900404_01.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.bugs/900404_01.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900404_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900404_01.C
new file mode 100644
index 00000000000..f728865961f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900404_01.C
@@ -0,0 +1,15 @@
+// g++ 1.37.1 bug 900404_01
+
+// g++ allows string initializers for known-length character arrays to be
+// one character longer (counting the terminating null) than the actual
+// length of the array to be initialized.
+
+// The C++ Reference Manual (section 8.4.2) expressly prohibits this.
+
+// Cfront 2.0 passes this test.
+
+// keywords: arrays, initialization, array bounds
+
+char cv[4] = "asdf"; // ERROR - missed
+
+int main () { return 0; }