third draft: add bitfields to D
Dave P.
dave287091 at gmail.com
Sun Jul 21 00:36:20 UTC 2024
On Sunday, 5 May 2024 at 23:08:29 UTC, Walter Bright wrote:
> https://github.com/WalterBright/documents/blob/2ec9c5966dccc423a2c4c736a6783d77c255403a/bitfields.md
>
> Adds introspection capabilities.
>
> https://github.com/dlang/dmd/pull/16444
C23 introduces `_BitInt(N)` which adds integers of a specific bit
width that don’t promote. Should D bitfields be implemented in
terms of this new type instead of the legacy bitfields with all
their problems? See
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf for a
draft version of the C23 standard (possibly there’s a newer
version but I gave up digging through their archives).
More information about the dip.development
mailing list