www.digitalmars.com         C & C++   DMDScript  

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

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 puremagic.com
          Reporter: john.loughran.colvin 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.

--
Dec 09 2014