RE: [PATCH v2] x86/fpu: use _Alignof to avoid UB in TYPE_ALIGN

From: David Laight
Date: Thu Oct 06 2022 - 04:12:14 EST

From: Nick Desaulniers
> Sent: 05 October 2022 19:58
> Section 6.2.8 "Alignment of objects" refers to "fundamental alignment"
> and "extended alignment."
> I wonder if it would be precise to say that "_Alignof evaluates to the
> fundamental alignment while __alignof__ evaluates to the extended
> alignment (which is implementation defined, typically by the machine
> specific ABI)." Though even that seems imprecise since it sounds like
> a fundamental alignment could be less than or equal to what alignof
> evaluates to.

Except that neither of those terms makes any sense to most
Something like "__alignof__() is the preferred alignment and
_Alignof() the minimal alignment. For 'long long' on x86 these
are 8 and 4 respectively."


Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)