unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Wellons <wellons@nullprogram.com>
To: 16206@debbugs.gnu.org
Subject: bug#16206: 24.3; Incorrect unused variable byte-compiler warning in dotimes
Date: Fri, 20 Dec 2013 16:06:38 -0500	[thread overview]
Message-ID: <87ob4bxme9.fsf@susie.zeus.nullprogram.com> (raw)


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.





             reply	other threads:[~2013-12-20 21:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20 21:06 Christopher Wellons [this message]
2013-12-23  2:48 ` bug#16206: 24.3; Incorrect unused variable byte-compiler warning in dotimes Stefan Monnier
2018-04-22 22:29   ` Juri Linkov
2018-04-23 19:09     ` Stefan Monnier
2018-04-24 19:21       ` Juri Linkov
2018-04-24 21:13         ` Stefan Monnier
2018-04-25  0:11           ` Michael Heerdegen
2018-04-25 19:31           ` Juri Linkov
2018-04-26  3:43             ` Stefan Monnier
2018-04-28 20:21               ` Juri Linkov
2020-09-30 18:31               ` bug#31232: " Lars Ingebrigtsen
2018-04-25  2:33         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ob4bxme9.fsf@susie.zeus.nullprogram.com \
    --to=wellons@nullprogram.com \
    --cc=16206@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).