gcc/testsuite/g++.dg/diagnostic/variably-modified-type-1.C
raw| 1 | // { dg-options "" } |
| 2 | |
| 3 | void foo () |
| 4 | { |
| 5 | int n; |
| 6 | typedef int X[n]; |
| 7 | struct Z |
| 8 | { |
| 9 | X x __attribute__((unused)); // { dg-error "7:data member may not have variably modified type" } |
| 10 | void bar (X x __attribute__((unused))); // { dg-error "17:parameter may not have variably modified type" } |
| 11 | }; |
| 12 | } |