jyknight added a comment.
In D125919#3556754 <https://reviews.llvm.org/D125919#3556754>, @rsmith wrote:
> That assumption does not hold. Given `struct A { char c[3]; };`, `struct A`
> has size 3 and align 1, but `_Atomic struct A` has size 4 and align 4 across
> many (perhaps all?) of our targets. (This is an ABI divergence between GCC
> and Clang, which as far as I know the psABI owners have so far not succeeded
> in resolving.)
And while GCC indeed never changes the size (that is: it never introduces
padding), it, too, increases the alignment when the size was already
appropriately-aligned.
That is, given `struct A { char c[4]; };`, `struct A` has size 4 and align 1,
but `_Atomic struct A` has size 4 and align 4, under //both// GCC and Clang.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125919/new/
https://reviews.llvm.org/D125919
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits