https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993

--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
And that's clearly the committee's intent:
https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#302

"Zero the object, then call the default generated constructor" ... "Zero first,
and generate the object code for the default constructor when it's needed for
value-initialization cases"

https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#543

"Change 9.4 [dcl.init] to specify that non-union class objects with no
user-declared constructor are value-initialized by first zero-initializing the
object and then calling the (implicitly-defined) default constructor,"

Reply via email to