From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 24449@debbugs.gnu.org
Subject: bug#24449: Emacs 25.1 RC2: Byte compiler reports error in wrong place.
Date: Sat, 17 Sep 2016 08:29:52 +0000 [thread overview]
Message-ID: <20160917082952.GA3410@acm.fritz.box> (raw)
In-Reply-To: <83poo34qg5.fsf@gnu.org>
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 <acm@muc.de>
> >
> > 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).
next prev parent reply other threads:[~2016-09-17 8:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-16 11:31 bug#24449: Emacs 25.1 RC2: Byte compiler reports error in wrong place Alan Mackenzie
2016-09-16 13:22 ` Eli Zaretskii
2016-09-16 13:33 ` Alan Mackenzie
2016-09-16 15:09 ` Eli Zaretskii
2016-09-16 16:08 ` Alan Mackenzie
2016-09-16 18:34 ` Alan Mackenzie
2016-09-16 19:03 ` Eli Zaretskii
2016-09-17 8:29 ` Alan Mackenzie [this message]
2016-09-17 9:35 ` Eli Zaretskii
2016-09-17 10:06 ` Andreas Schwab
2016-09-17 12:58 ` Alan Mackenzie
2016-09-17 19:56 ` Michael Heerdegen
2016-09-17 20:46 ` Alan Mackenzie
2016-09-17 20:51 ` Michael Heerdegen
2016-09-17 20:59 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160917082952.GA3410@acm.fritz.box \
--to=acm@muc.de \
--cc=24449@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.