From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA19638; Fri, 31 Oct 2003 18:39:41 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA19614 for ; Fri, 31 Oct 2003 18:39:40 +0100 (MET) Received: from qrnik.knm.org.pl (paf87.warszawa.sdi.tpnet.pl [217.96.225.87]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h9VHdc129219; Fri, 31 Oct 2003 18:39:38 +0100 (MET) Received: from qrnik ([192.168.0.1] ident=qrczak) by qrnik.knm.org.pl with esmtp (Exim 3.36 #1) id 1AFdFI-0007fj-00; Fri, 31 Oct 2003 18:39:36 +0100 Subject: Re: [Caml-list] Int overflow in literals From: "Marcin 'Qrczak' Kowalczyk" To: Xavier Leroy Cc: caml-list@inria.fr In-Reply-To: <20031031174215.A17345@pauillac.inria.fr> References: <1067522012.5880.6.camel@qrnik> <20031031174215.A17345@pauillac.inria.fr> Content-Type: text/plain; charset=iso-8859-2 Message-Id: <1067621975.27855.6.camel@qrnik> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 31 Oct 2003 18:39:36 +0100 Content-Transfer-Encoding: quoted-printable X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 marcin:01 'qrczak':01 kowalczyk:01 qrczak:01 pisze:01 inclined:01 negation:01 marcin:01 kowalczyk:01 qrczak:01 int:01 int:01 knm:01 knm:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk W li=B6cie z pi=B1, 31-10-2003, godz. 17:42, Xavier Leroy pisze: > Based on the comments posted so far on this list, and on a quick > discussion with colleagues, I'm inclined toward the third approach > (int_of_string fails in case of overflow). Great! > Does anyone know of a use scenario where this new behavior of > int_of_string would be a problem? I know one, assuming literals in source would be parsed by int_of_string: writing the -0x40000000 literal. Some languages explicitly say that it's permissible to write their maxint+1 value as a literal only as a direct application of negation. --=20 __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners