On Tue, May 06, 2014 at 10:14:42AM +0200, Jakub Jelinek wrote: > > Hmm, but isn't TYPE_ALIGN_UNIT wrong then? > > No, after all, you don't want to change __alignof__ (long long), that is > pretty essential part of ABI.
Yeah, as I understand things, for x86_64 __alignof__ (T) returns *preferred* alignment which is specified for each type in the ABI (Figure 3.1: Scalar Types), and is the same as sizeof (T). But _Alignof (T) (thus also _Alignas (T)) is the *least* alignment for a type -- and they can differ if the type is in a struct/union. Please correct me if I'm mistaken. Marek