| Anonymous | Login | Signup for a new account | 2013-05-23 14:08 CEST | ![]() |
| 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 | 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 | ||||||||
Relationships |
||||||||||||||||
|
||||||||||||||||
Notes |
|
|
(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. |
Issue History |
|||
| 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 |
| Copyright © 2000 - 2011 MantisBT Group |