aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/visibility28.C
blob: e92c299960fcebdcf2ed7ca8a169b910387f2d4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Build don't link: 
// GROUPS passed visibility
extern "C" int printf( const char *, ...);

class B {
public:
        B() { };
        virtual ~B() { printf( "B::~B\n"); };
};

class D : public B {
public:
        virtual ~D() { printf( "D::~D\n"); };
  void operator = ( int i) { this->~B(); }// ERROR - D has no ~B part to it
};

int
main()
{
        D * pd = new D;
        B * pb = pd;
        delete pb;
        return 0;
};