2 // g++ 1.37.1 bug 900402_02
4 // g++ fails to correctly flag all attempts to construct an array type
5 // of zero length as errors.
7 // keywords: arrays, array bound, zero length
9 typedef int array_type[0]; // { dg-error "24:ISO C\\+\\+ forbids zero-size array" }
11 int array_object_1[0]; // { dg-error "20:ISO C\\+\\+ forbids zero-size array" }
13 void function_0 (int formal_array[0]) // { dg-error "35:ISO C\\+\\+ forbids zero-size array" }
19 int local_object_array_0[0]; // { dg-error "28:ISO C\\+\\+ forbids zero-size array" }
22 int main () { return 0; }