From owner-freebsd-current Wed Jan 27 18:51:26 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA23920 for freebsd-current-outgoing; Wed, 27 Jan 1999 18:51:26 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.26.10.9]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA23892 for ; Wed, 27 Jan 1999 18:51:22 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id NAA23946; Thu, 28 Jan 1999 13:51:15 +1100 Date: Thu, 28 Jan 1999 13:51:15 +1100 From: Bruce Evans Message-Id: <199901280251.NAA23946@godzilla.zeta.org.au> To: archie@whistle.com, wollman@khavrinen.lcs.mit.edu Subject: Re: btokup() macro in sys/malloc.h Cc: current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >Anyway, if we're going to -Wall'ify the kernel (as we should) >then we need to update sytle(9) to reflect that. > >In fact, style(9) should say: > > If at all possible, your code should compile without warnings > when the gcc -Wall flag is given. Avoiding warnings is more an engineering than a stylistic matter. You turn on warnings to help avoid bugs that the compiler can find easily. You ask everyone else to turn on warnings so that compiling their sources with the same CFLAGS as your sources doesn't cause a spew of warnings. >As it stands now (and I QUOTE!) it says: > > Don't use parentheses unless they're required for precedence, or > the statement is really confusing without them. > > a = b->c[0] + ~d == (e || f) || g && h ? i : j >> 1; > >That's ridiculous! I think it's trying to be funny. This makes it a bad example either way. Perhaps its point is that complicated expressions can't be made less confusing by adding parentheses. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message