Re: [PATCH] c++: empty union member activation during constexpr [PR102163]

2021-09-14 Thread Jason Merrill via Gcc-patches
On 9/13/21 3:54 PM, Patrick Palka wrote: Here, the union's constructor is defined to activate its empty data member _M_rest, but during constexpr evaluation of this constructor the subobject constructor call to O::O(&_M_rest, 42) produces no side effects that actually activates the member, so the

[PATCH] c++: empty union member activation during constexpr [PR102163]

2021-09-13 Thread Patrick Palka via Gcc-patches
Here, the union's constructor is defined to activate its empty data member _M_rest, but during constexpr evaluation of this constructor the subobject constructor call to O::O(&_M_rest, 42) produces no side effects that actually activates the member, so the union still appears uninitialized after th