[Issue 11612] New: Inconsistent error on negative new array size

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 26 18:52:20 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11612

           Summary: Inconsistent error on negative new array size
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: yebblies at gmail.com


--- Comment #0 from yebblies <yebblies at gmail.com> 2013-11-27 13:52:17 EST ---
This program

void main()
{
    auto x = new int[-1];
}

compiles with no error with -m32, but with -m64 gives this error:

testx.d(4): Error: negative array index 18446744073709551615LU

This should behave the same on both platforms, one way or the other

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list