"lint" lets very bad code pass
Jerry Aguirre
jerry at oliveb.UUCP
Wed Jul 31 12:42:19 AEST 1985
> The V7 "lint" (or, at least, the version of it that comes with 4.2BSD),
> gives error messages for code that passes an "int" value to a routine that
> expects a "long" or pointer value, even though such code is likely to work
> on 4.2BSD systems which will have 32-bit "int"s.
>
> However, the System V Release 2 "lint" had code added to it *specifically*
> to prevent it from complaining about this on machines with sizeof(int) ==
> sizeof(long) if the actual argument is a constant. This is a bad idea for
> several reasons:
> Guy Harris
A test like this should be under control of the -p or -c option of lint.
Does it still allow int-long equality if you use the -p option?
Jerry Aguirre @ Olivetti ATC
{hplabs|fortune|idi|ihnp4|tolerant|allegra|tymix}!oliveb!jerry
More information about the Net.bugs.usg
mailing list