aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900402_02.C
blob: d3cf5ad9abe53f7a39bf66e4c4056418e39c2d5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-do assemble  }
// g++ 1.37.1 bug 900402_02

// g++ fails to correctly flag all attempts to construct an array type
// of zero length as errors.

// keywords: arrays, array bound, zero length

typedef int array_type[0];		// { dg-error "zero-size array" }

int array_object_1[0];			// { dg-error "zero-size array" }

void function_0 (int formal_array[0])	// { dg-error "zero-size array" }
{
}

void function_2 ()
{
  int local_object_array_0[0];		// { dg-error "zero-size array" }
}

int main () { return 0; }