Bug in shifting

Daniel Kozak kozzi11 at gmail.com
Fri Dec 14 00:32:49 UTC 2018


I do not understand you?
What is wrong? It works ok.
https://run.dlang.io/is/ZFf0FQ

What do you mean by D required breaks for cases?

On Fri, Dec 14, 2018 at 1:20 AM Michelle Long via Digitalmars-d-learn <
digitalmars-d-learn at puremagic.com> wrote:

> byte x = 0xF;
> ulong y = x >> 60;
>
> Does not compute the proper value.
>
> It seems that the shift amount is wrapped. My code is more
> complex. The code above does give an error. I am using the code
> in a template. If I change x to ulong it works as expected.
>
> I've noticed the compiler is not throwing up errors and warnings
> like it used to:
>
> I thought D required breaks for cases? Seems it doesn't any
> longer! I'm only using -g -gf -d
>
>
> DMD64 D Compiler v2.083.0
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20181214/ee8c8d65/attachment-0001.html>


More information about the Digitalmars-d-learn mailing list