: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 <dil...@backplane.com> To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-current" in the body of the message