Subject: KNF and braces (was: Re: EGCS 1.1 UPDATE rev. 4)
To: Todd Vierling <email@example.com>
From: Chris G. Demetriou <firstname.lastname@example.org>
Date: 08/18/1998 11:05:32
Todd Vierling <email@example.com> writes:
> - egcs issues warnings about "ambiguous braces" that is supposedly against
> KNF (I haven't checked thoroughly). Use "CFLAGS+=-Wno-parentheses" in
> /etc/mk.conf to override this behavior. This may be removed from the
> set of warnings issued by "-Wall".
So, for the rest of you (who may not know), KNF says:
"No braces are used for control statements with zero or only a single
I think there's a pretty good argument to be had that it's good
programming practice to put in the braces anyway, and it's what I
do and have advocated for a while (see sys/arch/alpha/STYLE 8-).
Chris Demetriou - firstname.lastname@example.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.
Plug: Get your official NetBSD-1.3.2 CDROM set today! http://www.netbsd.com/