This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58126] New: No diagnostic when inheriting an uninitialized const or reference member
- From: "vvnic.holas at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 11 Aug 2013 15:38:05 +0000
- Subject: [Bug c++/58126] New: No diagnostic when inheriting an uninitialized const or reference member
- Auto-submitted: auto-generated
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
}