[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15326: 24.3; Incorrect "variable not left unused" in destructuring c
bug#15326: 24.3; Incorrect "variable not left unused" in destructuring cl-loop
Wed, 11 Sep 2013 00:47:54 -0400
Notmuch/0.16 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu)
Stefan Monnier <address@hidden> writes:
> A `setq' does not *use* a variable. It just sets it, affecting
> later uses.
I mean that the compiler counts the setq as a use even in this simple
(setq _ t))
;; Warning: variable `_' not left unused
> If there's no later uses, the setq is just a no-op.
Without bothering to dig into the bytecode for it, it seems that the
compiler is still emitting code for the setq:
(defun foo ()
(setq _ t)))
(defun bar ()
(equal (byte-compile 'foo)
;; => nil
Maybe I'm not understanding what you mean by "no-op" here.