[Bug c/51628] __attribute__((packed)) is unsafe in some cases

sven.koehler at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Nov 2 01:53:00 GMT 2017


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

--- Comment #28 from Sven <sven.koehler at gmail dot com> ---
(In reply to Eric Gallager from comment #27)
> gcc 8 adds -Wpacked-not-aligned; does that fix this bug?

I couldn't find documentation on what this switch is supposed to do. Can you
point me in the right direction? Is there some commit explaining
-Wpacked-not-aligned?

FYI: the LLVM developers have added -Waddress-of-packed-member which addresses
the issue discussed here.


More information about the Gcc-bugs mailing list