emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

integer overflow [was Re: Next pretest, and branching plans]


From: Glenn Morris
Subject: integer overflow [was Re: Next pretest, and branching plans]
Date: Fri, 05 Mar 2010 14:50:01 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Johan Bockgård 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) => 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  <monnier at iro.umontreal.ca>

    * 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]