C bitfields guarantees
Walter Bright
newshound2 at digitalmars.com
Sat Jul 6 23:19:36 UTC 2024
On 7/6/2024 8:54 AM, Timon Gehr wrote:
> The point was: D should actually specify more bitfield layout guarantees than
> the C standard.
I understand that. Given that any desired portable bitfield layout can be done
with minimal effort, there is no need to add more semantics to the language than
what C does.
I.e. portable not only to the associated C compiler, but to any C compiler with
8 bit chars and 32 bit ints.
Throw me an example that shows me wrong!
Personally, I would find this to be much more readable code than adding more
syntactical constructs.
More information about the Digitalmars-d
mailing list