align(8) int x;
pragma(msg, x.alignof);
aligns x correctly on 8 bytes, but the msg prints "4".
Comment #1 by dlang-bot — 2021-08-05T09:07:03Z
@WalterBright created dlang/dmd pull request #12956 "fix Issue 22180 - .alignof not working for globals" fixing this issue:
- fix Issue 22180 - .alignof not working for globals
https://github.com/dlang/dmd/pull/12956
Comment #2 by dlang-bot — 2021-08-05T10:26:39Z
dlang/dmd pull request #12956 "fix Issue 22180 - .alignof not working for globals" was merged into master:
- c1dd46f9f8c7b3a0f8fb64ce0f59159ad99de795 by Walter Bright:
fix Issue 22180 - .alignof not working for globals
https://github.com/dlang/dmd/pull/12956