gcc/testsuite/g++.dg/cpp26/decomp11.C
raw| 1 | // PR c++/116113 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-options "" } |
| 4 | |
| 5 | extern int b[]; |
| 6 | |
| 7 | void |
| 8 | foo () |
| 9 | { |
| 10 | auto [a] = b; // { dg-error "is incomplete" } |
| 11 | // { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 } |
| 12 | if (a) |
| 13 | ; |
| 14 | switch (a) |
| 15 | { |
| 16 | default: |
| 17 | break; |
| 18 | } |
| 19 | } |