[comp.lang.c] let lint do its job

denbeste@bgsuvax.UUCP (William C. DenBesten) (12/18/87)

>>     sum = a[i++] + a[i++] + a[i++];

> "Why don't C compilers flag blatant errors such as the above?"

> And come to think of it, why doesn't someone fix the 4.3BSD compiler
> to do this?  After all 4.3BSD "lint" finds it.
> Just steal the code from lint! (And catch "i = i++;" too.)

No. Never. The magic words are '"lint" finds it'. If you want to find this
and other errors, run your program through lint.  If the compiler
were to check for this and other errors, the speed of the compiler would
diminish.

If you want the "compiler" to do this for you every time, create a shell
script that calls lint for every *.c argument and then run the compiler.
I guarantee you that you will tire of waiting for this every time.