Debian Codegraph @

gcc/testsuite/gcc.dg/noncompile/pr30552-3.c

raw
1 /* PR c/30552 */
2
3 /* Related example where statement expression used as old-style formal array
4 * argument size in an invalid nested function declaration should generate
5 * user error, not internal compiler error. */
6
7 /* { dg-do compile } */
8 /* { dg-options "-std=gnu17" } */
9
10 int main()
11 {
12 int g()
13 int a[( {int b} )]; /* { dg-error "braced-group within expression allowed only inside a function|declaration for parameter" } */
14 return 0; /* { dg-error "expected declaration specifiers before" } */
15 } /* { dg-error "expected declaration" } */
16 /* { dg-error "-:expected" "" { target *-*-* } .+1 } */