[Issue 13634] New: Value range propogation applied incorrectly.

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Oct 18 10:49:00 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13634

          Issue ID: 13634
           Summary: Value range propogation applied incorrectly.
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: gordon.freeman.sullied at gmail.com

long a = 0;
long b = 9223372036854775807;

a = cast(double) b;
writeln(b);
writeln(a);


The results are:
b = 9223372036854775807
a = -9223372036854775808

This should not be possible.

--


More information about the Digitalmars-d-bugs mailing list