[Openmcl-devel] no automatic (eval-when (:compile-toplevel ...) ...) around (declaim (special ...))?
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...
More information about the Openmcl-devel