Lisp HUG Maillist Archive

a bug in compile-file?

Hi

(in-package :cl-user)

(let ((foo 42))
  (defun double-foo ()
    (* 2 foo))
  (let ((bar 21))
    (defun test ()
      (print (+ (double-foo) bar)))
    )
)

When compiled using compile-file on Lispworks personal 4.3.6 on Linux or 
windows, as well as when compiled using the same lispworks from within 
slime, the compiler emits the following warning:

The following function is undefined:
DOUBLE-FOO which is referenced by (TOP-LEVEL-FORM 3)

yet the double-foo function can be called after the compiled file is 
loaded and it gives the correct return value, so the bindings seems to 
be created correctly.

When the same code is compiled using the "compile buffer" menu entry or 
icon in the LispWorks GUI, the compiler _does_not _ provide this warning?

btw. as expected cmucl 18e, sbcl 0.8.11 and clisp 2.30 does not give a 
warning.

    Kristian


Unable to render article 2466 because of ":DEFAULT stream decoding error on #<SB-SYS:FD-STREAM for \"socket 192.168.43.216:64733, peer: 116.202.254.214:119\" {1003AE0AF3}>: the octet sequence #(248 114 101 110) cannot be decoded." error

Updated at: 2020-12-10 08:56 UTC