third draft: add bitfields to D

Patrick Schluter Patrick.Schluter at bbox.fr
Tue May 21 16:44:09 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

Does it support the :0 syntax of C fields?

     struct bf_t {
         int a:12;
         int   :0;
         int b:10;
     }

     bf_t f;

     assert(f.b.bitoffset = 16);


More information about the dip.development mailing list