Bug 23232 – Static array limits are incorrect for -m64

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2022-07-08T08:22:34Z
Last change time
2024-12-13T19:23:44Z
Assigned to
No Owner
Creator
Luís Ferreira
Moved to GitHub: dmd#20128 →

Comments

Comment #0 by contact — 2022-07-08T08:22:34Z
Even for -m32, the static array size is limited to int.max instead of uint.max. This is a compiler backend specific issue, described here: https://github.com/dlang/dmd/pull/6503/files#diff-180f4c4ac5e6c186006f676f9b372e0cfea2c34d17d7a13ac2796565f4955d50R71 The target static array size limit should be a configurable global in order to other compiler backends accommodate their limits. For -m64, the static array size remains the same of -m32. Example code: -m32 ``` struct S { ubyte[(int.max / 2) - 1] value; } ``` -m64 ``` struct S { ubyte[(long.max / 2) - 1] value; // doesn't compile } ```
Comment #1 by robert.schadek — 2024-12-13T19:23:44Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20128 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB