Cryptic warnings, or no warnings for skipped declarations

Bug #726331 reported by Robert P. Goldman on 2011-02-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone

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

Last tested on 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))

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 :


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