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

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Jan 16 15:48:00 GMT 2018


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

--- Comment #40 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Alexey Salmin from comment #39)
> Thank you, this patch works for me.
> 
> Gives a warning in the attached test case, but still allows to take an
> addre of a packed struct members when the packed attribute is preserved in
> the pointer.

Do you have such a testcase with the packed attribute preserved in
the pointer?


More information about the Gcc-bugs mailing list