"lint" lets very bad code pass

Peter DaSilva peter at kitty.UUCP
Thu Aug 1 01:06:33 AEST 1985


> For those of you who realize why the code that earlier "lint"s complained
> about is bad, you can make the System V "lint" complain too by deleting the
> two lines that read
> 
> 		if( sizeof(int) == sizeof(long) && !pflag ) return( 0 );
> 
> from the routine "chktype" in "lpass2.c".  This line was *not* present in
> earlier "lint"s, and is the culprit.  (One should *NOT* have to specify the
> "-p" flag - which checks for portability to various non-UNIX implementations
> of C - in order to get it to check for a bug which impairs portability to
> perfectly good UNIX C implementations.)
> 
> 	Guy Harris

Portability is portability. This is the first time I've heard that lint only
checks for portability to non-UNIX systems. The documentation refers to the
GCOS & IBM dialects of 'C'. Since UNIX runs on IBM mainframes shouldn't it
complain about such things as "if(c<'0')", since this isn't portable to
certain UNIX systems?



More information about the Net.bugs.usg mailing list