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

Compiler screwage



In system 29.95:

When compiling the function:

(defun foo ()
  (let ((a-variable 3))
    (let ((func #'(lambda () a-variable)))
      (funcall func)
      a-variable)))

the compiler gives the warning:

<<When compiling FOO>>
Warning: A-VARIABLE declared special.

What really happens is that A-VARIABLE is declared special in FOO-INTERNAL-G0034
and not in FOO.  (The code, of course, loses because A-VARIABLE is NOT special in
FOO.)  If the compiler is not smart enough to fix this error by either passing the
variable to the internal function or declaring it special in the outer function,
it should at least print a correct warning.