[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 15:34:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87373
--- Comment #23 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
(In reply to Richard Earnshaw from comment #22)
> Or
> #pragma pack(push, 1)
>
> struct TestStructType
> {
> volatile unsigned one;
> unsigned char two;
> unsigned short three;
> } __attribute__((aligned(32)));
Err, that should be aligned(4), the alignment is in bytes!
>
> #pragma pack(pop)
More information about the Gcc-bugs
mailing list