tech-kern archive

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

Re: KASSERTMSG fix



In article <20110926113243.GH19374%snowdrop.l8s.co.uk@localhost>,
David Laight  <david%l8s.co.uk@localhost> wrote:
>On Mon, Sep 26, 2011 at 10:16:52AM +0200, Joerg Sonnenberger wrote:
>> On Mon, Sep 26, 2011 at 01:13:03AM +0200, Jean-Yves Migeon wrote:
>> > Just curious: clang comes with a static analyzer nowadays; wouldn't
>> > it be any better than the old lint, or is it missing features that
>> > can't make it a decent replacement for lint?
>> 
>> The only real feature missing from lint is the "link" support, aka
>> inter-file consistency checking.
>
>Which is really replaced by function prototypes - assuming they actually
>come from a shared header file!

[1:46pm] 10075>cat x.c 
float x;
[1:46pm] 10076>cat y.c
int x;

int
main(void)
{
        return 0;
}
[1:46pm] 10077>cc -Wall x.c y.c
[1:46pm] 10078>lint x.c y.c
x.c:
y.c:
Lint pass2:
x defined( x.c(1) ), but never used
x value declared inconsistently (float != int)  x.c(1)  ::  y.c(1)

christos



Home | Main Index | Thread Index | Old Index