From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: scratch/accurate-warning-pos: Solid progress: the branch now bootstraps. Date: Sun, 25 Nov 2018 14:31:25 +0000 Message-ID: <20181125143125.GA27152@ACM> References: <20181117124534.GA8831@ACM> <83muq7u9rk.fsf@gnu.org> <20181123130904.GA2916@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1543157516 20279 195.159.176.226 (25 Nov 2018 14:51:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Nov 2018 14:51:56 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: michael_heerdegen@web.de, eliz@gnu.org, cpitclaudel@gmail.com, monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: "Charles A. Roelli" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 25 15:51:52 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQvlH-00058u-Pb for ged-emacs-devel@m.gmane.org; Sun, 25 Nov 2018 15:51:51 +0100 Original-Received: from localhost ([::1]:60112 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQvnN-0006SJ-WE for ged-emacs-devel@m.gmane.org; Sun, 25 Nov 2018 09:54:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQvn9-0006FW-VL for emacs-devel@gnu.org; Sun, 25 Nov 2018 09:53:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gQvUi-0005QG-Ro for emacs-devel@gnu.org; Sun, 25 Nov 2018 09:34:48 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:47752 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1gQvUi-0005Ph-I7 for emacs-devel@gnu.org; Sun, 25 Nov 2018 09:34:44 -0500 Original-Received: (qmail 78071 invoked by uid 3782); 25 Nov 2018 14:34:43 -0000 Original-Received: from acm.muc.de (p2E5D5C08.dip0.t-ipconnect.de [46.93.92.8]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 25 Nov 2018 15:34:40 +0100 Original-Received: (qmail 27157 invoked by uid 1000); 25 Nov 2018 14:31:25 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:231337 Archived-At: Hello, Charles. Thanks for trying this out! On Sun, Nov 25, 2018 at 12:26:45 +0100, Charles A. Roelli wrote: > > Date: Fri, 23 Nov 2018 13:09:05 +0000 > > From: Alan Mackenzie > > > > Although the branch works, it has been tested solely on 64-bit > > GNU/Linux, the only system I have. This despite some fairly hefty > > changes in lisp.h. > "make bootstrap" prints the following errors here on the > scratch/accurate-warning-pos branch: > CC dispnew.o > In file included from dispnew.c:27: > lisp.h: In function ‘SYMBOLP’: > lisp.h:1052: error: used struct type value where scalar is required > lisp.h: In function ‘XSYMBOL’: > lisp.h:1083: error: wrong type argument to unary exclamation mark > lisp.h: In function ‘EQ’: > lisp.h:1233: error: used struct type value where scalar is required > lisp.h:1233: error: invalid operands to binary == (have ‘Lisp_Object’ and ‘Lisp_Object’) > lisp.h:1233: error: invalid operands to binary == (have ‘Lisp_Object’ and ‘Lisp_Object’) > (This is macOS with GCC 4.2.1.) > Seems like the compiler is raising errors when the var > "Vsymbols_with_pos_enabled" (a Lisp_Object) is used in a true/false > context. Yes, indeed. I hope the following patch will fix it, and hope also there won't be too many similar bugs to fix. diff --git a/src/lisp.h b/src/lisp.h index 4dfd065629..802c9e4259 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -395,7 +395,7 @@ typedef EMACS_INT Lisp_Word; /* verify (NIL_IS_ZERO) */ #define lisp_h_EQ(x, y) ((XLI ((x)) == XLI ((y))) \ - || (Vsymbols_with_pos_enabled \ + || (XLI (Vsymbols_with_pos_enabled) \ && (SYMBOL_WITH_POS_P ((x)) \ ? BARE_SYMBOL_P ((y)) \ ? (XSYMBOL_WITH_POS((x)))->sym == (y) \ @@ -424,7 +424,7 @@ typedef EMACS_INT Lisp_Word; #define lisp_h_BARE_SYMBOL_P(x) TAGGEDP ((x), Lisp_Symbol) /* verify (NIL_IS_ZERO) */ #define lisp_h_SYMBOLP(x) ((BARE_SYMBOL_P ((x)) || \ - (Vsymbols_with_pos_enabled && (SYMBOL_WITH_POS_P ((x)))))) + (XLI (Vsymbols_with_pos_enabled) && (SYMBOL_WITH_POS_P ((x)))))) #define lisp_h_TAGGEDP(a, tag) \ (! (((unsigned) (XLI (a) >> (USE_LSB_TAG ? 0 : VALBITS)) \ - (unsigned) (tag)) \ @@ -463,7 +463,7 @@ typedef EMACS_INT Lisp_Word; /* verify (NIL_IS_ZERO) */ # define lisp_h_XSYMBOL(a) \ (eassert (SYMBOLP ((a))), \ - (!Vsymbols_with_pos_enabled \ + (!XLI (Vsymbols_with_pos_enabled) \ ? (XBARE_SYMBOL ((a))) \ : (BARE_SYMBOL_P ((a))) \ ? (XBARE_SYMBOL ((a))) \ -- Alan Mackenzie (Nuremberg, Germany).