From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Thoughts on getting correct line numbers in the byte compiler's warning messages Date: Sun, 11 Nov 2018 17:53:13 +0200 Message-ID: <83k1lja9w6.fsf@gnu.org> References: <20181106151143.GB4030@ACM> <20181107170036.GA4934@ACM> <20181107184708.GB4934@ACM> <20181108140843.GB5041@ACM> <20181108221311.GD5041@ACM> <20181111125945.GA6487@ACM> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1541951552 2225 195.159.176.226 (11 Nov 2018 15:52:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2018 15:52:32 +0000 (UTC) Cc: michael_heerdegen@web.de, monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 11 16:52:27 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 1gLs2F-0000TY-QS for ged-emacs-devel@m.gmane.org; Sun, 11 Nov 2018 16:52:27 +0100 Original-Received: from localhost ([::1]:42735 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLs4M-0003uj-9v for ged-emacs-devel@m.gmane.org; Sun, 11 Nov 2018 10:54:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLs3M-0003rl-Oa for emacs-devel@gnu.org; Sun, 11 Nov 2018 10:53:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLs3C-0006w1-1c for emacs-devel@gnu.org; Sun, 11 Nov 2018 10:53:33 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLs3A-0006uX-5M; Sun, 11 Nov 2018 10:53:24 -0500 Original-Received: from [176.228.60.248] (port=3423 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gLs39-00031C-0u; Sun, 11 Nov 2018 10:53:24 -0500 In-reply-to: <20181111125945.GA6487@ACM> (message from Alan Mackenzie on Sun, 11 Nov 2018 12:59:45 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:231074 Archived-At: > Date: Sun, 11 Nov 2018 12:59:45 +0000 > From: Alan Mackenzie > Cc: Michael Heerdegen , emacs-devel@gnu.org > > I've now got this working, and created the new, optimistically named, > branch /scratch/accurate-warning-pos. Thanks. +/* Return a new located symbol with the specified SYMBOL and LOCATION. */ +Lisp_Object +build_located_symbol (Lisp_Object symbol, Lisp_Object location) +{ I'd prefer something like symbol_with_pos instead, and accordingly in other related symbol names. +DEFUN ("only-symbol-p", Fonly_symbol_p, Sonly_symbol_p, 1, 1, 0, + doc: /* Return t if OBJECT is a symbol, but not a located symbol. */ + attributes: const) + (Lisp_Object object) symbol-bare-p? + DEFVAR_LISP ("located-symbols-enabled", Vlocated_symbols_enabled, + doc: /* Non-nil when "located symbols" can be used in place of symbols. What is the rationale for this variable? diff --git a/src/lisp.h b/src/lisp.h index eb67626..b4fc6f2 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -323,6 +323,64 @@ typedef union Lisp_X *Lisp_Word; typedef EMACS_INT Lisp_Word; #endif +/* A Lisp_Object is a tagged pointer or integer. Ordinarily it is a + Lisp_Word. However, if CHECK_LISP_OBJECT_TYPE, it is a wrapper + around Lisp_Word, to help catch thinkos like 'Lisp_Object x = 0;'. + + LISP_INITIALLY (W) initializes a Lisp object with a tagged value + that is a Lisp_Word W. It can be used in a static initializer. */ Looks like you moved a large chunk of lisp.h to a different place in the file. Any reasons for that? +/* FIXME!!! 2018-11-09. Consider using lisp_h_PSEUDOVECTOR here. */ What is this FIXME about? This needs support in src/.gdbinit and documentation. Thanks again for working in this.