https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71748

--- Comment #1 from Zhendong Su <su at cs dot ucdavis.edu> ---
If we remove the template from the code, it'll be accepted: 

$ g++-trunk -c -Wall -Wextra -std=c++11 good.cpp
$ 
$ cat good.cpp
struct A 
{
  virtual ~A () {}
};

struct B : public A 
{
  virtual ~B () {} 
};

void foo ()
{
  B *b = new B;
  b->~A (); 
  // also accepted: b->A::~A(); 
}

int main ()
{
  foo (); 
  return 0;
}

Reply via email to