unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16206: 24.3; Incorrect unused variable byte-compiler warning in dotimes
@ 2013-12-20 21:06 Christopher Wellons
  2013-12-23  2:48 ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Wellons @ 2013-12-20 21:06 UTC (permalink / raw)
  To: 16206


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.





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-09-30 18:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-20 21:06 bug#16206: 24.3; Incorrect unused variable byte-compiler warning in dotimes Christopher Wellons
2013-12-23  2:48 ` 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

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).