over-strong warnings about DECLARE in walker
Bug #1368276 reported by
Christophe Rhodes
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Confirmed
|
Low
|
Unassigned |
Bug Description
affects sbcl
status confirmed
importance low
tag walker declare
done
The walker is overly confident that misplaced DECLAREs are definitely
wrong:
(defmethod foo ()
(flet ((declare (x) (print x)))
(progn (declare 3))))
is perfectly legal and should compile with at most STYLE-WARNINGs, but
generates a full WARNING. (The equivalent DEFUN generates no warnings
at all, and we should be consistent between DEFUN and DEFMETHOD).
To post a comment you must log in.
Arguably I'm wrong about this: CLHS DECLARE says "The consequences of trying to use a declare expression as a form to be evaluated are undefined." which might trump the idea that one can add a local function binding to CL:DECLARE.