Subject: Re: kern/5333: GCC 2.8.1 complains about missing parenteses in if-else
To: Guenther Grau <Guenther.Grau@bk.bosch.de>
From: Chris G. Demetriou <cgd@pa.dec.com>
List: netbsd-bugs
Date: 04/21/1998 13:21:53
> Chris G. Demetriou wrote:
> > > "else" part is ambiguos and GCC suggests putting explicit parenteses.
> > > Since kernel is compiled with -Werror, compilation stops. One solution is
> > > to put -Wno-parenteses in compiler switches or (I think better) apply the
> > > patch below. The following files are affected (in MI part)
> > 
> > I personally think that adding extra braces is a good idea, if it
> > makes code clearer (see /sys/arch/alpha/STYLE 8-), but it goes against
> > the 'overall' NetBSD source style guide (see /usr/share/misc/style).
> 
> Well, what reasons are there for not doing this? [ ... ]

I don't know why the existing style guide is as it is; it was
inherited from CSRG.

As previously noted, I _personally_ think that adding the "extra"
braces is a good idea, and that's what I tried to do (and document) in
the alpha port.

What the project does is not up to me.


cgd