[Bug c++/87373] Packed structs are not handled properly on ARM architecture even with misaligned access is enabled

rearnsha at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Sep 21 09:46:00 GMT 2018


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

--- Comment #5 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
It's not clear what behaviour you think is 'proper' for a packed struct with a
volatile member.  Since packed is a GNU extension, there's nothing in the C (or
C++) standards that you can call upon to reach a reasonable expectation, and
anything that is left must be down to either the GNU manuals or good luck.  In
this case I don't think the GNU manuals say anything specific about this case
either (since that would imply knowing how each supported architecture handles
misaligned memory accesses.


More information about the Gcc-bugs mailing list