Anonymous | Login | Signup for a new account | 2019-02-22 21:31 CET | ![]() |
Main | My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||
0003302 | OCaml | ~DO NOT USE (was: OCaml general) | public | 2004-11-25 13:26 | 2011-05-29 12:20 | |||
Reporter | administrator | |||||||
Assigned To | ||||||||
Priority | normal | Severity | feature | Reproducibility | always | |||
Status | closed | Resolution | fixed | |||||
Platform | OS | OS Version | ||||||
Product Version | ||||||||
Target Version | Fixed in Version | 3.12.0+dev | ||||||
Summary | 0003302: Int64.of_string does not detect overflow from positive to negative ints | |||||||
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 | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||||||||||
|
![]() |
|
(0000240) administrator (administrator) 2005-02-02 17:58 |
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. |
(0005065) xleroy (administrator) 2009-08-28 11:29 |
Fixed in CVS trunk, will be in 3.12. |
![]() |
|||
Date Modified | Username | Field | Change |
2005-11-18 10:13 | administrator | New Issue | |
2008-01-22 17:04 | doligez | Relationship added | related to 0003582 |
2009-08-28 11:28 | xleroy | Relationship added | related to 0004210 |
2009-08-28 11:28 | xleroy | Relationship added | related to 0004245 |
2009-08-28 11:29 | xleroy | Note Added: 0005065 | |
2009-08-28 11:29 | xleroy | Status | acknowledged => resolved |
2009-08-28 11:29 | xleroy | Resolution | open => fixed |
2009-08-28 11:29 | xleroy | Fixed in Version | => 3.12.0+dev |
2009-08-28 11:29 | xleroy | Description Updated | |
2011-05-29 12:20 | xleroy | Status | resolved => closed |
2017-02-23 16:36 | doligez | Category | OCaml general => -OCaml general |
2017-03-03 17:55 | doligez | Category | -OCaml general => -(deprecated) general |
2017-03-03 18:01 | doligez | Category | -(deprecated) general => ~deprecated (was: OCaml general) |
2017-03-06 17:04 | doligez | Category | ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general) |
Copyright © 2000 - 2011 MantisBT Group |