Lint Comments

LintComments were comments designed for consumption by the Unix lint(1) utility. They were used to silence a warning that lint would have otherwise given, for example:-

int foo (char *s) {

   if (NULL == s) 
   {
       fatal("s is null in foo");
       /*NOTREACHED*/
   }
   else 
   {
       /* do something with s */
       return blarf(s[0]) || quux(s+1); 
   }
}

These days I don't use lint(1). I do use LCLint a fair bit, and it does support LintComments - and adds more. These days though the comment I use most is /*FALLTHROUGH*/ to document a fallthrough case in a switch statement. The reason I do it this way is that this is documentation for people, not lint. This is such an unusual case that it needs to be pointed out explicitly to avoid people introducing bugs later with well-meaning edits. -- JamesYoungman


This is an example of a HereDocument.


CategoryLint


EditText of this page (last edited April 19, 2011) or FindPage with title or text search