[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/lib/libc/arch/alpha/gen
On Thu, Mar 22, 2012 at 05:13:52PM -0400, Mouse wrote:
> >> [...]
> > As has been pointed out before, lint should be replaced, not removed.
> But is there any reason it should be replaced with something extrinsic
> to the compiler? I see a lot of advantages to, loosely put, replacing
> lint with a suitable set of warning options to the compiler.
Clang has a static analyzer module, which differs from the normal
compiler warning environment. The biggest reason for that is to allow a
different class of behavior. Compiler warnings are supposed to be fast,
i.e. not require a good chunk of the compile time themselve. That limits
them in scope, especially if they shouldn't be highly sensitive to the
optimizer like many GCC warnings are. The checks also fall more often
into the category of lower signal-to-noise ratio. For example, we have a
lot of code in the NetBSD tree with dead assingments. Most of them are
harmless, the optimizer will take care of those after all. There might
be real bugs lurking in it, hard to tell. Another class of issues are
path sensitive warnings. Trigger a warning if some branches check for
NULL pointers and some others don't can point out real bugs, but the
messages can be very difficult to understand with a lot more context
than typically provided by a single line diagnostic message.
Main Index |
Thread Index |