Re: possible bug: compiled gensyms not preserved on load

Jean Louis <[email protected]> Tue, 6 Jun 2017 20:57:27 +0300
Newsgroups gmane.lisp.clisp.general
Message-ID <[email protected]>
On Tue, Jun 06, 2017 at 01:38:18PM -0400, [email protected] wrote:
> If you save this into a file named "test-mac.lisp"
> 
> ----
> (defmacro test-mac ()
>   (let ((s (gensym)))
>     `(progn
>        (defparameter *sym* ',s)
>        (defun ,s () t))))
> (test-mac)
> ----
> 
> and then do this at the Lisp REPL prompt:
> 
> (load (compile-file "test-mac.lisp"))
> (funcall *sym*)
> 
> then you get an error:
>   FUNCALL: undefined function #:G9606
> 
> However, this problem does not occur in SBCL, CMUCL, ABCL, ECL, CCL. They successfully answer T.
> 
> Either test-mac.lisp is non-conforming, or both behaviours are
> valid, or CLISP has a bug. I don't know which. I'm not a CL nor
> CLISP expert. I thought I'd report it, just in case it was a CLISP
> bug.

I have just tried it and get T with the latest CLISP from development.

Jean

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
clisp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-list