Bug 13931 – Missing overflow checks in `std.conv` for negative numbers which start from the most negative number digits
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-01-04T13:18:00Z
Last change time
2015-02-18T03:41:09Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
verylonglogin.reg
Comments
Comment #0 by verylonglogin.reg — 2015-01-04T13:18:48Z
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
}
---
Comment #1 by verylonglogin.reg — 2015-01-04T13:24:46Z