Unexpected unaligned access on arm

Alexander Monakov amonakov@ispras.ru
Mon Jun 8 13:48:03 GMT 2020


On Mon, 8 Jun 2020, Lars Poeschel wrote:


> What am I missing ? What am I doing wrong ?

The field

    struct in_addr  ip_src;

is 4-byte-aligned, forcing the containing structure to also be 4-byte aligned.
>From that the compiler deduces the minimum required alignment of individual
members.

Alexander


More information about the Gcc-help mailing list