English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2007-03-29 (16:27)
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:


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

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.