Thread (1 message) 1 message, 1 author, 2022-01-23

Re: [PATCH v2] mem-pool: Don't assume uintmax_t is aligned enough for all types

From: Junio C Hamano <hidden>
Date: 2022-01-23 20:28:21

Jessica Clarke [off-list ref] writes:
So, sizeof(X) does not always equal _Alignof(X), even for primitive
types, _Alignof need only be a factor of sizeof. The two are the same
on most architectures, and is a sensible ABI, but the exception is the
m68k case I was referring to above. On m68k, sizeof(long long) == 8,
but _Alignof(long long) == 2 (yes this is a real pain point of its ABI;
Ah, thanks.  Having a variant of the above explanation in a comment
next to the "union within a struct" would help future readers from
asking the same question as I asked.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help