view gcc/testsuite/g++.dg/parse/dtor5.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/19732

struct A;
typedef int ~A; // { dg-error "13:declaration of .~ A. as non-function" }
struct B { 
  ~A(); // { dg-error "3:declaration of .~A. as member of .B." }
  typedef int ~A; // { dg-error "15:declaration of .~ A. as non-function" }
  void f() {
    extern ~B(); // { dg-error "12:declaration of .~ B. as non-member" }
  }
};
void ~A(); // { dg-error "6:declaration of .~ A. as non-member" }