Skip to content

Clang a bit too strict about types being complete #9486

@llvmbot

Description

@llvmbot
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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions