missing destructive modification of constant warning
Bug #1736766 reported by
Douglas Katzman
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
(SETF AREF)warns:
* (compile nil '(lambda () (let ((a #(1 2))) (rotatef (aref a 0) (aref a 1)))))
; in: LAMBDA ()
; (ROTATEF (AREF A 0) (AREF A 1))
; --> LET* MULTIPLE-VALUE-BIND LET MULTIPLE-VALUE-BIND LET FUNCALL
; --> SB-C::%FUNCALL
; ==>
; ((SETF AREF) #:NEW1 #:A0 0)
;
; caught WARNING:
; Destructive function (SETF AREF) called on constant data.
; See also:
; The ANSI Standard, Special Operator QUOTE
; The ANSI Standard, Section 3.2.2.3
; ==>
; ((SETF AREF) #:NEW1 #:A1 1)
...
And BIT, SBIT, CHAR, SCHAR all warn.
(SETF SVREF) does not:
* (compile nil '(lambda () (let ((a #(1 2))) (rotatef (svref a 0) (svref a 1)))))
#<FUNCTION (LAMBDA ()) {1001AB803B}>
Changed in sbcl: | |
assignee: | nobody → Stas Boukarev (stassats) |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
a2b08b21972dda2 654cb40fdb1c6ac 0fd75f76ff