over-strong warnings about DECLARE in walker

Bug #1368276 reported by Christophe Rhodes
6
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).

Tags: walker declare
Revision history for this message
Christophe Rhodes (csr21-cantab) wrote :

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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.