https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100935
Bug ID: 100935
Summary: d: T.alignof ignores explicit align(N) type alignment
Product: gcc
Version: 9.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: d
Assignee: ibuclaw at gdcproject dot org
Reporter: ibuclaw at gdcproject dot org
Target Milestone: ---
T.alignof currently always returns the natural alignment of a type:
align(8) struct Aligned { int a; }
static assert(Aligned.alignof == 8); // fails, 4
align(1) struct Packed { int a; }
static assert(Packed.alignof == 1); // fails, 4