From: Alan Mackenzie <acm@muc.de>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: acm@muc.de, Stefan Monnier <monnier@iro.umontreal.ca>,
67483@debbugs.gnu.org
Subject: bug#67483: Wrong warning position given by the byte compiler for a malformed function
Date: Mon, 4 Dec 2023 18:19:21 +0000 [thread overview]
Message-ID: <ZW4YKaewsza_bx4s@ACM> (raw)
In-Reply-To: <59773797-CC64-4352-9528-4E7593DD3C1F@gmail.com>
Hello, Mattias.
On Thu, Nov 30, 2023 at 11:37:31 +0100, Mattias Engdegård wrote:
> > Buffer bad-error-position.el:2:4: Warning: `foo' is a malformed function
> > .. This position 2:4 is wrong; it is the position of the `let' symbol.
> > The correct position would be 3:6, the position of the `if' symbol.
> (Actually the correct position would be the position of the string
> literal but of course our location tracking system is too simplistic
> for that.)
Indeed.
> Thank you for bringing this to our attention. Now I only saw this from
> the reference in your commit message; would you CC me next time?
> (Stefan, too, unless he objects.)
OK.
> I'm modifying your work a bit because we're trying to remove warnings
> from the optimiser, not entrenching them there. The warning is now in
> cconv but perhaps it should be moved to macroexp-all, it's not very
> important.
Many people consider accurate diagnostics to be very important.
> I hope being able to reshape the front-end a bit later on.
Well, I can hardly say thank you, here. You've undone the bug fix, and
the bug is there again. Did you actually test it before commiting your
change? What should I do, now? Reopen the bug and ask you actually to
fix it? Or put the fix back in again myself?
You may not like warning handling code in the optimiser, but unless you
can come up with something better, its presence there is essential to
getting good diagnostics.
> Also, we usually prefer let-binding dynamic variables to push-pop
> pairs.
We do indeed, but here binding the variable simply doesn't work. Parts
of the compiler, when they encounter errors, signal an error which gets
caught by a condition-case somewhere. This would unbind
byte-compile-form-stack before the warning handlers could get a chance
to use it.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2023-12-04 18:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 12:40 bug#67483: Wrong warning position given by the byte compiler for a malformed function Alan Mackenzie
2023-11-27 13:14 ` Eli Zaretskii
2023-11-27 13:20 ` Alan Mackenzie
2023-11-27 13:50 ` Eli Zaretskii
2023-11-27 14:01 ` Alan Mackenzie
2023-11-27 15:09 ` Eli Zaretskii
2023-11-27 15:47 ` Alan Mackenzie
2023-11-30 10:37 ` Mattias Engdegård
2023-12-04 18:19 ` Alan Mackenzie [this message]
2023-12-19 18:23 ` Mattias Engdegård
2023-12-21 12:22 ` Mattias Engdegård
2023-12-22 11:24 ` Alan Mackenzie
2023-12-22 13:12 ` Mattias Engdegård
2023-12-22 20:09 ` Alan Mackenzie
2024-01-13 14:05 ` Alan Mackenzie
2023-12-04 16:44 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <handler.67483.B.170108887925620.ack@debbugs.gnu.org>
2023-12-08 20:19 ` bug#67483: Acknowledgement (Wrong warning position given by the byte compiler for a malformed function) 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZW4YKaewsza_bx4s@ACM \
--to=acm@muc.de \
--cc=67483@debbugs.gnu.org \
--cc=mattias.engdegard@gmail.com \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).