[Bug c++/91079] New: [DR 1881] Standard-layout classes and unnamed bit-fields
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 3 22:08:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91079
Bug ID: 91079
Summary: [DR 1881] Standard-layout classes and unnamed
bit-fields
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mpolacek at gcc dot gnu.org
Target Milestone: ---
Cf. https://wg21.link/cwg1881
Test:
struct A { int a : 4; };
struct B : A { int b : 3; };
static_assert(__is_standard_layout(A), "");
static_assert(!__is_standard_layout(B), "");
struct C { int : 0; };
struct D : C { int : 0; };
static_assert(__is_standard_layout(C), "");
static_assert(!__is_standard_layout(D), "");
More information about the Gcc-bugs
mailing list