You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead, the address of foo.@y should end with a 0 instead, offsetof(Foo, @y) should be 16, sizeof(Foo) should be 32, and alignof(Foo) should be 16. Underalignment could lead to suboptimal code generation or totally incorrect lib bindings.
This is known to happen on x86-64 Windows and Linux. The Apple M2 (AArch64) does not have this issue:
This is fixed in LLVM 18, however alignof(Foo | Int32) or even alignof(Foo | Int128) is still 8, since the data storage for mixed unions has the same alignment as size_t:
Consider the following:
Instead, the address of
foo.@y
should end with a0
instead,offsetof(Foo, @y)
should be 16,sizeof(Foo)
should be 32, andalignof(Foo)
should be 16. Underalignment could lead to suboptimal code generation or totally incorrect lib bindings.This is known to happen on x86-64 Windows and Linux. The Apple M2 (AArch64) does not have this issue:
The text was updated successfully, but these errors were encountered: