Subject: Re: Why is using "inline" as a variable name a parse error for our compiler? ...
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: current-users
Date: 07/19/1995 12:39:30
>> Unfortunately so.  I really wish people would drop the
>> non-prototyped compatability thing...
> I agree.  Prototypes *really do* help.

Actually, Chris pointed out that being compilable with old-style
compilers is not incompatible with clean fully-prototyped compiles.
I'd been thinking this was not so, but on reflection I realize he's
right, at least with gcc (which lets you provide a prototype and then
use an old-style definition).  Or of course if you're willing to uglify
your code with two definition headers for each function, which is
something I consider so horrible that I'd rather drop backward
compatability first.

>> ...for example, my last message to current-users describes a bug
>> that never would have happened if the kernel had been built with
>> -Wstrict-prototypes -Wmissing-prototypes (and either -Werror or the
>> discipline to not ignore the warnings).
> Why *really* get disciplined and use -Wall?  I tried this when I
> first looked at NetBSD and I can tell you it's not a pretty sight!

(Why _not_ really get..., I assume that should be.)

For my own code, I do.  I use wgcc, which is a wrapper script for gcc
-Werror -W -Wall -Wpointer-arith -Wcast-qual -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wno-uninitialized.  (The
reason for -Wno-uninitialized is that with at least one version of gcc,
specifying -Wuninitialized, even by default via -W -Wall, produces a
noise message if you don't specify -O.)

But then, I have pretty much given up on writing code compilable with
non-prototype-capable compilers, which it seems NetBSD core isn't
willing to do.  (Not that I necessarily think they should, mind you;
it's not for me to try to second-guess their reasons.)

I agree, it would be nice if NetBSD, or at least the kernel, had the
full power of gcc's warnings unleashed on it.  The first few iterations
would be pretty noisy, but the result would be a good deal cleaner. :-)

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu