Looking for fixes to bugs in 4.1bsd lint

Spencer W. Thomas thomas at utah-gr.UUCP
Sun Nov 6 07:58:38 AEST 1983


Lint properly complains about uncasted NULL pointers in function calls -
on some machines (e.g., many 68000 C compilers), ints and pointers are
NOT THE SAME SIZE.  Thus, a 0 pointer is not the same as a 0 integer,
and must be cast in a function call.  Note that this is the only place
where the compiler will not properly coerce the 0, as it has no
knowledge of the receiving argument.

There is a known bug in the pre-processor involving #if lines with
comments on them (that only shows up when running lint).  The solution
seems to be to not put comments on #ifs.

Lint should never see #ifdef lines, they should be stripped by the
preprocessor.  If, for some reason, the preprocessor lets one through,
it will be for sure diagnosed as a syntax error.  Check out your
preprocessor, remembering that lint supplies the -C flag to the
preprocessor (leave comments in).

=Spencer



More information about the Comp.bugs.4bsd.ucb-fixes mailing list