From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#24449: Emacs 25.1 RC2: Byte compiler reports error in wrong place. Date: Sat, 17 Sep 2016 08:29:52 +0000 Message-ID: <20160917082952.GA3410@acm.fritz.box> References: <20160916113124.GB3630@acm.fritz.box> <83wpic3rpb.fsf@gnu.org> <20160916133352.GC3630@acm.fritz.box> <83twdf51al.fsf@gnu.org> <20160916183451.GE3630@acm.fritz.box> <83poo34qg5.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1474101088 1147 195.159.176.226 (17 Sep 2016 08:31:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 17 Sep 2016 08:31:28 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: 24449@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 17 10:31:24 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1blB1q-0007Kq-QS for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Sep 2016 10:31:18 +0200 Original-Received: from localhost ([::1]:45226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blB1p-0001It-2J for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Sep 2016 04:31:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blB1d-0001HT-PL for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2016 04:31:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1blB1a-0003NL-H6 for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2016 04:31:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blB1a-0003NH-EA for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2016 04:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1blB1a-0001rs-8u for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2016 04:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Sep 2016 08:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24449 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24449-submit@debbugs.gnu.org id=B24449.14741010207118 (code B ref 24449); Sat, 17 Sep 2016 08:31:02 +0000 Original-Received: (at 24449) by debbugs.gnu.org; 17 Sep 2016 08:30:20 +0000 Original-Received: from localhost ([127.0.0.1]:33693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1blB0t-0001qj-O0 for submit@debbugs.gnu.org; Sat, 17 Sep 2016 04:30:19 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:18227) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1blB0r-0001qZ-Lj for 24449@debbugs.gnu.org; Sat, 17 Sep 2016 04:30:18 -0400 Original-Received: (qmail 41474 invoked by uid 3782); 17 Sep 2016 08:30:16 -0000 Original-Received: from acm.muc.de (p4FC46536.dip0.t-ipconnect.de [79.196.101.54]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 17 Sep 2016 10:30:15 +0200 Original-Received: (qmail 3735 invoked by uid 1000); 17 Sep 2016 08:29:52 -0000 Content-Disposition: inline In-Reply-To: <83poo34qg5.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:123395 Archived-At: Hello, Eli. On Fri, Sep 16, 2016 at 10:03:54PM +0300, Eli Zaretskii wrote: > > Date: Fri, 16 Sep 2016 18:34:51 +0000 > > Cc: 24449@debbugs.gnu.org > > From: Alan Mackenzie > > > > Comments? > Please perform a full bootstrap and compare the warning messages > before and after the change. Then tell what you found. This was actually very interesting. I've never really looked at warning messages all that closely before. Here's what I saw: 1. The column numbers of all positions are irritatingly 1-based, so are 1 off from the column number displayed in Emacs's mode line. 2. Most of the warnings are "foo is an obsolete function", for which the position given is only vaguely in the same area as the offending function, both with and without the change. It seems that for this warning, `byte-compile-set-symbol-position' is not being called at all. As an example of where the positions in the warnings differ: (Before change): emulation/viper.el:986:44:Warning: `interactive-p' is an obsolete function (as of 23.2); use `called-interactively-p' instead. (After change): emulation/viper.el:1023:69:Warning: `interactive-p' is an obsolete function (as of 23.2); use `called-interactively-p' instead. The actual occurrence of `interactive-p' is at 937:15. Both of the positions given are at occurrences of the symbol `vi-state'. It is perhaps a little worrying that the output positions are both beyond the actual position, suggesting that some call of `byte-compile-set-symbol-position' has already moved the position too far before this warning gets generated. 3. Most of the other warnings actually output were similarly vague in their positions. This includes warnings generated by packages other than the byte compiler, e.g. cedet. 4. The three "free variable" warnings' inaccurate positions (before change) were given accurate positions (after change). As well as the occurrence in cc-engine.el, we have: (Before change): org/org.el:12842:19:Warning: assignment to free variable `e' org/org.el:12842:19:Warning: reference to free variable `e (After change): org/org.el:12840:20:Warning: assignment to free variable `e' org/org.el:12840:20:Warning: reference to free variable `e' 5. The change I made yesterday appears not to have made anything any worse. ========================================================================= What I would suggest should get done: we should make the column numbers 0-based; suitable places to call `byte-compile-set-symbol-position' for the error messages we see should be identified, the calls inserted, and another bootstrap build done to see how much this helps. > Thanks. -- Alan Mackenzie (Nuremberg, Germany).