[Issue 23679] New: 2147483647 does not exceed 0x7fffffff

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 7 20:35:40 UTC 2023


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

          Issue ID: 23679
           Summary: 2147483647 does not exceed 0x7fffffff
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: kdevel at vogtner.de

$ dmd --version
DMD64 D Compiler v2.102.0
Copyright (C) 1999-2023 by The D Language Foundation, All Rights Reserved
written by Walter Bright
$ cat sizlim.d
unittest {
   ubyte [0x7fff_ffffU] arr;
   assert (true);
}
$ dmd -unittest -main -run sizlim.d
sizlim.d(2): Error: `ubyte[2147483647]` size 1 * 2147483647 exceeds 0x7fffffff
size limit for static array

Apart from that, shouldn't the wording and the position of the numerical limit
be "... exceeds the size limit <limit> for static arrays."

--


More information about the Digitalmars-d-bugs mailing list