Subject: Re: -Wno-parenthesis
To: Hubert Feyrer <>
From: Chris G. Demetriou <>
List: tech-kern
Date: 06/06/1999 17:38:44
Hubert Feyrer <> writes:
> On Sun, 6 Jun 1999, Ross Harvey wrote:
> > I would like to change it in all the kernel Makefile's to:
> > 	-Wall -Wno-parentheses.
> While there, would adding -Wuninitialised (sp?) be possible?
> This is also something some ports have, and others don't.

I have issues with this.

* -Wuninitialized generates false positives.

When -Wparentheses emits a warning, the code actually is broken
according to the standard that it applies.  -Wuninitialized, on the
other hand, is frequently wrong, claiming that variables are
uninitialized or possibly uninitialized when simple inspection of the
code indicates that they're initialized in all cases.

Further, the number and types of false positives vary based on
architecture, and so they aren't even _consistent_ across the
platforms we support.  That's obviously not true of -Wparentheses.

* The workaround to fix bogus -Wuninitialized warnings has cost.

Additional parens or braces to fix -Wparentheses warnings hurt
nothing: they add no object code, and they make the source more
readable for less-experienced (or quicker-reading) hackers.
Initializtions to fix -Wuninitialized warnings add additional,
unnecessary code, which not only "pollutes" the source files, but also
adds wasted object code as well.  (I suppose you could restructure the
code to make it simpler, but it's not like man of the cases where
-Wuninitized screws up are complex to begin with.)

In other words, -Wuninitialized is bogus because it returns false
positives which cannot be turned off in any efficient manner.

Until that's fixed, I think it's inappropriate for 'standard' use on
the NetBSD sources, for any architecture.

Chris Demetriou - -
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.