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
Comment #2 by github-bugzilla — 2015-01-11T17:48:19Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/d1783bbbc3090582f1496a76fd4589911f6f0874 Issue 13931 - Missing overflow checks in `std.conv` for negative numbers which start from the most negative number digits Issue URL: https://issues.dlang.org/show_bug.cgi?id=13931 https://github.com/D-Programming-Language/phobos/commit/8e114db58ff207ac1d27f48a2e52948d0b312a87 Merge pull request #2840 from denis-sh/fix-Issue-13931 Issue 13931 - Missing overflow checks in `std.conv` for negative numbers which start from the most negative number digits
Comment #3 by github-bugzilla — 2015-02-18T03:41:09Z
Commits pushed to 2.067 at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/d1783bbbc3090582f1496a76fd4589911f6f0874 Issue 13931 - Missing overflow checks in `std.conv` for negative numbers which start from the most negative number digits https://github.com/D-Programming-Language/phobos/commit/8e114db58ff207ac1d27f48a2e52948d0b312a87 Merge pull request #2840 from denis-sh/fix-Issue-13931