[Bug c++/58126] New: No diagnostic when inheriting an uninitialized const or reference member
vvnic.holas at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Aug 11 15:38:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58126
Bug ID: 58126
Summary: No diagnostic when inheriting an uninitialized const
or reference member
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: vvnic.holas at gmail dot com
The following code compiles without any warning or error:
struct A {
const int value1;
int& value2;
};
struct B : A {};
int main() {
B b; // no error
// A a; // error, as expected
}
More information about the Gcc-bugs
mailing list