[Ecls-list] Compiler tries to compile C::|compiler preprocess|
Juan Jose Garcia Ripoll
lisp at arrakis.es
Thu Jun 9 11:13:43 UTC 2005
Juan Jose Garcia Ripoll wrote:
> 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:
>>
>> 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))))
> I do not know what I should do. Maybe relax the type of the variables
> whose declarations are plain wrong?
As a quick fix, I changed the LOOP macro to produce better
initialization values, so that now C is initialized with a dummy
character #\0. Your code should work now:
jlr at mpq3p32:~/src/ecls-new> ECL (Embeddable Common-Lisp) 0.9g
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help. Top level.
> (compile nil (lambda (x) (loop for c of-type character = (schar x 0))))
;;; Loading #P"/home/jlr/lib/ecl/cmp.fas"
;;; Loading #P"/home/jlr/lib/ecl/sysfun.lsp"
;;; End of Pass 1.
;;; Invoking external command: gcc -I../include -g -O2 -fPIC
-fstrict-aliasing -Dlinux -O "-I/home/jlr/lib/ecl//h" -w -c
"/tmp/ECL001H7bTp8.c" -o "/tmp/ECL001H7bTp8.o"
;;; Invoking external command: gcc -o "/tmp/ECL001H7bTp8.fas"
-L"/home/jlr/lib/ecl/" "/tmp/ECL001H7bTp8.o"
-Wl,--rpath,/home/jlr/lib/ecl/ -shared -lecl -ldl -lm -lgmp
;;; Calling the C compiler...
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3
#<compiled-function 08099af8>
More information about the ecl-devel
mailing list