[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Variable ignored warning in defsetf?
- To: norvig@harlequin.com
- Subject: Variable ignored warning in defsetf?
- From: hall@research.att.com (Bob Hall)
- Date: Tue, 31 Jan 95 10:11:23 EST
- Cc: info-mcl@digitool.com
- In-reply-to: Doug Currie, Flavors Technology, Inc.'s message of Tue, 31 Jan 1995 09:47:02 -0500 <v01510100ab53fc7b7466@[204.5.215.14]>
- Sender: owner-info-mcl@digitool.com
Date: Tue, 31 Jan 1995 09:47:02 -0500
From: e@flavors.com (Doug Currie, Flavors Technology, Inc.)
At 3:20 PM 95.01.27, Peter Norvig wrote:
>A user of my code complains that the following generates the error
>
> Variable CONTAINED? not ignored, in an anonymous lambda form
>
>under MCL. Other Lisps don't complain. Is there some work-around, or
>some way to tell MCL not to promote such warnings into an error that
>stops the compilation process?
>
>(defsetf grid-contents (env loc &optional contained?) (val)
> (declare (ignore contained?))
> `(setf (aref (grid-environment-grid ,env)
> (floor (xy-x ,loc)) (floor (xy-y ,loc)))
> ,val))
>
try: (declare (ignore-if-unused contained?))
See MCL Ref p. 643
This may then cause the other Lisps to barf, being a nonstandard declaration.
Some Lisps have an IGNORABLE declaration, some have IGNORE-IF-UNUSED, etc.
How about
#-:MCL (declare (ignore contained?))
in the original code instead?
-- Bob