Version française
Home     About     Download     Resources     Contact us    
Browse thread
int_of_string bug
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Yaron Minsky <yminsky@c...>
Subject: int_of_string bug
So, there's a weird int_of_string bug where positive decimal numbers are
sometimes read in as negative numbers without error.  Here's the bug:

http://caml.inria.fr/mantis/view.php?id=0004210

This has been marked as "wontfix" in the bug database because apparently
there's some weird spot in the lexer that depends on the wrong behavior of
int_of_string.

First of all, people should be aware of this behavior and should defend
against it in their code.  Secondly, the justification for not fixing it
seems really thin.  The behavior seems obviously wrong, and it's hard to see
why one wouldn't simply fix the lexer (perhaps by providing an alternate
broken implementation of int_of_string) and leave the ordinary int_of_string
where it is.

y