Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / c99-arraydecl-2.c
blob22d6e97be46fd6bab2b50c41b9944017d3d7ebf6
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" } */
7 void
8 foo (void)
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" } */