From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.bugs 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 Message-ID: <20201015172533.GB20876@protected.rcdrun.com> References: <87362fy5s3.fsf@gnus.org> <20201015133426.GB20257@protected.rcdrun.com> <87362fv471.fsf@gnus.org> <831rhzxwgx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36565"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.14.0 (2020-05-02) Cc: 44014@debbugs.gnu.org, Lars Ingebrigtsen , bugs@gnu.support To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 15 19:26:15 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kT713-0009Pb-PT for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Oct 2020 19:26:13 +0200 Original-Received: from localhost ([::1]:54106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kT712-0001zp-PN for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Oct 2020 13:26:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT70s-0001zh-Mh for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2020 13:26:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44939) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kT70s-0006EE-E7 for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2020 13:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kT70s-0003ra-AB for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2020 13:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jean Louis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Oct 2020 17:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44014 X-GNU-PR-Package: emacs Original-Received: via spool by 44014-submit@debbugs.gnu.org id=B44014.160278274014821 (code B ref 44014); Thu, 15 Oct 2020 17:26:02 +0000 Original-Received: (at 44014) by debbugs.gnu.org; 15 Oct 2020 17:25:40 +0000 Original-Received: from localhost ([127.0.0.1]:56485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kT70V-0003qz-Tv for submit@debbugs.gnu.org; Thu, 15 Oct 2020 13:25:40 -0400 Original-Received: from static.rcdrun.com ([95.85.24.50]:41871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kT70U-0003qr-11 for 44014@debbugs.gnu.org; Thu, 15 Oct 2020 13:25:39 -0400 Original-Received: from localhost ([::ffff:41.202.241.58]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002A0B3D.000000005F888610.00000B10; Thu, 15 Oct 2020 17:25:36 +0000 Content-Disposition: inline In-Reply-To: <831rhzxwgx.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:190616 Archived-At: * Eli Zaretskii [2020-10-15 19:53]: > > From: Lars Ingebrigtsen > > Date: Thu, 15 Oct 2020 18:34:10 +0200 > > Cc: 44014@debbugs.gnu.org > > > > Jean Louis 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.