From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: integer overflow [was Re: Next pretest, and branching plans] Date: Fri, 05 Mar 2010 14:50:01 -0500 Message-ID: References: <4B8147A9.7030504@gmail.com> <87ljemdzxo.fsf@stupidchicken.com> <4B83682D.5010804@gnu.org> <87vddmpw4s.fsf@stupidchicken.com> <87hbp2fwoi.fsf@gnu.org> <87wrxrr4md.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1267819440 6344 80.91.229.12 (5 Mar 2010 20:04:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 5 Mar 2010 20:04:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 05 21:03:56 2010 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NndkZ-00080n-B8 for ged-emacs-devel@m.gmane.org; Fri, 05 Mar 2010 21:03:55 +0100 Original-Received: from localhost ([127.0.0.1]:53243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NndkY-0008WR-OH for ged-emacs-devel@m.gmane.org; Fri, 05 Mar 2010 15:03:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nndjt-0008KX-Ew for emacs-devel@gnu.org; Fri, 05 Mar 2010 15:03:13 -0500 Original-Received: from [199.232.76.173] (port=55108 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nndjs-0008K8-Ur for emacs-devel@gnu.org; Fri, 05 Mar 2010 15:03:12 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NndXf-0003Rx-Gk for emacs-devel@gnu.org; Fri, 05 Mar 2010 14:50:51 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:35438) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NndXY-0003QW-TI for emacs-devel@gnu.org; Fri, 05 Mar 2010 14:50:29 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NndX7-0003j1-W6; Fri, 05 Mar 2010 14:50:02 -0500 X-Spook: Audiotel MILSATCOM UMTS AVIP Ansar al-Islam Zachawi X-Ran: UN?wr&?rgVY?$#x~2f)Z/:~YI3t=G-Lg7_T9BhDm"k`3 X-Hue: green X-Attribution: GM In-Reply-To: <87wrxrr4md.fsf@gnu.org> ("Johan =?iso-8859-1?Q?Bockg=E5rd=22?= =?iso-8859-1?Q?'s?= message of "Fri\, 05 Mar 2010 01\:31\:22 +0100") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:121658 Archived-At: Johan Bockg=E5rd wrote: > In 2.3.1 Integer Type: > >> 1073741825 ; Also the integer 1 on a 30-bit implementation. > > In 3.1 Integer Basics: > >> 1073741825 ; Also the integer 1, due to overflow. > > When in fact (type-of 1073741825) =3D> float! > > Is this even documented? A good question. I can't see anything about this in NEWS. Might it be the following change? 2009-08-27 Stefan Monnier * lread.c (read_integer): Use doubles (and potentially return a float number) as we do in string-to-number. (read1): Use strtol to read integers, signal errors on strtol's overflow and use floats if strtol's output is too large for Elisp integers.