lclint-interest message 22

Date: 14 Nov 94 13:04:42 EST
From: "JR (John Rogers)" <>
To: LCLint interest list 
Subject: /*NOTREACHED*/ vs. /*@ -unreachable */ ?

Hi all!  I'm interested in the LCLint equivalents of various UNIX lint
comments.  For instance, in UNIX lint, /*NOTREACHED*/ can be used to
advise lint that a specific code path never returns.  The classical
example is something like this:

   if (something) {
      exit( EXIT_FAILURE );
      /* NOTREACHED */

This tells lint that code after the call to exit() is not reachable.  

Anyway, /*NOTREACHED*/ only applies to that piece of code (until the
next brace?).  /*NOTREACHED*/ doesn't turn off all unreachable code
warnings until further notice.  PC-lint has a /*lint -unreachable */
comment which is equivalent to /*NOTREACHED*/.

My questions are:

(1) In LCLint, does /*@ -unreachable */ act as /*NOTREACHED*/ does?

(2) If not, is there a way in LCLint to achieve the same effect?

Thanks again...
--JR (John Rogers)
Previous Message Next Message Archive Summary LCLint Home Page David Evans
University of Virginia, Computer Science