Steel Bank Common Lisp

Cryptic warnings, or no warnings for skipped declarations

Reported by Robert P. Goldman on 2011-02-28
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Low
Unassigned

Bug Description

There are a couple of cases in PROCESS-IGNORE-DECL that can either emit
a STYLE-WARNING that's a little cryptic, or ignore a declaration without
emitting anything. Here's a proposed patch that fixes this.

Originally posted to sbcl-devel and available as http://thread.gmane.org/gmane.lisp.steel-bank.devel/15513

Last tested on 1.0.45.4 on Mac OS X, but this is not a bug, it's "portable," and occurs on all platforms.

Robert P. Goldman (rpgoldman) wrote :

I'm actually not sure that this patch is enough. I don't understand exactly the ramifications, but with the COND in its current ordering, a non-local special variable that is declared as ignored gets a warning as an ignored undefined variable rather than an ignored special. I'm not sure that's right, but didn't want to change it.

Here's an example:

(in-package :common-lisp-user)

(defvar specialvar)

(defun warning-goofs ()
  (declare (ignore specialvar undeclared))
  nil)

tags: added: review
Changed in sbcl:
importance: Undecided → Low
status: New → Confirmed
tags: added: compiler
Nikodemus Siivola (nikodemus) wrote :

The style-warning for symbol-macros is not a good addition: SBCL doesn't currently signal style-warnings for unused symbol macros at all, so skipping the IGNORE declaration does exactly what the user asked for.

I'll merge something along the lines of you patch shortly.

Thanks for looking into this!

Changed in sbcl:
assignee: nobody → Nikodemus Siivola (nikodemus)
status: Confirmed → In Progress
tags: removed: review
Nikodemus Siivola (nikodemus) wrote :

In 1.0.46.17.

Changed in sbcl:
assignee: Nikodemus Siivola (nikodemus) → nobody
status: In Progress → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers