digitalmars.D.bugs - [Issue 23934] New: Literal integer multiplication overflow is
- d-bugmail puremagic.com (19/20) May 24 2023 https://issues.dlang.org/show_bug.cgi?id=23934
https://issues.dlang.org/show_bug.cgi?id=23934 Issue ID: 23934 Summary: Literal integer multiplication overflow is allowed in CTFE Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: eyal weka.io This example program generates the following assertion failure: static assert(1000*1000*1000*1000 > 0); // Error: static assert: `-7273799680` is falseIt would detect bugs earlier if constant-folding/CTFE execution of multiplication disallowed overflow. --
May 24 2023