emacs-devel
[Top][All Lists]
Advanced

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

Re: integer overflow


From: Stefan Monnier
Subject: Re: integer overflow
Date: Fri, 05 Mar 2010 17:35:25 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

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

Indeed, I thought about it as a pure bug-fix, but it needs to be added
to the NEWS.  Can you do that and update the doc accordingly?


        Stefan




reply via email to

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