From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#22288: 25.0.50; Incorrect line and column number in byte-compilation warning Date: Sat, 22 Jan 2022 18:16:58 +0000 Message-ID: References: <5686A130.1090708@live.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4958"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 22288-done@debbugs.gnu.org To: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 22 19:20:33 2022 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 1nBL05-0001Ah-Db for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Jan 2022 19:20:33 +0100 Original-Received: from localhost ([::1]:44706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nBL04-0003Lh-99 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Jan 2022 13:20:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBKxh-0000a6-Os for bug-gnu-emacs@gnu.org; Sat, 22 Jan 2022 13:18:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44919) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nBKxe-0006Wx-KY for bug-gnu-emacs@gnu.org; Sat, 22 Jan 2022 13:18:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nBKxe-0002Om-97 for bug-gnu-emacs@gnu.org; Sat, 22 Jan 2022 13:18:02 -0500 Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Jan 2022 18:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 22288 X-GNU-PR-Package: emacs Mail-Followup-To: 22288@debbugs.gnu.org, acm@muc.de, clement.pitclaudel@live.com Original-Received: via spool by 22288-done@debbugs.gnu.org id=D22288.16428754309152 (code D ref 22288); Sat, 22 Jan 2022 18:18:02 +0000 Original-Received: (at 22288-done) by debbugs.gnu.org; 22 Jan 2022 18:17:10 +0000 Original-Received: from localhost ([127.0.0.1]:37822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBKwo-0002NY-Bh for submit@debbugs.gnu.org; Sat, 22 Jan 2022 13:17:10 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:18317 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1nBKwm-0002NK-RV for 22288-done@debbugs.gnu.org; Sat, 22 Jan 2022 13:17:09 -0500 Original-Received: (qmail 74793 invoked by uid 3782); 22 Jan 2022 18:17:02 -0000 Original-Received: from acm.muc.de (p2e5d54f8.dip0.t-ipconnect.de [46.93.84.248]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 22 Jan 2022 19:17:01 +0100 Original-Received: (qmail 16838 invoked by uid 1000); 22 Jan 2022 18:16:58 -0000 Content-Disposition: inline In-Reply-To: <5686A130.1090708@live.com> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:224852 Archived-At: Hello Everybody. This bug has just been fixed in master by merging in branch scratch/correct-warning-pos. -- Alan Mackenzie (Nuremberg, Germany). On Fri, Jan 01, 2016 at 10:54:24 -0500, Clément Pit--Claudel wrote: > Hi all, > The byte-compiler doesn't always report the right line and column numbers. For example for the following program in test.el: > (defun test () > (let (a)) > a) > Running M-x byte-compile-file RET test.el RET yields: > > Compiling file /home/clement/test.el at Fri Jan 1 10:48:41 2016 > > In test: > > test.el:2:9:Warning: reference to free variable ‘a’ > The correct warning would be > > test.el:3:2:Warning: reference to free variable ‘a’ > Note that the following program gives the right error: > (defun test () > (let (b)) > a) > > test.el:3:3:Warning: reference to free variable ‘a’ > Although one might argue that it should be > > test.el:3:2:Warning: reference to free variable ‘a’ > (that is, column 2, not 3) given that Emacs starts counting columns at 0. > Cheers, > Clément. > In GNU Emacs 25.0.50.8 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) > of 2015-12-29 built on clem-w50-mint > Repository revision: a21bb238ce7bcc9c13a9cf66db77918304daa2fc > Windowing system distributor 'The X.Org Foundation', version 11.0.11501000 > System Description: Linux Mint 17.2 Rafaela