[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Telling compiler to shutup about warnings?
- To: clisp-list@ma2s2.mathematik.uni-karlsruhe.de, haible@ma2s2.mathematik.uni-karlsruhe.de
- Subject: Re: Telling compiler to shutup about warnings?
- From: haible (Bruno Haible)
- Date: Thu, 13 Apr 95 22:36:21 +0200
Raymond Toy <toy@rtp.ericsson.se> asks:
> I'm compiling a function
> which has some unused variables in it, and I don't want the warnings to
> be displayed.
There are two commonly used strategies to overcome this problem:
- Evaluate the variables at least once, like this:
(LAMBDA (ARG1 ARG2 &REST ARGS) ARG1 ARG2 ARGS (PROGN ,@function-body))
Every compiler will eliminate the evaluations of the variables at these
positions. Stepping through this kind of code will become annoying,
however.
- Some compilers have appropriate declarations. You can thus write
(LAMBDA (ARG1 ARG2 &REST ARGS)
#+CLISP (DECLARE (SYSTEM::IGNORABLE ARG1 ARG2 ARGS))
,@function-body
)
In CLISP, unused variable warnings are also suppressed for GENSYM generated
variables. (This is a hack predating the IGNORABLE declaration.)
> How can I tell the compiler to be quiet?
Bind *COMPILE-WARNINGS* to NIL, or give COMPILE-FILE the arguments
:WARNINGS NIL.
Bruno Haible
haible@ma2s2.mathematik.uni-karlsruhe.de
!! To unsubscribe from the clisp-list mailing list, send mail to !!
!! listserv@ma2s2.mathematik.uni-karlsruhe.de !!
!! including the two words "unsubscribe clisp-list" as message body. !!