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

Gabriel Dos Reis gdr at integrable-solutions.net
Sun Feb 7 01:37:20 UTC 2010


On Sat, Feb 6, 2010 at 7:31 PM, Waldek Hebisch <hebisch at math.uni.wroc.pl> wrote:
> 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...

The situation I was alluding to earlier is different from the
one you're reported here.  The situation I was reporting occurs
when you try to bootstrap SBCL with ECL.  In the SBCL source
which triggers the warning, there is no explicit mention of VALUES.
The warning is quite similar to the one with '&OPTIONAL'.

-- Gaby




More information about the ecl-devel mailing list