gcc/testsuite/gcc.dg/noncompile/pr30552-2.c
raw| 1 | /* PR c/30552 */ |
| 2 | |
| 3 | /* Another example of a statement expression as formal array argument size in |
| 4 | * nested old-style function declaration should generate user error, not |
| 5 | * internal compiler error. */ |
| 6 | |
| 7 | /* { dg-do compile } */ |
| 8 | /* { dg-options "-Wno-old-style-definition" } */ |
| 9 | |
| 10 | int main() |
| 11 | { |
| 12 | void fun(a) |
| 13 | int a[({int b=2; b;})]; /* { dg-error "braced-group within expression allowed only inside a function" } */ |
| 14 | { |
| 15 | } |
| 16 | return 0; |
| 17 | } |