gcc/testsuite/g++.dg/lookup/pr84962.C
raw| 1 | // PR c++/84952 ICE with anon-struct having member fns |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-additional-options -Wno-pedantic } |
| 4 | |
| 5 | struct X { |
| 6 | struct |
| 7 | { |
| 8 | template <typename> int a (); |
| 9 | // { dg-error "public non-static data member" "" { target *-*-* } .-1 } |
| 10 | }; |
| 11 | |
| 12 | int : a; // { dg-error "" } |
| 13 | }; |
| 14 |