[Ecls-list] "Unknown type &OPTIONAL. Assuming it is T."

Waldek Hebisch hebisch at math.uni.wroc.pl
Sun Feb 7 01:31:54 UTC 2010


Gabriel Dos Reis wrote:
> On Sat, Feb 6, 2010 at 6:15 PM, Tobias C. Rittweiler <tcr at freebits.de> wrote:
> > (defun %guess-sort-duration (length)
> >  (if (zerop length)
> >      0
> >      (let ((comparasions (* 3.8 (* length (log length 2)))))
> >        (* 1000 (* comparasions (expt 10 -7))))))
> >
> > ;;; Compiling /tmp/frob.lisp.
> > ;;; OPTIMIZE levels: Safety=3, Space=0, Speed=1, Debug=3
> > ;;; Compiling (DEFUN %GUESS-SORT-DURATION ...).
> > ;;; Warning: in file /tmp/frob.lisp, position 0, and form
> > ;;; ? (FSET '%GUESS-SORT-DURATION #'(LAMBDA-BLOCK %GUESS-SORT-DURATION # ...))
> > ;;; Unknown type &OPTIONAL. Assuming it is T.
> 
> I believe similar warnings exist with VALUES.
> 

I think situation is a bit different.  In the function above I do not
see '&OPTIONAL' so this looks like compiler artifact.  FriCAS and
OpenAxiom use SPADCALL macro which expands to code like below: 

(my-funcall (sym)
   ;; (values t) indicates a single return value
   (the (values t) (funcall sym)))

Which gives:

;;; Warning: in file /mnt/a5/fricas/axp19/pp1/pp14/val.lisp, position 0,
and form 
;;;   (MY-FUNCALL (SYM) (THE # #))
;;; Ignoring THE form with type (VALUES T)

I would prefer this warning to go away (this warning appears 87055
times in FriCAS build log), but at least it has some sense -- the
compiler adimts that it does not understand the declaration.  OTOH
normally Lisp warning is intended to indicate flaw in source, so
warning seem too much...

--
 
                              Waldek Hebisch
hebisch at math.uni.wroc.pl 




More information about the ecl-devel mailing list