EVAL occasionally expands macros twice
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Won't Fix
|
Low
|
Unassigned |
Bug Description
I execute the following code:
(defvar *arglist* nil)
(defmacro test2(x)
(progn
(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
*features*
(:ANSI-CL :COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS
:SB-UNICODE :SB-EVAL :SB-SOURCE-
:LINUX :SB-THREAD :LARGEFILE :GENCGC :STACK-
:C-STACK-
:RAW-INSTANCE-
:STACK-
:CYCLE-COUNTER :INLINE-CONSTANTS :LINKAGE-TABLE :OS-PROVIDES-DLOPEN
:OS-PROVIDES-PUTWC :OS-PROVIDES-
Changed in sbcl: | |
status: | New → In Progress |
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 |
Strictly speaking IIRC, macros are allowed to be expanded multiple times, what is going on here seems unintentional.