[Openmcl-devel] Another spurious compiler warning (in 1.7)

R. Matthew Emerson rme at clozure.com
Tue Dec 13 13:16:29 PST 2011


On Dec 13, 2011, at 2:09 PM, Bit Twiddler wrote:

> (defclass testclass () (
>  ; of the form ((start . stop) font translator)
>  (slot-1
>    :initarg  :ascent
>    :reader slot-1
>    )
>  (slot-2
>    :initarg  :ascent
>    :reader slot-2
>    )
>  (slot-3
>    :initarg  :ascent
>    :reader slot-3
>    )
>  (slot-4
>    :initarg  :ascent
>    :reader slot-4
>    )))
[...]
> Welcome to Clozure Common Lisp Version 1.7-r14925M  (LinuxX8664)!
> ? (load "test-initargs")
> ; Warning: Initarg :ASCENT occurs in both SLOT-1 and SLOT-2 slots
> ; While executing: (:INTERNAL CCL::CANONICALIZE-SLOT-SPEC DEFCLASS),
> in process listener(1).
> ; Warning: Initarg :ASCENT occurs in both SLOT-2 and SLOT-3 slots
> ; While executing: (:INTERNAL CCL::CANONICALIZE-SLOT-SPEC DEFCLASS),
> in process listener(1).
> ; Warning: Initarg :ASCENT occurs in both SLOT-3 and SLOT-4 slots
> ; While executing: (:INTERNAL CCL::CANONICALIZE-SLOT-SPEC DEFCLASS),
> in process listener(1).
[...]
> Would it be possible to get rid of this warning, or to make a switch
> to turn it off?

We shouldn't warn here.  It's fixed in the trunk.

http://www.lispworks.com/documentation/HyperSpec/Body/07_ad.htm
allows this case explicitly.

"A given initialization argument can be used to initialize more than one slot if the same initialization argument name appears in more than one :initarg slot option."





More information about the Openmcl-devel mailing list