[Openmcl-devel] no automatic (eval-when (:compile-toplevel ...) ...) around (declaim (special ...))?

Dorai Sitaram ds26gte at yahoo.com
Thu Apr 30 07:56:08 PDT 2009


I was trying to compile-file a bunch of related files in sequence (from within a single PROGN say), and it does not seem like declaring a special variable *var* via (declaim (special *var*)) in an earlier file makes it visible at compile-time to a later file.  I.e., I get an "Undeclared free variable *VAR*" diagnostic when the later file is compiled, if it does something like (let ((*var* ...)) ...).   

Once I wrap the declaim inside an explicit eval-when, the diagnostic goes away, so it isn't a big deal, but then I don't see the point of (declaim (special *var*)) over a simple (defvar *var*).

Is this correct, acceptable, or even desired behavior?  The Clozure behavior in this case doesn't seem to be matched in other CLs, e.g. SBCL.



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20090430/b028e51c/attachment.htm>


More information about the Openmcl-devel mailing list