Subject: Problems with ONEARGCHECK and TWOARGCHECK
From: Robert Dodier
Date: Fri, 25 Jul 2008 19:59:42 -0600
On 7/24/08, Dieter Kaiser <drdieterkaiser at web.de> wrote:
> (%i4) bessel_j(1);
> (%o4) bessel_j(1, #<compiled-closure 03cd5e38>)
> (%i7) airy_ai();
> (NIL . |$;|) is a cons with an atomic cdr - `simplifya'
> I use gcl 2.6.8 and the Maxiam CVS code on a Windows XP system.
The observed behavior appears to be a bug in GCL.
>From what I can tell, GCL doesn't check the number of arguments
in compiled code. Other Lisp varieties do check, so
airy_ai() and bessel_j() cause errors for them (Clisp, CMUCL,
probably others).
Here's a small example for GCL.
>(defun f (x y) y)
>(f 1)
=> error
>(compile 'f)
>(f 1)
=> #<compiled-function 08473b20>
This last result is incorrect; should be an error.
HTH
Robert Dodier