From: Antonio Quartulli antonio@meshcoding.com Date: Sun, 01 Dec 2013 15:28:58 +0100
Am I wrong or this is a problem in the ARM compiler not doing the right assumption? On x86 and x86_64 offset_of dest is 4, as expected.
These alignment behaviors are defined by the processor ABI, there is no set of global rules that apply, so it behaves differently on different CPUs. What you observe is correct behavior for compilation on ARM processors.