From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.5 required=5.0 tests=AWL,HTML_10_20,HTML_MESSAGE, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 9E8CBBC69 for ; Thu, 29 Mar 2007 18:27:12 +0200 (CEST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.232]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2TGRB8w022877 for ; Thu, 29 Mar 2007 18:27:12 +0200 Received: by wr-out-0506.google.com with SMTP id 69so262462wra for ; Thu, 29 Mar 2007 09:27:06 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=LGoHhLarwsZUutavQ2YPAPNSUAqn+MgpOx3/P8H08ze48tKvMRA4g3rNO2mvWYHzoD84VgIm4aqfeXMmmlOq46AZtnRMBLbcmrf4ReJxpfeF4SNP1/tQmze0gxBsgV0ZT42tt0WooH6v5+bye8a4Jbyume6+5WoU+72hJr45kmA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=Uq+UHpG55tR4kjwmRNxcvf3Fb2Gt6HCetiUX/My5zcsLpbfYmupVP8MOZHEDEEd5MKcaRBn2Otk1UXjrDrGLx/5J/a9CvgHXUlfJjnpIK8zekfwzrh3jk3rpdf6y/5gpTU89/hoOcRnHkckoVIpC8Qn4IgNN27ZWV0cLvzfYg4E= Received: by 10.115.76.1 with SMTP id d1mr304742wal.1175185625510; Thu, 29 Mar 2007 09:27:05 -0700 (PDT) Received: by 10.115.55.5 with HTTP; Thu, 29 Mar 2007 09:27:05 -0700 (PDT) Message-ID: <891bd3390703290927o4e1c6bb5gf8f562fedbc70096@mail.gmail.com> Date: Thu, 29 Mar 2007 12:27:05 -0400 From: "Yaron Minsky" Sender: yminsky@gmail.com To: caml-list Subject: int_of_string bug MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_48731_4892792.1175185625425" X-Google-Sender-Auth: e8c280a7bf1a98c7 X-Miltered: at discorde with ID 460BE8DF.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; yaron:01 minsky:01 yminsky:01 bug:01 bug:01 lexer:01 lexer:01 int:01 int:01 cornell:01 caml:02 caml:02 string:02 string:02 seems:03 ------=_Part_48731_4892792.1175185625425 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_48731_4892792.1175185625425 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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
------=_Part_48731_4892792.1175185625425--