tech-userlevel archive

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

Re: Proposal: remove usr.bin/mkstr

On Sat, Apr 09, 2022 at 03:16:24PM +0200, Roland Illig wrote:
 > > That's just like lint - once used all the time, code was not accepted
 > > if not lint free, now essentially useless as tge compilers have most
 > > of its functionality built in.   If being old and no longer very useful
 > > is the test, then lint should go too.  Perhaps so should I.
 > Do you know of any C compiler that [...]

We should not remove lint until we have another program checker to
replace it with, but it is not itself very useful. And yes, I know
you've been working on it and I haven't been following the details,
but it will take far more than the time you've put in (and a ground-up
restructuring) to become even as useful as lclint or sparse, let alone
comparable to a state-of-the-art program checker.

 > Do you know of any C compiler that catches the implicit unconst cast in
 > strstr("literal", "lit")[0] = 'X'?

It used to be that lint did not do this in a useful way (via
quantifier polymorphism) -- have you improved it?

I tried to check but running lint on a test file spews fatal errors
trying to read the system headers. If one adds -Ac11 and
-D'__attribute__(x)=' to avoid these, it does not complain about your
example, let alone any other more complex ones.

David A. Holland

Home | Main Index | Thread Index | Old Index