C bitfields guarantees
cc
cc at nevernet.com
Sun Jul 7 02:22:25 UTC 2024
On Friday, 5 July 2024 at 05:37:50 UTC, Richard (Rikki) Andrew
Cattermole wrote:
> Today many people have spent some time to try and understand
> Walter's belief that C is "good enough" for bit fields in terms
> of guarantees.
Can I define my D struct using bitfields, and then correctly
unpack them in a GLSL shader using bitfieldExtract() with the
predicted offsets and sizes? If the answer is no, then that
bitfield implementation belongs in a garbage can.
Currently the answer to this question is "yes" for std.bitmanip
and "no" for "native" D bitfields.
More information about the Digitalmars-d
mailing list