Hey, list,<br><br>I only did a cursory search through the bug tracker and list archive so sorry if this is a known issue...<br><br>Compilation of functions that contain type declarations of unions which omit `type' from the car of the declaration appear not to work in ecl-0.9{i,j,k} (I pulled k from git on 7-10-2008). E.g (declare (type (or type1 type2) var)) seems to work fine, but without the `type': (declare ((or type1 type2) var)) signals an error on compile. This comes up if you want to build Alexandria. I didn't know it was valid CL to drop the `type', but after looking at the spec, it seems that it is. See the (attempted) compilation of FUNC2 below.<br>
<br>smithzv@marco:~$ rlwrap ecl -norc<br>ECL (Embeddable Common-Lisp) 0.9k (CVS 2008-06-19 17:09)<br>Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya<br>Copyright (C) 1993 Giuseppe Attardi<br>Copyright (C) 2000 Juan J. Garcia-Ripoll<br>
ECL is free software, and you are welcome to redistribute it<br>under certain conditions; see file 'Copyright' for details.<br>Type :h for Help. Top level.<br>> (defun func1 (x) (declare (type (or fixnum null) x)) x)<br>
FUNC1<br>> (compile 'func1)<br>;;; Loading #P"/home/smithzv/usr/lib/ecl/cmp.fas"<br>;;; Loading #P"/home/smithzv/usr/lib/ecl/sysfun.lsp"<br>;;; End of Pass 1. <br>;;; Note: Replacing variable G123 by its value<br>
;;; Calling the C compiler... <br>;;; Note: Invoking external command:<br>;;; gcc -D_GNU_SOURCE -g -O2 -fPIC -Dlinux -O "-I/home/smithzv/usr/include/" -w -c "/home/smithzv/ECL001VBe9Ah.c" -o "/home/smithzv/ECL001VBe9Ah.o"<br>
;;; Note: Invoking external command:<br>;;; gcc -o "/home/smithzv/ECL001VBe9Ah.fas" -L"/home/smithzv/usr/lib/" "/home/smithzv/ECL001VBe9Ah.o" -shared -lecl -ldl -lm -lgmp<br>;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0<br>
FUNC1<br>NIL<br>NIL<br>> (func1 5)<br>5<br>> (defun func2 (x) (declare ((or fixnum null) x)) x)<br>FUNC2<br>> (func2 5)<br>5<br>> (compile 'func2)<br>Syntax error in declaration (DECLARE ((OR FIXNUM NULL) X))<br>
Broken at SI:BYTECODES.No restarts available.<br>Broken at SI:BYTECODES.<br>>> :pop<br>Top level.<br>> (defun func3 (x) (declare (fixnum x)) x)<br>FUNC3<br>> (compile 'func3)<br>;;; End of Pass 1. <br>;;; Note: Replacing variable G127 by its value<br>
;;; Calling the C compiler... <br>;;; Note: Invoking external command:<br>;;; gcc -D_GNU_SOURCE -g -O2 -fPIC -Dlinux -O "-I/home/smithzv/usr/include/" -w -c "/home/smithzv/ECL00381xSWf.c" -o "/home/smithzv/ECL00381xSWf.o"<br>
;;; Note: Invoking external command:<br>;;; gcc -o "/home/smithzv/ECL00381xSWf.fas" -L"/home/smithzv/usr/lib/" "/home/smithzv/ECL00381xSWf.o" -shared -lecl -ldl -lm -lgmp<br>;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0<br>
FUNC3<br>NIL<br>NIL<br>> (func3 5)<br>5<br>> <br><br><br>Zach<br><br><br>