Wouldn't this be better with bitfields?
claptrap
clap at trap.com
Wed Jul 10 08:25:17 UTC 2024
On Wednesday, 10 July 2024 at 06:47:44 UTC, Walter Bright wrote:
> On 7/9/2024 3:57 AM, claptrap wrote:
>> You have completely missed the point. Struct layout doesn't
>> change, it's fixed, it doesn't depend on what C compiler is
>> attached.
>
> I'm sorry to say, it does.
>
>
>> You could fix this by specifying the layout for D bitfields,
>> and using extern(C) when compatibility with the relevant C
>> compiler is required.
>
> I've posted in the other thread simple means to lay out
> portable bitfields. More language features are not required.
I actually replied to mike yesterday and admitted that I was
wrong, (I looked at the spec, should have done that before
opening my mouth) and that I was and idiot, not sure if it got
moderated because I was rude to myself? Or maybe mike thought I
was being sarcastic, not sure tbh.
But I was wrong, sorry.
More information about the Digitalmars-d
mailing list