C bitfields guarantees
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Fri Jul 5 14:18:43 UTC 2024
On 05/07/2024 9:42 PM, Timon Gehr wrote:
> On 7/5/24 11:13, Timon Gehr wrote:
>> ...
>> It could also put both in separate 4-byte integers.
>
> Actually no, this is one of the few things it cannot do. I got a bit too
> excited there. Anyway, the point stands.
Oh oh no, you are so right, I was applying the type there that I
shouldn't have been.
Don't read the C standard after you've been awake more than 12 hour folks!
However in saying that, the point that we can mitigate it using a
dscanner warning does still stand. Therefore my original post stating I
withdraw my concerns is valid.
The only problem is it'll be word size specific and alignment specific
check now.
I hate every bit that we need to make such a specific mitigation for
what amounts to a brand new feature. It is quite frankly ridicules to
need a _mitigation_ for this.
More information about the Digitalmars-d
mailing list