Subject: Re: main return...
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: current-users
Date: 03/24/1996 08:37:27
>> some users won't know what to do if "configure; make" doesn't work.
> Sure they will. They'll throw it away and try something else. If
> the program declares main as void would you really trust the rest of
> it?
Sure, or at least, that alone wouldn't make me throw it out. After
all, until this discussion came up, I thought "void main(void);" was
one of the allowed declarations for main, and quite a lot of my code is
written that way. I'm not about to toss out someone else's package for
doing something I too did. :-)
> I have occasionally seen net source that passes "-Wall -Werror" but
> so far nothing has passed this;
> CFLAGS = -ansi -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings \
> -Wstrict-prototypes -Wmissing-prototypes -funsigned-char \
> -Dscanf=DONT_USE_SCANF -Dgets=DONT_USE_GETS -Werror
I think most of my code will. I'm not sure what -ansi does, but I
routinely compile with -Werror -W -Wall -Wpointer-arith -Wcast-qual
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes. On my NeXT
at home I add -Wno-import (for the sake of my shadow include tree), and
on the Suns at work I add -Wno-uninitialized, I forget exactly why but
I must have found something that tripped -Wuninitialized that I didn't
think was worth avoiding. That means -Wshadow is all you do that I
don't. I used to use -Wshadow, but it's too much of a pain to declare
a variable called y0 or y1 (which I often do in graphics programs) and
get a warning because it shadows the math library Bessel functions.
der Mouse
mouse@collatz.mcrcim.mcgill.edu