Re: possible bug: compiled gensyms not preserved on load

Sam Steingold <[email protected]> Tue, 06 Jun 2017 14:38:49 -0400
Newsgroups gmane.lisp.clisp.general
Message-ID <[email protected]>
> *  <[email protected]> [2017-06-06 13:38:18 -0400]:
>
> 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.

Alas, see https://sourceforge.net/p/clisp/bugs/180/


-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504
http://steingoldpsychology.com http://www.childpsy.net http://memri.org
http://jij.org http://camera.org http://no2bds.org http://honestreporting.com
I don't have an attitude problem. You have a perception problem.

------------------------------------------------------------------------------
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