gcc/testsuite/g++.dg/parse/dtor5.C
raw| 1 | // PR c++/19732 |
| 2 | |
| 3 | struct A; |
| 4 | typedef int ~A; // { dg-error "13:declaration of .~ A. as non-function" } |
| 5 | struct B { |
| 6 | ~A(); // { dg-error "3:declaration of .~A. as member of .B." } |
| 7 | typedef int ~A; // { dg-error "15:declaration of .~ A. as non-function" } |
| 8 | void f() { |
| 9 | extern ~B(); // { dg-error "12:declaration of .~ B. as non-member" } |
| 10 | } |
| 11 | }; |
| 12 | void ~A(); // { dg-error "6:declaration of .~ A. as non-member" } |