From unknown Fri Jun 13 10:33:37 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#12369 <12369@debbugs.gnu.org> To: bug#12369 <12369@debbugs.gnu.org> Subject: Status: 24.2.50; cl-loop: variable not left unused Reply-To: bug#12369 <12369@debbugs.gnu.org> Date: Fri, 13 Jun 2025 17:33:37 +0000 retitle 12369 24.2.50; cl-loop: variable not left unused reassign 12369 emacs submitter 12369 Christopher Schmidt severity 12369 minor tag 12369 confirmed thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 06 09:15:54 2012 Received: (at submit) by debbugs.gnu.org; 6 Sep 2012 13:15:54 +0000 Received: from localhost ([127.0.0.1]:42609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T9bvx-0003Kl-Jj for submit@debbugs.gnu.org; Thu, 06 Sep 2012 09:15:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50884) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T9bvo-0003KM-LV for submit@debbugs.gnu.org; Thu, 06 Sep 2012 09:15:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9bvT-0004bw-KB for submit@debbugs.gnu.org; Thu, 06 Sep 2012 09:15:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:33907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9bvT-0004U8-F9 for submit@debbugs.gnu.org; Thu, 06 Sep 2012 09:15:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9bmh-0004YC-1u for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 09:06:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9bma-00020u-2E for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 09:06:14 -0400 Received: from ristopher.com ([146.185.21.93]:55145 helo=saturn.ch.ristopher.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9bmZ-0001yl-QC for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 09:06:07 -0400 Received: by saturn.ch.ristopher.com (Postfix, from userid 0) id C681420D4F; Thu, 6 Sep 2012 14:06:05 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ch.ristopher.com; s=mail; t=1346936765; bh=r50r0wtAcU7b0CMQ3H26cWbvdctmsKqGWXP9yV0GraM=; h=From:To:Subject:Message-ID:MIME-Version:Content-Type:Date; b=OYaS2y/lcmHttsOjU9hoHnAUF48QBt8cigHqve+P9GBRSvL+wJTD+PzQ8KA2vpnS9 itleeJ3pdWXaHeev78SsEayIfotRyLnoz27W6vRh+rk4IjfTnNueNIMMjcQytwjKla h3NO9TV4VKsIZykz1RMHaOOHkkRrqUoqMF815HHk= From: Christopher Schmidt To: bug-gnu-emacs@gnu.org Subject: 24.2.50; cl-loop: variable not left unused Message-ID: <87d31z1ets@ch.ristopher.com> Mail-Followup-To: bug-gnu-emacs@gnu.org MIME-Version: 1.0 Content-Type: text/plain Date: Thu, 6 Sep 2012 14:06:05 +0100 (BST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) severity: minor ;; -*- lexical-binding: t -*- (require 'cl-lib) (cl-loop for (rms . emacs) in nil) Byte compile this piece of code. Warning: Unused lexical variable `rms' Attempting to fix this warning by renaming rms to _rms results in another warning. Warning: variable `_rms' not left unused GNU Emacs 24.2.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2012-09-06. Christopher From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 06 11:43:37 2012 Received: (at submit) by debbugs.gnu.org; 6 Sep 2012 15:43:38 +0000 Received: from localhost ([127.0.0.1]:44349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T9eEy-0007zJ-MF for submit@debbugs.gnu.org; Thu, 06 Sep 2012 11:43:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45974) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T9eEw-0007zC-Ux for submit@debbugs.gnu.org; Thu, 06 Sep 2012 11:43:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9eEe-0004Wt-Pg for submit@debbugs.gnu.org; Thu, 06 Sep 2012 11:43:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:51112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9eEe-0004Wp-Mu for submit@debbugs.gnu.org; Thu, 06 Sep 2012 11:43:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9eEZ-00061v-VB for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 11:43:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9eEU-0004Vs-5b for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 11:43:11 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:61262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9eEU-0004Vo-13 for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 11:43:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FpYew/2dsb2JhbAA7CbBIg0mBCIIVAQEEAVYoCws0EhQYDYhABboJixiCDoMeA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="197708680" Received: from 69-165-135-176.dsl.teksavvy.com (HELO pastel.home) ([69.165.135.176]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 06 Sep 2012 11:43:04 -0400 Received: by pastel.home (Postfix, from userid 20848) id 252E158B33; Thu, 6 Sep 2012 11:43:04 -0400 (EDT) From: Stefan Monnier To: bug-gnu-emacs@gnu.org Subject: Re: bug#12369: 24.2.50; cl-loop: variable not left unused Message-ID: References: <87d31z1ets@ch.ristopher.com> Date: Thu, 06 Sep 2012 11:43:04 -0400 In-Reply-To: <87d31z1ets@ch.ristopher.com> (Christopher Schmidt's message of "Thu, 6 Sep 2012 14:06:05 +0100 (BST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) > ;; -*- lexical-binding: t -*- > (require 'cl-lib) > (cl-loop for (rms . emacs) in nil) > Byte compile this piece of code. > Warning: Unused lexical variable `rms' Yes, first bug: `emacs' is not listed as unused. > Attempting to fix this warning by renaming rms to _rms results in > another warning. > Warning: variable `_rms' not left unused Yup, second bug. This is all due to the code generated by cl-loop which was optimized to use `set' in the loop instead of `let'. This made sense for dynamically scoped code where `let' is a bit slower, but for lexically-scoped code, it's the exact opposite, so we should change the generated code from: (identity (catch '--cl-block-nil-- (let* ((--cl-var-- nil) (emacs nil) (rms nil)) (while (consp --cl-var--) (setq emacs (car --cl-var--) rms (pop emacs)) (setq --cl-var-- (cdr --cl-var--))) nil))) to (identity (catch '--cl-block-nil-- (let* ((--cl-var-- nil)) (while (consp --cl-var--) (let* ((tmp (car --cl-var--)) (emacs (car tmp)) (rms (cdr tmp))) (setq --cl-var-- (cdr --cl-var--)))) nil))) -- Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 01 03:18:41 2021 Received: (at 12369) by debbugs.gnu.org; 1 Jun 2021 07:18:41 +0000 Received: from localhost ([127.0.0.1]:35629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnyfh-0002MF-93 for submit@debbugs.gnu.org; Tue, 01 Jun 2021 03:18:41 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnyfe-0002Lx-EQ for 12369@debbugs.gnu.org; Tue, 01 Jun 2021 03:18:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=wASx4vC0cqsDz1RWjQJGTxf07zQC8Hl4AVYnTgjJGjg=; b=VdRYJa8o+TN0kUALlBK16aye4c 7kzhgxRJGGbRn1ulgUnBp0ZXMjzBdSqPwA8UBdHNYI2nMErdgl/r76Od+KMO2T7ZHQtDvR39T6iRb M0sILUxZ7g2OgQW6e5CsgmEEM1hDFOqKxvwAfHZ+e61ka+rqDGlP7G+5J6g7rMSGv3kI=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lnyfW-000542-3L; Tue, 01 Jun 2021 09:18:32 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#12369: 24.2.50; cl-loop: variable not left unused References: <87d31z1ets@ch.ristopher.com> X-Now-Playing: 75 Dollar Bill's _I Was Real_: "I. New New, II. The Worm, III Like Laundry" Date: Tue, 01 Jun 2021 09:18:29 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 06 Sep 2012 11:43:04 -0400") Message-ID: <87zgwacat6.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: >> ; ; -*- lexical-binding: t -*- >> (require 'cl-lib) >> (cl-loop for (rms . emacs) in nil) >> Byte compile this piece of code. >> Warning: Unused lexical variable `rms' > > Yes, first bug: `emacs' is [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 12369 Cc: 12369@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Stefan Monnier writes: >> ;; -*- lexical-binding: t -*- >> (require 'cl-lib) >> (cl-loop for (rms . emacs) in nil) >> Byte compile this piece of code. >> Warning: Unused lexical variable `rms' > > Yes, first bug: `emacs' is not listed as unused. This problem is still present in Emacs 28. >> Attempting to fix this warning by renaming rms to _rms results in >> another warning. >> Warning: variable `_rms' not left unused > > Yup, second bug. This one is fixed, though. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 01 03:18:43 2021 Received: (at control) by debbugs.gnu.org; 1 Jun 2021 07:18:43 +0000 Received: from localhost ([127.0.0.1]:35632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnyfj-0002MT-HD for submit@debbugs.gnu.org; Tue, 01 Jun 2021 03:18:43 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnyfi-0002M2-76 for control@debbugs.gnu.org; Tue, 01 Jun 2021 03:18:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yOdWLvkL5qD4BHA6okQsSB7Y0CO7ZraQcAS6o9eghBQ=; b=IiPH6JHYH9vrbapIV9ComUAG0+ 1V0BpKPd+yGaNkl/4DITjmUw8Y7qV7B4fFJdyMH8UtbZUiq//n1EP+/ncoE6wFCPzM6zCR8ZDt8yZ DgWYTBH73cO2TnNKuLJt6bQv56BB4wTpHjAce7tWYrmHEO7J2TxHqxsNEm/cs1y+/1q0=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lnyfa-000549-R6 for control@debbugs.gnu.org; Tue, 01 Jun 2021 09:18:36 +0200 Date: Tue, 01 Jun 2021 09:18:34 +0200 Message-Id: <87y2bucat1.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #12369 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 12369 + confirmed quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 12369 + confirmed quit From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 05 16:08:51 2021 Received: (at 12369) by debbugs.gnu.org; 5 Jun 2021 20:08:51 +0000 Received: from localhost ([127.0.0.1]:50085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpcbD-0007GT-6T for submit@debbugs.gnu.org; Sat, 05 Jun 2021 16:08:51 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpcbA-0007GB-Eq for 12369@debbugs.gnu.org; Sat, 05 Jun 2021 16:08:49 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 65F874411F0; Sat, 5 Jun 2021 16:08:42 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2F3814411EE; Sat, 5 Jun 2021 16:08:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1622923721; bh=GtVMlqzTMQD+prb0eqn9rRZJQmmrx1/acbX/0beD4mM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Ewo10uRr+vF7AooFMpGeSjsdmkEjWpNUFgJebmRTggzNU3ZBpweOT8GHJtlZrTBoD pasNGmm+yvMyotSm8vu3TTb2xMs0nR7QwWVu++Qjxi9Bm+O3dBnaIZqWhMyR0Ifamp fpzasTkLPxQykGlq8yObnCbXQKDw7Na+1x+njJEYreGKR+J82//u9/hQBh8zLjSe0n wOVO5dMQUNmH0MlirAFfowCohy8yNfmAiuxNUTVoz7ag66WOejAkoTmiNamAJ0c4OU zjMNq1mcAUxrhLzKzREl9gIE1oC9ie1Q9Fo0OX/QckZjeF/k3QX+yWJNal+hrkluOf iVRxZJyZ7Loyw== Received: from alfajor (69-196-163-239.dsl.teksavvy.com [69.196.163.239]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EC37E12022E; Sat, 5 Jun 2021 16:08:40 -0400 (EDT) From: Stefan Monnier To: Lars Ingebrigtsen Subject: Re: bug#12369: 24.2.50; cl-loop: variable not left unused Message-ID: References: <87d31z1ets@ch.ristopher.com> <87zgwacat6.fsf@gnus.org> Date: Sat, 05 Jun 2021 16:08:40 -0400 In-Reply-To: <87zgwacat6.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 01 Jun 2021 09:18:29 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.044 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12369 Cc: 12369@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>> ;; -*- lexical-binding: t -*- >>> (require 'cl-lib) >>> (cl-loop for (rms . emacs) in nil) >>> Byte compile this piece of code. >>> Warning: Unused lexical variable `rms' >> Yes, first bug: `emacs' is not listed as unused. > This problem is still present in Emacs 28. Indeed, because it *is* used internally by the code expanded from the destructuring-bind. >>> Attempting to fix this warning by renaming rms to _rms results in >>> another warning. >>> Warning: variable `_rms' not left unused >> Yup, second bug. > This one is fixed, though. Hmm... I wonder what caused this change. Stefan