[Ecls-list] Compiler tries to compile C::|compiler preprocess|
Juan Jose Garcia Ripoll
jlr at mpq.mpg.de
Thu Jun 9 10:51:22 UTC 2005
Goffioul Michael wrote:
>>I wanted to try out the documentation system ALBERT
>>(http://albert.sourceforge.net).
>>When compiling the file apispec/xml-base.lisp, the compiler
>>failed with a strange message:
>>
>>[...]
>>;;; Emitting code for XMLIFY-STRING.
>>;;; Compiling C::|compiler preprocess|.
>>;;; Error: Unable to coerce lisp object from type (NULL,:OBJECT)
>>to C/C++ type (CHARACTER,:CHAR)
>>[...]
>>
>>
>Looking more deeply, I found a way to reproduce it:
>
>>compile nil (lambda (x) (loop for c of-type character = (schar x 0))))
>>
>>
Also this triggers the error:
(compile nil '(lambda (x)
(LET ((C NIL))
(DECLARE (TYPE CHARACTER C))
(SETQ C (SCHAR X 0))
(print c))))
The problem is that C is declared to be of type character but it is
initially bound with an object NIL of type NULL. ECL tries to create a C
character variable because of the declaration, but when it reaches the
beginning of the LET it fails.
I do not know what I should do. Maybe relax the type of the variables
whose declarations are plain wrong?
Juanjo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jlr.vcf
Type: text/x-vcard
Size: 389 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20050609/0f12855f/attachment.vcf>
More information about the ecl-devel
mailing list