[Issue 17857] New: T.alignof ignores explicit align(N) type alignment
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Sep 25 21:59:26 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17857
Issue ID: 17857
Summary: T.alignof ignores explicit align(N) type alignment
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: kinke at gmx.net
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
Fix: https://github.com/dlang/dmd/pull/7164
--
More information about the Digitalmars-d-bugs
mailing list