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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I don't think there's anything the library can do here. The layout of
std::complex is fixed, as stated above. And the fact it's a non-POD is also
fixed.

If the front-end warns about trying to pack a non-POD, then the library can't
stop it warning about std::complex<float>.

I don't know whether clang allows packing non-PODs, or just doesn't ever warn
for them, or has a special case for std::complex, or does something smarter
like not warn for types that have no padding bytes anyway (so that packing them
would be a no-op).

Reply via email to