[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How's that again?



At  8:16 AM 94.02.01 -0500, Bob Hall wrote:
>Is the following behavior a bug, or am I blowing the declaration somehow?
>
>? (defun foo (l)
>    (dolist (x l)
>      (print "Hi")))
>;Compiler warnings :
>;   Unused lexical variable X, in FOO.

Translation: UnREAD lexical variable X, in FOO.

>FOO
>? (defun foo (l)
>    (dolist (x l)
>      (declare (ignore x))
>      (print "Hi")))
>;Compiler warnings :
>;   Variable X not ignored, in FOOm.

Translation: Variable X WRITTEN in FOO.

Try:

? (defun foo (l)
    (dolist (x l)
      (declare (ignore-if-unused x))
      (print "Hi")))
FOO
?

e