bit fields

Johan j at j.nl
Mon Aug 30 10:40:34 UTC 2021


On Sunday, 29 August 2021 at 15:09:14 UTC, Iain Buclaw wrote:
> On Sunday, 29 August 2021 at 07:57:11 UTC, Johan wrote:
>> On Saturday, 28 August 2021 at 08:20:25 UTC, Walter Bright 
>> wrote:
>>> I have been working on implementing bit fields for #ImportC, 
>>> with invaluable help from Iain.
>>>
>>> And I've learned an unexpected lesson. Bit fields with DMC 
>>> and Microsoft VC are simple. Bit fields on clang and gcc are 
>>> complicated and messy. I've had a hard time duplicating that 
>>> behavior.
>>
>> A link to an article that demonstrates what kind of 
>> complexities are involved: 
>> http://jkz.wtf/bit-field-packing-in-gcc-and-clang
>>
>> -Johan
>
> I see more tests that can be added to the testsuite. ;-)

I think it's worthwhile to create a random testcase generator and 
let it run (+ execute the test) for a day or two...

-Johan



More information about the Digitalmars-d mailing list