gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Error compiling functions w/ (declare (integer x)) present


From: John Jorgensen
Subject: [Gcl-devel] Error compiling functions w/ (declare (integer x)) present
Date: Fri, 7 Jun 2002 10:43:12 -0400 (EDT)

When I try to compile functions that declare integers, I get errors. They
interpret just fine, but they don't compile. here is an example;
====================================
(defun pi-inv (bits &aux (m 0))
  (declare (integer bits m))
  (let* ((n (+ bits (integer-length bits) 11))
         (tt (truncate (ash 1 n) 882))
         (d (* 4 882 882))
         (s 0))
    (declare (integer s d tt n))
    (do ((i 2 (+ i 2))
         (j 1123 (+ j 21460)))
        ((zerop tt) (cons s (- (+ n 2))))
      (declare (integer i j))
        (setq s (+ s (* j tt))
              m (- (* (- i 1) (- (* 2 i) 1) (- (* 2 i) 3)))
              tt (truncate (* m tt) (* d (the integer (expt i 3))))))))
==========================

Right from the bugnum examples in the GCL documentation. running
(compile 'pi-inv) produces the following errors;
==========================
>(compile 'pi-inv)

Compiling gazonk1.lsp.
End of Pass 1.  
End of Pass 2.  
gazonk1.c: In function `L1':
gazonk1.c:3002: `GEN' undeclared (first use in this function)
gazonk1.c:3002: (Each undeclared identifier is reported only once
gazonk1.c:3002: for each function it appears in.)
gazonk1.c:3002: parse error before `V1'
gazonk1.c:3004: `V1' undeclared (first use in this function)
gazonk1.c:3004: `V1alloc' undeclared (first use in this function)
gazonk1.c:3007: parse error before `register'
gazonk1.c:3008: `V2' undeclared (first use in this function)
gazonk1.c:3008: `V2alloc' undeclared (first use in this function)
gazonk1.c:3009: parse error before `register'
gazonk1.c:3010: parse error before `register'
gazonk1.c:3011: parse error before `V5'
gazonk1.c:3012: parse error before `register'
gazonk1.c:3023: `save_avma' undeclared (first use in this function)
gazonk1.c:3024: `V3' undeclared (first use in this function)
gazonk1.c:3024: `V3alloc' undeclared (first use in this function)
gazonk1.c:3024: `restore_avma' undeclared (first use in this function)
gazonk1.c:3036: `V4' undeclared (first use in this function)
gazonk1.c:3036: `V4alloc' undeclared (first use in this function)
gazonk1.c:3044: `V5' undeclared (first use in this function)
gazonk1.c:3044: `V5alloc' undeclared (first use in this function)
gazonk1.c:3045: `V6' undeclared (first use in this function)
gazonk1.c:3045: `V6alloc' undeclared (first use in this function)
gazonk1.c:3046: parse error before `register'
gazonk1.c:3047: parse error before `register'
gazonk1.c:3048: `V7' undeclared (first use in this function)
gazonk1.c:3048: `V7alloc' undeclared (first use in this function)
gazonk1.c:3049: `V8' undeclared (first use in this function)
gazonk1.c:3049: `V8alloc' undeclared (first use in this function)

Correctable error: (SYSTEM "(cd . ;gcc -pipe -fwritable-strings
-DVOL=volatile -I/opt/dl/gcl/o -fsigned-char  -O -c -I. gazonk1.c
-w)") returned a non-zero value 0.
Signalled by UNLESS.
If continued: Continues anyway.
Broken at CERROR.  Type :H for Help.
>>
============================

If I remove the declares, it compiles just fine. It looks like this is
what is keeping CLX from compiling. GEN looks like it's supposed to be a
long, but I'm not sure.

J*




reply via email to

[Prev in Thread] Current Thread [Next in Thread]