-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Labels
Description
| Bugzilla Link | 9114 |
| Resolution | FIXED |
| Resolved on | Feb 04, 2011 22:36 |
| Version | trunk |
| OS | All |
| Reporter | LLVM Bugzilla Contributor |
| CC | @DougGregor,@zmodem,@pwo |
Extended Description
The following code is accepted by gcc but rejected by clang. Uncommenting the declaration of ~baz causes clang to accept it. Uncommenting the definition of ~baz causes gcc to reject it.
template struct foo {
T* p;
~foo() {
p->x();
}
};
struct bar{
virtual ~bar();
};
struct zed;
struct baz : public bar {
virtual void x();
//virtual ~baz();
//virtual ~baz() {}
foo m;
};
void f() {
foo s;
}