Problems with shift left operator (dmd 0.169)

Lionello Lunesu lio at lunesu.remove.com
Wed Oct 11 02:49:18 PDT 2006


Frank Benoit wrote:
> http://www.digitalmars.com/d/expression.html#ShiftExpression
> It's illegal to shift by more bits than the size of the quantity being
> shifted.
> 
> That means, 32 is legal for shifting. And therefore it should evaluate
> to the correct result.
> 
> So I think the example is a bug.

I think 32 should be illegal also. It would append 32 0-bits, which 
means the result (uint) will always be 0.

L.



More information about the Digitalmars-d-learn mailing list