[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Finding out if a variable is proclaimed special
- To: email@example.com
- Subject: Finding out if a variable is proclaimed special
- From: tar@ISI.EDU
- Date: Mon, 16 Aug 1993 16:51:51 -0700
- Posted-date: Mon, 16 Aug 1993 16:51:51 -0700
- Reply-to: tar@ISI.EDU
I am wondering how (in MCL, not necessarily portably) to determine if
a variable is proclaimed special.
Background: As part of our application, we construct and compile
lambda functions. Sometimes the code we generate does not use all of
the variables in the lambda list. When not all variables are
accessed, we want to include and appropriate (declare (ignore ...))
statement. The problem is that MCL's internal code for saving the
special bindings is considered by the compiler to access a variable,
so if we declare it to be ignored, then a warning message is
generated. We would like to spare our users these messages.
(defvar c 3)
'(lambda (a b c)
(declare (ignore b c))
(* a a)))
; Variable C not ignored, in an anonymous lambda form.
I would like to be able to detect when a variable is proclaimed
special and thus avoid this compiler warning.
Thomas A. Russ firstname.lastname@example.org
USC/ISI, 4676 Admiralty Way, Marina del Rey, CA 90292 (310) 822-1511