[Ecls-list] BUG: LDB returning incorrect results in compiled code

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Sat Oct 13 09:28:01 UTC 2007


2007/9/30, Eric Marsden <eric.marsden at free.fr>:
> LDB returns incorrect results in compiled code when the bytespec is
> more than 32 bits wide.
>
> ,----
> | CL-TEST> (ldb (byte 27 5) -1)
> | 134217727
> | CL-TEST> (funcall (compile nil (lambda () (ldb (byte 27 5) -1))))
> | -1
> `----

Hi Eric, sorry for the delay on solving this problem. Finally the
problem is not on ECL itself but on the C code it produces. Namely,
the numeric constants (-1), 0, etc, have to be prefixed with
(cl_fixnum) or (cl_index) in order to ensure that they are 64-bit
long. I have fixed this for LDB.

Juanjo

--
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list