DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Analyzing your code with lint

Why lint is an important tool

lint compensates for separate and independent compilation of files in C by flagging inconsistencies in definition and use across files, including any libraries you have used. In a large project environment especially, where the same function may be used by different programmers in hundreds of separate modules of code, lint can help discover bugs that otherwise might be difficult to find. A function called with one less argument than expected, for example, looks at the stack for a value the call has never pushed, with results correct in one condition, incorrect in another, depending on whatever happens to be in memory at that stack location. By identifying dependencies like this one, and dependencies on machine architecture as well, lint can improve the reliability of code run on your machine or someone else's.


NOTE: lint is only intended for use with C programs, it will not work for C++ programs. In C++ the compiler checks for many of the kinds of constructs that lint flags.


Next topic: Options and directives
Previous topic: Analyzing your code with lint

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004