2 /* { dg-do compile } */
3 /* { dg-options "-std=c11 -pedantic-errors" } */
7 int a
[1][][2]; /* { dg-error "array type has incomplete element type" } */
8 /* { dg-message "declaration of .a. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
14 int a
[][]; /* { dg-error "array type has incomplete element type" } */
15 /* { dg-message "declaration of .a. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
19 typedef int U
[][]; /* { dg-error "array type has incomplete element type" } */
20 /* { dg-message "declaration of .U. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
22 int x
[][]; /* { dg-error "array type has incomplete element type" } */
23 /* { dg-message "declaration of .x. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
28 fn1 (int z
[][]) /* { dg-error "array type has incomplete element type" } */
29 /* { dg-message "declaration of .z. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
31 int a
[1][][2]; /* { dg-error "array type has incomplete element type" } */
32 /* { dg-message "declaration of .a. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
35 int c
[1][2][3][]; /* { dg-error "array type has incomplete element type" } */
36 /* { dg-message "declaration of .c. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
37 T d
[1]; /* { dg-error "array type has incomplete element type" } */
38 /* { dg-message "declaration of .d. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
39 T e
[]; /* { dg-error "array type has incomplete element type" } */
40 /* { dg-message "declaration of .e. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
42 /* This array has incomplete element type, but is not multidimensional. */
43 struct N f
[1]; /* { dg-error "array type has incomplete element type" } */
44 /* { dg-bogus "declaration of .f. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
47 void fn2 (int [][]); /* { dg-error "array type has incomplete element type" } */
48 /* { dg-message "declaration of multidimensional array must have bounds" "" { target *-*-* } .-1 } */
51 void fn4 (T
[]); /* { dg-error "array type has incomplete element type" } */
52 /* { dg-message "declaration of multidimensional array must have bounds" "" { target *-*-* } .-1 } */