From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Making --with-wide-int the default Date: Sun, 15 Nov 2015 21:42:24 +0100 Message-ID: <87pozbkn9r.fsf@fencepost.gnu.org> References: <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> <83pozbcaxi.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1447709102 29206 80.91.229.3 (16 Nov 2015 21:25:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Nov 2015 21:25:02 +0000 (UTC) Cc: rudalics@gmx.at, jwiegley@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 16 22:25:01 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 1ZyRGm-0002fa-VV for ged-emacs-devel@m.gmane.org; Mon, 16 Nov 2015 22:25:01 +0100 Original-Received: from localhost ([::1]:49751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyRGl-000586-WC for ged-emacs-devel@m.gmane.org; Mon, 16 Nov 2015 16:25:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zy4GE-0005ar-BP for emacs-devel@gnu.org; Sun, 15 Nov 2015 15:50:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zy4GD-0000LZ-BJ for emacs-devel@gnu.org; Sun, 15 Nov 2015 15:50:54 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zy4G9-0000Kw-Ay; Sun, 15 Nov 2015 15:50:49 -0500 Original-Received: from localhost ([127.0.0.1]:50240 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1Zy4G1-0008UT-KI; Sun, 15 Nov 2015 15:50:41 -0500 Original-Received: by lola (Postfix, from userid 1000) id 29F9BDFA96; Sun, 15 Nov 2015 21:42:24 +0100 (CET) In-Reply-To: <83pozbcaxi.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 15 Nov 2015 21:36:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:194562 Archived-At: Eli Zaretskii writes: >> From: David Kastrup >> Cc: rms@gnu.org, rudalics@gmx.at, emacs-devel@gnu.org, jwiegley@gmail.com >> Date: Sun, 15 Nov 2015 17:01:40 +0100 >> >> Here is another data point: the code base seems woefully unprepared to >> actually deal with the resulting ranges. >> >> Lisp integers are only converted with macros XINT and XFASTINT as far as >> I can tell, and >> >> git grep XINT >> >> shows lots of assignments to variables of type int rather than >> EMACS_INT. > > If these are real problems, they should have bitten us long ago, in > the 64-bit builds, no? Why? They'll only trigger for cases that exceed a range of 32 bits, and if those cases were other than rare, they'd have rendered the 32-bit builds (which work with 30-bit precision) unusable. However, we never previously had the case that a number which looks fine in Lisp does not transfer into C properly. > There were, indeed, such problems, which prevented using buffers > larger than 2GB, but they were solved long ago, when a significant > portion of our users moved to 64-bit machines. > >> 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. > > Could be a valuable debugging aid, I think. Well, it's probably worth checking what Guilemacs' idea about XINT is since Guile _does_ seamlessly degrade into arbitrary precision integers when exceeding integer precision. So much of the work for supporting arbitrary integers (and converting from Guile/Elisp integers to C integers and back) should probably be in the Guilemacs branch already and there'd be little point in reinventing it separately. -- David Kastrup