[cfe-dev] Alignment of bitfield structs

Renato Golin renato.golin at linaro.org
Tue Apr 21 02:59:16 PDT 2015


On 21 April 2015 at 10:56, Bradley Smith <bradley.smith at arm.com> wrote:
> This could indeed be the cause, although from what I understand of the comments in CGRecordLayourBuilder this is entirely intentional behaviour. (Although I could be wrong).

I can fathom why this was intentional, but as you said, it can't
possibly take ABI alignment into account. What about the GNU attribute
alignment? Can't we lower the variable with a fake attribute,
generated by Clang, that forces ABI alignment?

cheers,
--renato

PS: I love using bitfields. I hate supporting bitfields. Damn dichotomy!



More information about the cfe-dev mailing list