Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!batcomputer!itsgw!steinmetz!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.lang.c Subject: Re: YALF (yet another lint foulup) Message-ID: <755@auspex.UUCP> Date: 20 Dec 88 07:27:53 GMT References: <4700030@m.cs.uiuc.edu> <717@auspex.UUCP> <122@mole-end.UUCP> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 22 >I believe that /*NOTREACHED*/ is for things like exit(), which cannot return >at all. Given that LINT professes to know about variables used before set, >it is certainly LINT's business to do a little basic flow analysis. It >would be nice if LINT would warn that this ``loop'' does not and can not loop. That's nice; unfortunately, the S5R3 "lint" doesn't really back this belief up - it merely gives "exit()" as an example, and just says that "at appropriate points (it) stops comments about unreachable code." It would be nice if "lint" did a better job of flow analysis; however, until it does, I see little point in *not* using /*NOTREACHED*/ to quiet the noise from "lint" so that one can do a better job of finding the signal. >With ANSI C and function prototypes, we may hope that LINT goes away. We >now understand better what sort of checks to apply (Bjarne Stroustrup's C++ >processors do a much better job than LINT, and without the extraneous noise) >and it makes sense to put them in the compiler. Well, perhaps. Some of the "-h" checks ("h" can stand either for "heuristic" or "hack") are useful, even though they could be considered hacks; they warn of perfectly legal constructs that are generally the result of a slip of the fingers.