From owner-freebsd-current Thu Jan 28 17:38:55 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA25564 for freebsd-current-outgoing; Thu, 28 Jan 1999 17:38:55 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA25557 for ; Thu, 28 Jan 1999 17:38:53 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.2/8.9.1) id RAA16433; Thu, 28 Jan 1999 17:38:52 -0800 (PST) (envelope-from dillon) Date: Thu, 28 Jan 1999 17:38:52 -0800 (PST) From: Matthew Dillon Message-Id: <199901290138.RAA16433@apollo.backplane.com> To: Archie Cobbs Cc: nate@mt.sri.com (Nate Williams), current@FreeBSD.ORG Subject: Re: btokup().. patch to STYLE(9) (fwd) References: <199901290056.QAA07338@bubba.whistle.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Yes, that's true... but on balance I (personally) find it's worth :the tradeoff. : :On the other hand, I can't stand the GNU coding style.. : :-Archie : :___________________________________________________________________________ :Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com Well, not to start a flame war, but I happen to like GCC's choices for warnings with -Wall. They aren't all that bad, really... they warn you if you have an assignment in a boolean statement like: if (a = b) because it is a *very* common mistake to intend '==' rather then '='. I found a couple of those when I turned it on the kernel tree, for example. I used to use assignments in condtionals all the time myself, until one day it bit so hard it took 30 hours to find the bug - which turned out to be an assignment in a conditional that was supposed to be an ==. From that day on, I never put assignments in conditionals with an explicit boolean test, aka if ((a = b) != 0) { ... }. Beyond that it's pretty much just &/| and &&/|| precedences. I personally *never* liked the fact that C gave & and | ( and && and || ) differentl precedences. IMHO, the arithmatic-vs-shift parenthesization is something I've *always* done myself, so I don't mind those warnings either. -Wall also turns on -Wswitch which warns of switch()'d on enumerated types which lack a default. All the remaining warnings that -Wall turns on are pretty standard - for example, weak-typing warnings. I advocate prototyping and relatively strong typing myself. Weak typing warnings are a good thing. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message