Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/31/03 14:38
Read: times


 
#57600 - Not just Syntax!
Responding to: ???'s previous message
"LINT is a C and C++ syntax checker"

lint (which, being of UNIX origin, should be written in all lowercase) is far more than just a syntax checker!
Your compiler does syntax checking.

lint looks at the semantics; ie, the way that you use the syntax.

The classic example is, of course, if( a=b )
This is perfectly valid syntax but, in many cases, is not what the programmer wanted; which is more likely to be if( a==b ).

lint will analyse your code for this sort of common mistake, and many other bad & potentially dangerous practices - uninitialised variables being one that springs to mind.

Note that "big" compilers like MSVC and Borland tend to give a lot more "diagnostics" than the "small" embedded cross-compilers like Keil; and they are often much more informative.
I'm pretty sure that Borland does give warnings in my two examples above.
Therefore, as I've said here before, it is worthwile running your code through MSVC or Borland just to get the extra diagnostics - especially if you don't have lint!

List of 7 messages in thread
TopicAuthorDate
Lint...            01/01/70 00:00      
   RE: Lint...            01/01/70 00:00      
      RE: Lint...            01/01/70 00:00      
         yer tiz!            01/01/70 00:00      
   RE: Lint...            01/01/70 00:00      
      Not just Syntax!            01/01/70 00:00      
         RE: Not just Syntax!            01/01/70 00:00      

Back to Subject List