ARM-software / abi-aa

Application Binary Interface for the Arm® Architecture
Other
878 stars 173 forks source link

Clarify the role of packed types in computing natural alignment #269

Open rjmccall opened 2 weeks ago

rjmccall commented 2 weeks ago

AAPCS defines the natural alignment of a composite type as the maximum of the alignment of the members. Both GCC and Clang appear to honor __attribute__((packed)) when computing natural alignment, essentially setting the natural alignment to 1; obligatory godbolt link. This is probably worth clarifying.