gcl broken in current git



Bill Wood <william.wood3 at comcast.net> writes:
> On Tue, 2013-02-19 at 16:07 +0000, Rupert Swarbrick wrote:
>    . . .
>> Dan replied to me off-list pointing out that adding the following two
>> lines fixed the problem:
>> 
>>   ;; GCL needs to know that compsplt and compsplt-eq return multiple values
>>   #+gcl
>>   (declaim (ftype (function (t) t t) compsplt compsplt-eq))
>> 
>> I'll push a patch with this in a second as a stop-gap, but I've
>> obviously misunderstood something about the lisp compile/load/eval cycle
>> so I'll try and work out how to do this properly and push a less hacky
>> fix soon.
>
> I guess my ignorance is showing because I thought the Hyperspec said
> that it should be
>
>     (declaim (ftype (function (t) (values t t)) compsplt compsplt-eq))
>
> Isn't the VALUES form required?

Hmm, looking at the VALUES type specifier page, together with the
FUNCTION class page on the CLHS, I agree with you.

I'm still a little confused about why a declamation is needed at all,
though. I've been trying (with no success) to make a mini example that
fails with GCL to see what I'm doing wrong.

The thing is, I've been reading sections 3.1 and 3.2 of the hyperspec
quite closely and I can't find anything where it says that an
implementation can assume a function returns a single value until told
otherwise (which seems to be what's happening).

I didn't really think I could ask a question on comp.lang.lisp without a
more minimal example, but maybe you have an idea of what confusing
behaviour I was triggering?

Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20130220/0eec283e/attachment-0001.pgp>;