Subject: Re: Style guide
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: current-users
Date: 05/28/1997 14:54:19
>> CFLAGS = -O2 -pipe -ansi -Wall -Wshadow -Wpointer-arith -Wcast-qual \
>>          -Wwrite-strings -Werror -Wstrict-prototypes -Wmissing-prototypes \
>>          -funsigned-char -Dscanf=DONT_USE_SCANF -Dgets=DONT_USE_GETS

> That actually doesn't check a whole class of problems that lint does.

True.  "return value is sometimes ignored", for example.

> The whole "nconsistent declaration of a global variable or function"
> thing.

Hm?  gcc, with those options, requires that all calls and
globally-visible definitions have prototypes in scope, and that they
conform to those prototypes.  You _can_ still get inconsistencies, but
you almost have to try - you have to either have local prototypes, or
use different include files for different source files.

> yes, _assuming consistent include files_, you should be safe, but the
> point is that it's hard to know that your program, libraries, etc.,
> were compiled with consistent includes files.  lint will tell you.

No...lint will tell you whether your program and its lint libraries
were built consistently.  You have to trust that the library and its
lint library match.

I used to use lint.  Now, I find that gcc with a bunch of options
turned on finds more problems than lint did.  Each of 'em misses some
things; I find that for me, gcc is more useful.

					der Mouse

		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B