Cryptic warnings, or no warnings for skipped declarations

Bug #726331 reported by Robert P. Goldman
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
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.

Tags: compiler
Revision history for this message
Robert P. Goldman (rpgoldman) wrote :
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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