Wouldn't this be better with bitfields?

Walter Bright newshound2 at digitalmars.com
Wed Jul 10 06:47:44 UTC 2024


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.



More information about the Digitalmars-d mailing list