Leopold Toetsch <[EMAIL PROTECTED]> writes:
>> This sounds like the beginning of a whole set of things like "Warning
>> #238: suboptimal implementation of xxx. Are you sure you know what you
>> are doing?"
>
> If the user turns on optimization and the compiler finds such code, yes,
> why not.

SBCL, a fast and venerable Lisp compiler, does precisely this -- when
you compile with full optimization, it tells you everywhere it can't
eliminate runtime checks, use machine integers, etc.  The warnings can
be incredibly useful, because it's often hard to predict where the
compiler will be smart enough to optimize, and where you'll need to
help it.  But most of the time, the incredible flood of warnings is
just an annoyance that forces the programmer to ignore warnings
entirely.  These should definitely be available, but preferably only
upon request.

/s

Reply via email to