Bug 22180 – .alignof not working for globals

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-08-05T08:10:44Z
Last change time
2021-08-05T10:26:39Z
Keywords
pull
Assigned to
No Owner
Creator
Walter Bright

Comments

Comment #0 by bugzilla — 2021-08-05T08:10:44Z
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