July 06 [Issue 24651] New: Bitfield layout wrong for 48-bit field on 32-bit Linux | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24651 Issue ID: 24651 Summary: Bitfield layout wrong for 48-bit field on 32-bit Linux Product: D Version: D2 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: tim.dlang@t-online.de ``` struct S { unsigned long long a:48, b:48; }; ``` Struct S has different bitfield layout for C and D on 32-bit Linux: D: size=16 align=4 C: size=12 align=4 ulong a: D: FFFFFFFF FFFF0000 00000000 00000000 C: FFFFFFFF FFFF0000 00000000 ulong b: D: 00000000 00000000 FFFFFFFF FFFF0000 C: 00000000 0000FFFF FFFFFFFF -- |
Copyright © 1999-2021 by the D Language Foundation