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: [email protected]
Reporter: [email protected]
This example program generates the following assertion failure:
static assert(1000*1000*1000*1000 > 0); // Error: static assert: `-727379968
> 0` is false
It would detect bugs earlier if constant-folding/CTFE execution of
multiplication disallowed overflow.
--