bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44014: 28.0.50; Incorrect compilter warning that function is called


From: Jean Louis
Subject: bug#44014: 28.0.50; Incorrect compilter warning that function is called with 2 arguments
Date: Thu, 15 Oct 2020 20:25:33 +0300
User-agent: Mutt/1.14.0 (2020-05-02)

* Eli Zaretskii <eliz@gnu.org> [2020-10-15 19:53]:
> > From: Lars Ingebrigtsen <larsi@gnus.org>
> > Date: Thu, 15 Oct 2020 18:34:10 +0200
> > Cc: 44014@debbugs.gnu.org
> > 
> > Jean Louis <bugs@gnu.support> writes:
> > 
> > > Thanks. Compiler warning shows different line number, is that normal?
> > 
> > Here's a minimal case to reproduce the bug:
> > 
> > (defun bar (a)
> >   a)
> > 
> > (defun foo ()
> >   (bar 1)
> >   (bar 1 2)
> >   (bar 1))
> > 
> > It'll say that the error is on the final call to bar, not the preceding
> > line.  If I remove the first call to bar, then it puts the error on the
> > correct line.
> > 
> > Anybody know what could be causing this bug?
> 
> The byte compiler doesn't really track source lines, only sexps.  It's
> a known issue.  There was a long discussion a year or so ago, and Alan
> Mackenzie proposed a concept of a solution, but it turned out to slow
> down compilation, so I don't think people were very enthusiastic.

Maybe the warning could tell about where exactly is located the
beginning char or line of sexp.

In that particular case of mine, it brought me to wrong line, and
indicated wrong line.

If it is not tracking lines but sexps, it could, in case of multiple
lines, tell where is beginning and where is the end, and bring user to
beginning of the sexp instead into seemingly random middle.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]