GNU bug report logs - #16206
24.3; Incorrect unused variable byte-compiler warning in dotimes

Previous Next

Package: emacs;

Reported by: Christopher Wellons <wellons <at> nullprogram.com>

Date: Fri, 20 Dec 2013 21:08:01 UTC

Severity: minor

Merged with 31232, 39919, 41287

Found in versions 24.3, 26.3, 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Christopher Wellons <wellons <at> nullprogram.com>
Subject: bug#16206: closed (Re: bug#16206: 24.3; Incorrect unused variable
 byte-compiler warning in dotimes)
Date: Sat, 28 Apr 2018 20:22:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#16206: 24.3; Incorrect unused variable byte-compiler warning in dotimes

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 16206 <at> debbugs.gnu.org.

-- 
16206: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16206
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Juri Linkov <juri <at> linkov.net>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: Christopher Wellons <wellons <at> nullprogram.com>, 16206-done <at> debbugs.gnu.org
Subject: Re: bug#16206: 24.3;
 Incorrect unused variable byte-compiler warning in dotimes
Date: Sat, 28 Apr 2018 23:21:05 +0300
Version: 27.0.50

>> But without that addition the sentence makes no sense when
>> the documentation describes the RESULT argument and then
>> at the end says that "RESULT should not be used".
>
> "Its use is deprecated".

Done in f4eeb0f.

[Message part 3 (message/rfc822, inline)]
From: Christopher Wellons <wellons <at> nullprogram.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; Incorrect unused variable byte-compiler warning in dotimes
Date: Fri, 20 Dec 2013 16:06:38 -0500
When `lexical-binding' is t the byte-compiler issues an invalid warning
for `dotimes' when the optional "result" form is used. For example,
byte-compile a file with these contents.

    ;;; -*- lexical-binding: t; -*-
    (defun foo ()
      (dotimes (i 1 t) i))

Or evaluate this form.

    (let ((lexical-binding t))
      (byte-compile (lambda () (dotimes (i 1 t) i))))

Output:

    Warning: Unused lexical variable `i'

If the t is removed the warning goes away.



This bug report was last modified 4 years and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.