Subject: Re: bug#11735: 24.1.50; "Warning: Unknown defun property ... in ..."

From: Juanma Barranquero <[email-masked]>
Date: Tue, 19 Jun 2012 13:54:29 +0200

On Tue, Jun 19, 2012 at 4:45 AM, Drew Adams <[email-masked]> wrote:

> Without checking the Common Lisp spec (IANAL), I would guess that even Common
> Lisp, which defines such optimization declarations, leaves it up to CL
> implementations to ignore some of them.  But I doubt that it leaves it up to
> them to raise a warning for those declarations it does not recognize.

This is SBCL 1.0.55.7.mswinmt.1185-d20ec0c, an implementation of ANSI
Common Lisp.
;; [etc]
* (defun test1 () (declare (foo)) t)
; in: defun test1
;     (FOO)
;
; caught warning:
;   unrecognized declaration (foo)
;
; compilation unit finished
;   caught 1 WARNING condition

test1
* (defun test2 () (declare (optimize bar)) t)
; in: defun test2
;     (OPTIMIZE BAR)
;
; caught warning:
;   Ignoring unknown optimization quality bar in: (optimize bar)
;
; compilation unit finished
;   caught 1 WARNING condition

test2
*