https://issues.dlang.org/show_bug.cgi?id=13931
Issue ID: 13931
Summary: Missing overflow checks in `std.conv` for negative
numbers which start from the most negative number
digits
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: wrong-code
Severity: normal
Priority: P1
Component: Phobos
Assignee: [email protected]
Reporter: [email protected]
This program doesn't throw but should:
---
import std.conv, std.stdio;
void main()
{
writeln("-21474836480".to!int()); // should throw
writeln("-92233720368547758080".to!long()); // should throw
}
---
--