[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiler Warnings, again



In article <RWK.92Mar15131103@taunton.crl.dec.com> rwk@crl.dec.com (Bob Kerns) writes:


>   From: pazzani@pan.ics.uci.edu (Michael Pazzani)
>   Date: 14 Mar 92 18:42:39 GMT
>   Now, prolog
>   predicates that are not (yet) defined cause "Undefined functions" warnings.
>
>   I'm sure if I try hard enough, I can get around this, but I'd rather
>   not anticipate every possible warning and correct for it.  I really
>   want to turn off all warnings.  If I promise to use it only in
>   (without-compiler-warnings (compile (convert-to-lisp-function ....)))
>   can I get a hint on how to write without-compiler-warnings.
>

>What you want to do is use with-compilation-unit around
>the entire set of compilations.  This *should* cause your
>"undefined functions" to not happen until the end, by
>which time they should be defined (or you want to hear
>about it).

Thanks for the info on "with-compilation-unit."  I was aware of this
but it's not quite what I need.  Since I'm working with a compiler
that converts horn clauses to common lisp functions, I want to this
compiler, rather than the common lisp compiler to produce the warning
messages.  The users of the horn clause compiler would rather see
error messages such as "Singleton variable in clause 3" or "Undefined
predicate", rather than warning message that happens to be produced by
the lisp compiler.

Once again, I understand that warnings should almost never be turned
off, but a program that calls the compiler during its normal operation
might want to control the warnings.  Okay, now I supposse I have to
justify calling the compiler at run-time, too.  I do it because the
program is a machine learning program that learns horn clause rules.
These horn clause compiler converts these rules to common lisp
functions, compiles them, and tests them.

Mike