1 /* { dg-options "-std=c99 -pedantic-errors" } */
3 int a
[*]; /* { dg-error "not allowed in other than function prototype scope" } */
4 void foo1() { int a
[*]; } /* { dg-error "not allowed in other than function prototype scope" } */
5 void foo2() { int a
[*]; } /* { dg-error "not allowed in other than function prototype scope" } */
6 int foo3(int i
)[*]; /* { dg-error "not allowed in other than function prototype scope" } */
7 void foo4(int o
[*][4]) { } /* { dg-error "not allowed in other than function prototype scope" } */
8 void foo5(int o
[4][*]) { } /* { dg-error "not allowed in other than function prototype scope" } */
10 /* [*] can't be used in a type that's not a declaration */
11 void foo11(int x
[sizeof(int (*)[*])]); /* { dg-error "not allowed in other than a declaration" } */
12 void foo12(int [*]); /* { dg-error "not allowed in other than a declaration" } */
17 typedef int (*vla
)[m
];
19 vla x
; /* { dg-error "a member of a structure or union cannot have a variably modified type" } */
21 int (*y
)[n
]; /* { dg-error "a member of a structure or union cannot have a variably modified type" } */
22 int z
[n
]; /* { dg-error "a member of a structure or union cannot have a variably modified type" } */
25 extern int (*r
)[m
]; /* { dg-error "variably modified type must have no linkage" } */