[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Telling compiler to shutup about warnings?
- To: firstname.lastname@example.org, email@example.com
- Subject: Re: Telling compiler to shutup about warnings?
- From: haible (Bruno Haible)
- Date: Thu, 13 Apr 95 22:36:21 +0200
Raymond Toy <firstname.lastname@example.org> 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,
- Some compilers have appropriate declarations. You can thus write
(LAMBDA (ARG1 ARG2 &REST ARGS)
#+CLISP (DECLARE (SYSTEM::IGNORABLE ARG1 ARG2 ARGS))
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
!! To unsubscribe from the clisp-list mailing list, send mail to !!
!! email@example.com !!
!! including the two words "unsubscribe clisp-list" as message body. !!