1 /* Test for C99 array declarators: expression must be an
2 assignment-expression. PR 11943. */
3 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
4 /* { dg-do compile } */
5 /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
6
7 void
foo(void)8 foo (void)
9 {
10 int a[2, 3]; /* { dg-error "parse|syntax|expected" "bad array declarator" } */
11 void b(int x[2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
12 void c(int [2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
13 void d(int *x[restrict 2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
14 void e(int *x[static restrict 2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
15 void f(int *x[restrict static 2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
16 }
17