Subject: Re: kern/5333: GCC 2.8.1 complains about missing parenteses in if-else
To: Chris G. Demetriou <cgd@pa.dec.com>
From: Guenther Grau <Guenther.Grau@bk.bosch.de>
List: netbsd-bugs
Date: 04/21/1998 19:16:58
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? Maybe omitting the
braces 
is an artefact and people now think differently about this issue, who
knows. 
Maybe the people from core, or whoever decides on this issue, can speak
up
and argue for (or against :-) the braces. Maybe, we can change the
global
style guide to adapt to current style guides (e.g. the java-styleguide).

Thanx,

  Guenther

P.S.: PLEASE don't make this yet another flame war. If core want's to
keep
it, well, that's what we have core for :-) And if it's only core who
doesn't
want to change it, but 99.9 % of the NetBSD-hackers want a new style
guide,
well, then we have to make a revolution ;-) ;-) ;-)