Bit operator conversions
Sergey Gromov
snake.scaly at gmail.com
Wed Apr 8 09:25:45 PDT 2009
Wed, 08 Apr 2009 12:06:48 -0400, Kagamin wrote:
> Sergey Gromov Wrote:
>
>> Mon, 06 Apr 2009 08:53:41 -0400, Kagamin wrote:
>>
>>> Is it valid for this to compile:
>>> ---
>>> ushort a(ushort b) pure nothrow
>>> { return b<<10|b; }
>>> ---
>>>
>>> And for this to not compile:
>>> ---
>>> ushort a(ushort b) pure nothrow
>>> { return b<<10; }
>>> ---
>>> ?
>>
>> They both compile with 2.026. What's your problem?
>
> Could you please check bug http://d.puremagic.com/issues/show_bug.cgi?id=2809
> with your dmd 2.026? It can be regression.
Yes the #2809 is present in 2.026.
Actually I didn't realize your example was meant to be compiled with -w
switch. Without -w it simply compiles, no problem. With -w, it fails
while I think it shouldn't.
More information about the Digitalmars-d-learn
mailing list