[Openmcl-devel] Compiler warnings

Gary Palter palter at clozure.com
Sun Oct 18 11:12:00 PDT 2009



On Oct 18, 2009, at 1:54 PM, Taoufik Dachraoui wrote:

>
> On Oct 18, 2009, at 7:45 PM, Tim Bradshaw wrote:
>
>>
>> On 18 Oct 2009, at 18:07, Taoufik Dachraoui wrote:
>>
>>> n the specs it is said that there is three kinds of variables:
>>> lexical, dynamic and constant,
>>> and this is the problem, it seems that the hash on SETF creates a
>>> variable that is neither
>>> lexical, nor dynamic nor constant (as show in previous
>>> submissions); So the question
>>> is what is the rational behind this hack? why the hack did not
>>> create a dynamic variable as in CMUCL?
>>
>> One of the most annoying things about SETF at the top-level in CMUCL
>> is that it does (or did) effectively declare the name as special.
>> That can have fairly pervasive and unfortunate side-effects.
>>
>> So it's a good thing it does not do this in CCL.
>>
> At the price of having a fourth kind of symbol, but this is not a big
> issue.

SETF does not create a symbol.  And there is certainly not a fourth  
type of symbol involved.

You are being confused, still, by the evaluator vs. compiler  
generating warnings.

Take the form, put it in a file and compile the file.  You'll get a  
warning that X is not declared.

[palter at Traveller ~](2)$ cat /tmp/foo.lisp
(setf x 1)
[palter at Traveller ~](3)$ dx86cl
Welcome to Clozure Common Lisp Version 1.4-dev-r13020M-trunk   
(DarwinX8632)!
? (compile-file "/tmp/foo.lisp")
;Compiler warnings for "/tmp/foo.lisp" :
;   In an anonymous lambda form at position 0: Undeclared free  
variable X
#P"/private/tmp/foo.dx32fsl"
T
T
? (load "/tmp/foo")
#P"/private/tmp/foo.dx32fsl"
? x
1

>
> All this discussions could be avoided if SETF raises an error when
> trying to bind a non
> existing symbol (it is fortunate to me because I learned a little more
> of CCL now and I
> practicied my dormant english).
>
>
> Taoufik
>
>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list