[Issue 18290] std.conv.parse throws ConvOverflowException for negative values in hex

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18290 Iain Buclaw changed: What|Removed |Added Priority|P3 |P4 --

[Issue 18290] std.conv.parse throws ConvOverflowException for negative values in hex

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18290 Iain Buclaw changed: What|Removed |Added Priority|P1 |P3 --

[Issue 18290] std.conv.parse throws ConvOverflowException for negative values in hex

2019-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18290 --- Comment #7 from berni44 --- (In reply to Răzvan Ștefănescu from comment #6) > As long as to!string(int.min, 16) returns "8000", I expect that > parse!int("8000", 16) to return int.min. Looks like an other bug. > In conclusion, please

[Issue 18290] std.conv.parse throws ConvOverflowException for negative values in hex

2019-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18290 --- Comment #6 from Răzvan Ștefănescu --- In my opinion, you are mixing decimal math with two's complement math. Having a sign before a hexadecimal representation which already has the sign bit set is pure nonsense. Conversion between string and

[Issue 18290] std.conv.parse throws ConvOverflowException for negative values in hex

2019-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18290 --- Comment #5 from berni44 --- (In reply to Răzvan Ștefănescu from comment #4) > Just to play dumb, taking your advice to put a "-" before: > parse!int("-8000", 16) returns 0 :) OK, thanks. This makes for a much better test: --- void main() {

[Issue 18290] std.conv.parse throws ConvOverflowException for negative values in hex

2019-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18290 Răzvan Ștefănescu changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID

[Issue 18290] std.conv.parse throws ConvOverflowException for negative values in hex

2019-12-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18290 berni44 changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 18290] std.conv.parse throws ConvOverflowException for negative values in hex

2019-04-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18290 Stefan changed: What|Removed |Added CC||kde...@vogtner.de --

[Issue 18290] std.conv.parse throws ConvOverflowException for negative values in hex

2018-10-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18290 --- Comment #2 from Răzvan Ștefănescu --- (In reply to Tiberiu Lepadatu from comment #1) > (In reply to Răzvan Ștefănescu from comment #0) > > string input = "8000"; > > auto x = parse!int(input, 16); > > //ConvOverflowException > > I feel that

[Issue 18290] std.conv.parse throws ConvOverflowException for negative values in hex

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18290 Tiberiu Lepadatu changed: What|Removed |Added CC||tiberiulepadat...@gmail.com --- Comment

[Issue 18290] std.conv.parse throws ConvOverflowException for negative values in hex

2018-02-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18290 Seb changed: What|Removed |Added Keywords||bootcamp CC|