gcc/testsuite/g++.dg/cpp26/name-independent-decl4.C
raw| 1 | // P2169R4 - A nice placeholder with no name |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-options "" } |
| 4 | |
| 5 | void |
| 6 | foo () |
| 7 | { |
| 8 | extern int _; |
| 9 | extern int _; |
| 10 | int _; // { dg-warning "name-independent declarations only available with" "" { target c++23_down } } |
| 11 | ++_; // { dg-error "reference to '_' is ambiguous" } |
| 12 | } |