From owner-cvs-all Wed Jan 20 06:35:30 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA05682 for cvs-all-outgoing; Wed, 20 Jan 1999 06:35:30 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from ceia.nordier.com (m1-25-dbn.dial-up.net [196.34.155.25]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA05659 for ; Wed, 20 Jan 1999 06:35:23 -0800 (PST) (envelope-from rnordier@nordier.com) Received: (from rnordier@localhost) by ceia.nordier.com (8.8.7/8.6.12) id QAA02757; Wed, 20 Jan 1999 16:31:37 +0200 (SAT) From: Robert Nordier Message-Id: <199901201431.QAA02757@ceia.nordier.com> Subject: Re: -Werror In-Reply-To: <199901201228.UAA19912@spinner.netplex.com.au> from Peter Wemm at "Jan 20, 99 08:28:18 pm" To: peter@netplex.com.au (Peter Wemm) Date: Wed, 20 Jan 1999 16:31:29 +0200 (SAT) Cc: fenner@parc.xerox.com, bde@zeta.org.au, cvs-committers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk Peter Wemm wrote: > Bill Fenner wrote: > > Or should simply be caught by --don't-be-lazy . -Werror doesn't help > > when the committer thinks that it's so obvious and simple that there's > > no need to even try building it. > > > > Bill > > The last time the warnings, etc, thing came up, the consensis was: > > In development mode, all practical warnings turned on. > In release mode, turn them off. It's no use scaring the users about > something they have little or no control over. > > Personally, I'd be quite happy to have -Werror turned on during > development, providing that it doesn't make it into any releases. One consequence of -Werror is that is forces a trade-off between o the number of warnings it is practical to turn on o the amount of rewriting of existing code it is practical to do Particularly in the case of a compiler (versus a good-quality lint tool), warnings have a probability of accuracy that ranges from fairly low to extremely high. The effect -Werror has is to force a binary choice: either take the warning completely seriously (and rewrite any correct code that confuses the compiler), or turn the warning off. For example, compiled with -Wall, the code fragment if (x = y) x = z + 1 & 7; causes two warnings suggest parentheses around assignment used as truth value suggest parentheses around + or - in operand of & but rewriting to eliminate the errors would violate a style(9) guideline (unnecessary parentheses). There's an awful lot of BSD code like this, that could cause huge {Net,Open}BSD diffs if rewritten. So (to give just one example) if -Werror if used, -Wall becomes problematic. And so -Werror may result in useful warnings getting turned off rather than on. -- Robert Nordier To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message