DEFGENERIC should issue a WARNING when an unknown declaration identifier is used within its DECLARE option

Bug #894202 reported by Jean-Philippe Paradis on 2011-11-24
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

What I do and what happens:
(defgeneric foo ()
  (declare (fake-declaration)))

What I expected to happen:
A warning getting thrown.

"If an implementation notices a declaration specifier that it does not support and that has not been proclaimed as a non-standard declaration identifier name in a declaration proclamation, it should issue a warning."

A warning is already appropriately signaled in similar situations:

(declaim (fake-declaration))
--| WARNING: unrecognized declaration (FAKE-DECLARATION)

(lambda ()
  (declare (fake-declaration)))
; in: LAMBDA ()
; caught WARNING:
; unrecognized declaration (FAKE-DECLARATION)
; compilation unit finished
; caught 1 WARNING condition

SBCL version: 1.0.51
uname -a: Linux dynamorph 2.6.32-35-generic #78-Ubuntu SMP Tue Oct 11 15:27:15 UTC 2011 i686 GNU/Linux


Nikodemus Siivola (nikodemus) wrote :

Fixed in my pending tree.

Changed in sbcl:
assignee: nobody → Nikodemus Siivola (nikodemus)
status: New → Triaged
importance: Undecided → Low
Nikodemus Siivola (nikodemus) wrote :

e768e89 stricter handling of declarations in DEFGENERIC

Changed in sbcl:
assignee: Nikodemus Siivola (nikodemus) → nobody
status: Triaged → 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.

Other bug subscribers