You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3302 Reporter: administrator Status: closed (set by @xavierleroy on 2011-05-29T10:20:30Z) Resolution: fixed Priority: normal Severity: feature Fixed in version: 3.12.0+dev Category: ~DO NOT USE (was: OCaml general) Related to:#3582#4210#4245 Monitored by: jm
Bug description
Messieurs,
I would have expected Int64.of_string to detect overflow when an
apparently positive string produces a negative integer:
: nr@toller 11359 ; ocaml
Objective Caml version 3.08.1
Int64.of_string "9223372036854775808";;
: int64 = -9223372036854775808L
Norman
The text was updated successfully, but these errors were encountered:
Proposed behavior for int_of_string would be good. However, integer literals in
source code are read as '-' followed by a positive integer converted with
int_of_string. Hence the latter must not fail on 2^(N-1), otherwise - 2^(N-1)
cannot be represented. One possibility would be to use conversions other than
int_of_string et al in the lexer.
Original bug ID: 3302
Reporter: administrator
Status: closed (set by @xavierleroy on 2011-05-29T10:20:30Z)
Resolution: fixed
Priority: normal
Severity: feature
Fixed in version: 3.12.0+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #3582 #4210 #4245
Monitored by: jm
Bug description
Messieurs,
I would have expected Int64.of_string to detect overflow when an
apparently positive string produces a negative integer:
: nr@toller 11359 ; ocaml
Objective Caml version 3.08.1
Int64.of_string "9223372036854775808";;
Norman
The text was updated successfully, but these errors were encountered: