[Ecls-list] bogus warning

Juan Jose Garcia Ripoll lisp at arrakis.es
Fri Nov 5 05:10:27 UTC 2004


Julian Stecklina wrote:

>(defconstant +foo+ 12)
>(defun foo-reader ()
>  +foo+)
>...
>;;; The variable +FOO+ is undefined.
>;;; The compiler will assume this variable is a global.
>...
>Is there any particular reason for this? defvar works without
>problems.
>
It is, as you say, a bogus warning. I take note for when I commit the 
new compiler code -- which also includes code for this.

>Btw, is there a way to get constants inlined? 
>
Hmm, it only happens, currently, when the value is a number, T, NIL or a 
character. Otherwise it costs so much creating a copy of the value that 
the compiler prefers to look at the value of the symbol.

Juanjo




More information about the ecl-devel mailing list