[Issue 13842] New: Can't write integer minimums literals long-hand.

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Dec 9 04:40:52 PST 2014


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

          Issue ID: 13842
           Summary: Can't write integer minimums literals long-hand.
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: john.loughran.colvin at gmail.com

The compiler is being clever and erroring out saying that there's signed
overflow, because it can't see that -9223372036854775808L is a valid long. It
appears to apply the check before considering the minus sign.

Obviously you can just use long.min, so it's only a minor annoyance.

--


More information about the Digitalmars-d-bugs mailing list