emacs-devel
[Top][All Lists]
Advanced

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

Re: Making --with-wide-int the default


From: Paul Eggert
Subject: Re: Making --with-wide-int the default
Date: Mon, 16 Nov 2015 15:17:15 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 11/15/2015 08:01 AM, David Kastrup wrote:
I can tell, and

git grep XINT

shows lots of assignments to variables of type int rather than
EMACS_INT.  I think that there should be macros XINT, XUINT, XEINT (for
EMACS_INT) which trigger a range error when the value does not fit the
respective range.  Possibly also XLONG and XULONG but I'm not sure we
actually have platforms where long/int are different.

There's no need XEINT etc., as this work has already been done, using macros like CHECK_TYPE_RANGED_INTEGER to make sure that XINT returns values in range for a C integer type. Also, I sometimes build Emacs with C integer overflow checking enabled, and it runs fine.

Really, integer overflow is not a significant problem with --with-wide-int. As Eli says, if it were a problem it'd also be a problem with 64-bit platforms, which it's not.



reply via email to

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