[Ecls-list] Strange warning in method.

Pascal J. Bourguignon pjb at informatimago.com
Sun Aug 1 14:24:28 UTC 2010

I guess if the optimizer determines that a variable is of a given
type, it should also initialize with a value valid for that type.


(eval-when (:compile-toplevel)
  (print (list (lisp-implementation-type)

(defclass c ()
  ((tag :initarg :tag :accessor c-tag)
   (children :initarg :children :accessor c-children)))

(defmethod ff ((c c) tag index)
  (if (zerop index)
      (find tag (c-children c) :key (function c-tag))
      (nth index (remove tag (c-children c) :key (function c-tag)
                         :test-not (function equal)))))


[pjb at mdi-development-1 localhost:10.0  |MDI| tmp]$ ecl
ECL (Embeddable Common-Lisp) 10.7.1
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 in: #<process SI:TOP-LEVEL 09912fc0>.
> (compile-file "a.lisp")

;;; Loading #P"/usr/local/lib/ecl-10.7.1/cmp.fas"
;;; Compiling a.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0

("ECL" "10.7.1") 
;;; Compiling (DEFCLASS C ...).
;;; Compiling (DEFMETHOD FF ...).
;;; Warning:
;;;   in file a.lisp, position 233
;;;   at (DEFMETHOD FF ...)
;;;   ! In LET/LET* bindings, the type of the form NIL is SYMBOL, not FIXNUM.
;;; End of Pass 1.
;;; Emitting code for FF.
;;; Note:
;;;   Invoking external command:
;;;   gcc "-I/usr/local/include/"  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC  -D_THREAD_SAFE -Dlinux -O2 -w -c "/tmp/a.c" -o "/tmp/a.o"
;;; Note:
;;;   Invoking external command:
;;;   gcc -o "/tmp/a.fas" -L"/usr/local/lib/" "/tmp/a.o"  "-Wl,--rpath,/usr/local/lib/" -shared    -lffi -lecl  -lgmp -lpthread -ldl  -lm 
;;; Finished compiling a.lisp.

__Pascal Bourguignon__                     http://www.informatimago.com/

More information about the ecl-devel mailing list