Why must bitfields sum to a multiple of a byte?

Dmitry Olshansky dmitry.olsh at gmail.com
Tue Jul 31 13:41:51 PDT 2012


On 31-Jul-12 22:21, Era Scarecrow wrote:
> On Tuesday, 31 July 2012 at 17:17:43 UTC, Timon Gehr wrote:
>
>> This is obviously a mistake in the bitfield implementation. What else
>> could be concluded from the error message:
>>
>> std\bitmanip.d(76): Error: shift by 32 is outside the range 0..31
>>
>> Requesting a 32 bit or 64 bit member on the other hand is not a
>> mistake, and it is not useless, therefore the analogy breaks down.
>
>   Well curiously it was easier to fix than I thought (a line for a
> static if, and a modification of the masking)... Was there any other
> bugs that come to mind? Anything of consequence?

Great to see things moving. Could you please do a separate pull for 
bitfields it should get merged easier and it seems like a small but 
important bugfix.

-- 
Dmitry Olshansky


More information about the Digitalmars-d-learn mailing list