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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
There are things that need to be clarified, in particular value initialization
should clear even the padding bits, so supposedly std::bit_cast of Item() if
the NSDMIs would be dropped might be well defined and ok in constexpr contexts
(we don't implement that currently, and don't implement it even at runtime, we
treat padding bits as always undefined), but the above testcase has a user
defined constructor and therefore no zero initialization happens, and even if
it wouldn't, any copying around (both copy construction and assignments) will
make those bits undefined as well.

Reply via email to