EVAL occasionally expands macros twice

Bug #541584 reported by Richard Holcombe on 2010-03-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I execute the following code:

(defvar *arglist* nil)
(defmacro test2(x)
(push x *arglist*)
`(setf ,x 7)))

(test2 y)

then *arglist* has the value (y y) when just (y) is expected. (at least (y) is what I get on all of the other lisps that I can find, and makes much more sense.)

This occurs at least on versions 1.0.33 and 1.0.36 on linux.

uname -a
Linux 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 05:23:09 UTC 2010 i686 GNU/Linux



Changed in sbcl:
status: New → In Progress
Nikodemus Siivola (nikodemus) wrote :

Strictly speaking IIRC, macros are allowed to be expanded multiple times, what is going on here seems unintentional.

summary: - incorrect macro evaluation
+ EVAL occasionally expands macros twice
Changed in sbcl:
status: In Progress → Confirmed
Changed in sbcl:
importance: Undecided → Low
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers