From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Making --with-wide-int the default Date: Mon, 16 Nov 2015 15:17:15 -0800 Organization: UCLA Computer Science Department Message-ID: <564A63FB.7040209@cs.ucla.edu> References: <56117F37.9060808@dancol.org> <83oag087gs.fsf@gnu.org> <83oafz70im.fsf@gnu.org> <5620AF43.4050401@cs.ucla.edu> <83k2qn6xfm.fsf@gnu.org> <5620B4FA.1000804@cs.ucla.edu> <83wptojs1r.fsf@gnu.org> <56444C66.8050506@gmx.at> <83r3jugx8g.fsf@gnu.org> <87io56nu0a.fsf@fencepost.gnu.org> <83lha1dl87.fsf@gnu.org> <871tbrmeu3.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1447722155 31102 80.91.229.3 (17 Nov 2015 01:02:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Nov 2015 01:02:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 17 02:02:24 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZyUeZ-00044B-3E for ged-emacs-devel@m.gmane.org; Tue, 17 Nov 2015 02:01:47 +0100 Original-Received: from localhost ([::1]:53870 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyUeY-0001p6-FD for ged-emacs-devel@m.gmane.org; Mon, 16 Nov 2015 20:01:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyT1V-0007hI-QD for emacs-devel@gnu.org; Mon, 16 Nov 2015 18:17:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyT1V-0001UN-0F for emacs-devel@gnu.org; Mon, 16 Nov 2015 18:17:21 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:39248) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyT1Q-0001TB-UK; Mon, 16 Nov 2015 18:17:17 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 0DF071601AA; Mon, 16 Nov 2015 15:17:16 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Oec1RlBAbhKE; Mon, 16 Nov 2015 15:17:15 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5B2C51601BE; Mon, 16 Nov 2015 15:17:15 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id aUe7kC6JAc2h; Mon, 16 Nov 2015 15:17:15 -0800 (PST) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 4187D1601AA; Mon, 16 Nov 2015 15:17:15 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: <871tbrmeu3.fsf@fencepost.gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:194607 Archived-At: 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.