Greetings, and thank you so much for your report!

I've pushed a fix to git branch gnu-build-system, which will appear in
release 2.7.0 shortly.

Take care,

David Scherfgen <d.scherf...@googlemail.com> writes:

> Dear GCL developers,
>
> Here's another bug(?) I encountered.
>
> The following code works correctly when entering it directly into the REPL. 
> But compiling it doesn't work correctly.
>
> Place this in a file bug.lisp:
>
> (macrolet ((impl (op) `(,op x y)))
>   (defun add (x y) (impl +)))
>
> This defines a function add (x y) with the body (+ x y).
> Compile it:
>
> (compile-file "bug.lisp")
>
> The compiler gives some warnings that already indicate that something is 
> wrong:
>
> ; (DEFUN ADD ...) is being compiled.
> ;; Warning: The variable X is not used.
> ;; Warning: The variable Y is not used.
>
> Load the compiled file and try to call add:
>
> (load "bug.o")
> (add 3 4)
>
> The following error is shown:
>
> Condition in ADD [or a callee]: INTERNAL-SIMPLE-TYPE-ERROR: IMPL is not of 
> type FUNCTION:
>
> The compiler failed to expand the impl macro and treated it like a function!
>
> Tested with GCL 2.6.14.
>
> Best regards
> David Scherfgen
>

-- 
Camm Maguire                                        c...@maguirefamily.org
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

Reply via email to