From owner-freebsd-current Fri Jan 29 23:59:43 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA27196 for freebsd-current-outgoing; Fri, 29 Jan 1999 23:59:43 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id XAA27189 for ; Fri, 29 Jan 1999 23:59:41 -0800 (PST) (envelope-from imp@village.org) Received: from harmony [10.0.0.6] by rover.village.org with esmtp (Exim 1.71 #1) id 106VJb-0006gR-00; Sat, 30 Jan 1999 00:59:39 -0700 Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.1/8.8.3) with ESMTP id AAA74734; Sat, 30 Jan 1999 00:59:52 -0700 (MST) Message-Id: <199901300759.AAA74734@harmony.village.org> To: Zach Heilig Subject: Re: btokup().. patch to STYLE(9) (fwd) Cc: Julian Elischer , current@FreeBSD.ORG In-reply-to: Your message of "Fri, 29 Jan 1999 20:45:21 CST." <19990129204521.A73046@znh.org> References: <19990129204521.A73046@znh.org> <199901291802.LAA67403@harmony.village.org> Date: Sat, 30 Jan 1999 00:59:52 -0700 From: Warner Losh Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <19990129204521.A73046@znh.org> Zach Heilig writes: : On Fri, Jan 29, 1999 at 11:02:48AM -0700, Warner Losh wrote: : > Yes. I agree with that. : > if (a | b & c % d ^ e) : > should have been written as: : > if (((a | (b & (c % d))) ^ e) != 0) : : I don't know why I'm getting into this, but to prove the point that this : expression takes careful thought, it is: : (a | ((b & (c % d)) ^ e)) : (^ is higher precedence than | , according to /usr/share/misc/operator). You see my point exactly. The explicit parens are what is intended in this example. How easy it is to get it wrong and how hard it is to prove to be right when things get that mixed up and crazy :-) Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message