]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.old-deja/g++.bugs/900402_02.C
C++: more location wrapper nodes (PR c++/43064, PR c++/43486)
[thirdparty/gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900402_02.C
1 // { dg-do assemble }
2 // g++ 1.37.1 bug 900402_02
3
4 // g++ fails to correctly flag all attempts to construct an array type
5 // of zero length as errors.
6
7 // keywords: arrays, array bound, zero length
8
9 typedef int array_type[0]; // { dg-error "24:ISO C\\+\\+ forbids zero-size array" }
10
11 int array_object_1[0]; // { dg-error "20:ISO C\\+\\+ forbids zero-size array" }
12
13 void function_0 (int formal_array[0]) // { dg-error "35:ISO C\\+\\+ forbids zero-size array" }
14 {
15 }
16
17 void function_2 ()
18 {
19 int local_object_array_0[0]; // { dg-error "28:ISO C\\+\\+ forbids zero-size array" }
20 }
21
22 int main () { return 0; }