Subject: bug#71120: closed (Re: bug#71120: 29.3; buglet in cl-loop)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 01 Mar 2025 02:21:02 +0000

Your bug report

#71120: 29.3; buglet in cl-loop

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
71120: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71120
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#71120: 29.3; buglet in cl-loop
From: Stefan Kangas <[email-masked]>
To: Mattias Engdegård <[email-masked]>
Cc: [email-masked], Philip Kaludercic <[email-masked]>, Andrea Corallo <[email-masked]>, Stefan Monnier <[email-masked]>, Philippe Schnoebelen <[email-masked]>
Date: Fri, 28 Feb 2025 18:20:08 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Mattias Engdegård <[email-masked]> writes:

> 3 juni 2024 kl. 17.24 skrev Andrea Corallo <[email-masked]>:
>
>> Okay so I guess we can keep this bug open as a reminder for this?
>
> Thank you, but there's no need for that as far as I'm concerned.

I'm therefore closing this bug report.

Subject: 29.3; buglet in cl-loop
From: Philippe Schnoebelen <[email-masked]>
To: [email-masked]
Date: Wed, 22 May 2024 10:43:36 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

When I need a list of 100 random dice throws I write

	(cl-loop for i from 1 to 100 collect (random 6))

It compiles just fine.

If instead I use

	(cl-loop for _i from 1 to 100 collect (random 6))

then I get a compilation warning:

	foo.el:1:18: Warning: variable ‘_i’ not left unused

It should be the other way around.

The variable 'i' is unused in the first form and that deserves a warning 
at compile time. Otherwise the compiler will not help me catch the typo in

	(cl-loop for i from 0 to 10 do
	   (cl-loop for j from 0 to 10 do
	      (foo j j))) ;; <<<=== typo, I meant (foo i j)

--ph.schnoebelen, happy and thankful GNU Emacs user since 1983 (Thanks 
to all involved!!)