4 ms·
The entire placement of bitfields is implementation defined. So yeah, the placement in memory might be `xxxxx000 00000000 yyyyyyy0` but it could also be `yyyyy
by suprjami 4y ago
The entire placement of bitfields is implementation defined.
So yeah, the placement in memory might be `xxxxx000 00000000 yyyyyyy0` but it could also be `yyyyyyy0 00000000 xxxxx000` or `yyyyyyy0 00000000 00000000 xxxxx000` or anything else.
Bitfields are very misunderstood and really only safe to treat as an ADT with access through their named API, not their bit placement ABI. People misuse them a lot.