This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55120] New: Inaccessible virtual base constructor does not prevent generation of default constructor
- From: "ndkrempel at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Oct 2012 15:59:44 +0000
- Subject: [Bug c++/55120] New: Inaccessible virtual base constructor does not prevent generation of default constructor
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120
Bug #: 55120
Summary: Inaccessible virtual base constructor does not prevent
generation of default constructor
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ndkrempel@gmail.com
The following code should fail to compile but does not:
struct V {};
struct B : private virtual V {};
struct D : B {};
int main() {
D d;
}
According to N3376 section 12.1 paragraph 5, the defaulted default constructor
for D should be defined as deleted, as the default constructor for the virtual
base V is inaccessible from D.