summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/inherit/error4.C
blob: 4f6866ed8eed381185a989ff6c6137468cc38843 (plain)
1
2
3
4
5
6
7
8
9
10
//PR c++/28740

struct A { virtual ~A(); };

struct B : A A {};		// { dg-error "expected|initializer|invalid" }

A foo(const B &b)		// { dg-error "" }
{
  return b;
}