SHIFTF macroexpansion has colliding gensym counters
Bug #1873556 reported by
Michał "phoe" Herda
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
New
|
Wishlist
|
Unassigned |
Bug Description
* (progn (print (macroexpand-1 '(shiftf a b c d))) nil)
(LET* ((#:OUT449 A) (#:NEW1 B) (#:NEW1 C) (#:NEW1 D))
(SETQ A #:NEW1)
(SETQ B #:NEW1)
(SETQ C #:NEW1)
(VALUES #:OUT449))
Multiple gensyms with the same name are generated. (If I print this without *PRINT-GENSYM*, this code will not work correctly if read back and evaluated.)
To post a comment you must log in.
That is because https:/ /github. com/sbcl/ sbcl/blob/ f91a81120579aeb 010383182a8e960 7c3bf0ad97/ src/code/ setf.lisp# L57 explicitly binds the gensym counter to 1 on each making of gensyms. Why is that required?