FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900404_01.C
blobf728865961fec18264bf2bf9eadb565f60d76a36
1 // g++ 1.37.1 bug 900404_01
3 // g++ allows string initializers for known-length character arrays to be
4 // one character longer (counting the terminating null) than the actual
5 // length of the array to be initialized.
7 // The C++ Reference Manual (section 8.4.2) expressly prohibits this.
9 // Cfront 2.0 passes this test.
11 // keywords: arrays, initialization, array bounds
13 char cv[4] = "asdf";            // ERROR - missed
15 int main () { return 0; }