[Openmcl-devel] Compiler warnings
Stas Boukarev
stassats at gmail.com
Fri Oct 16 11:17:03 PDT 2009
Taoufik Dachraoui <taoufik.dachraoui at wanadoo.fr> writes:
> I tried the following and I got a compiler warning, is this normal? if
> not what is the problem
>
> PS: my .ccl-init.lisp is empty
>
> taoufik-dachraouis-imac:cl-cairo2 taoufik$ ccl
> Welcome to Clozure Common Lisp Version 1.3-r11936 (DarwinX8632)!
> ? (setf x '(a b c))
> (A B C)
> ? (pop x)
> ;Compiler warnings :
> ; In an anonymous lambda form: Undeclared free variable X (3
> references)
> A
> ? (pprint (macroexpand-1 '(pop x)))
>
> (PROG1 (CAR X) (SETQ X (CDR (THE LIST X))))
> ? (PROG1 (CAR X) (SETQ X (CDR (THE LIST X))))
> ;Compiler warnings :
> ; In an anonymous lambda form: Undeclared free variable X (3
> references)
> B
> ? x
> (C)
> ?
X is indeed undeclared, you have to set it with defvar or defparameter
(or declaim it special).
--
With best regards, Stas.
More information about the Openmcl-devel
mailing list