From owner-freebsd-hackers Sat Jul 29 3:55: 2 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 83C1337B79F; Sat, 29 Jul 2000 03:54:58 -0700 (PDT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 29 Jul 2000 11:54:57 +0100 (BST) Date: Sat, 29 Jul 2000 11:54:56 +0100 From: David Malone To: Mark Ovens Cc: hackers@freebsd.org Subject: Re: ANSI compliance, gcc(1) and FreeBSD Message-ID: <20000729115456.A65276@walton.maths.tcd.ie> References: <20000729115153.C236@parish> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.2i In-Reply-To: <20000729115153.C236@parish>; from marko@freebsd.org on Sat, Jul 29, 2000 at 11:51:53AM +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Jul 29, 2000 at 11:51:53AM +0100, Mark Ovens wrote: > In the ANSI Standard (K&R 2e, A7.14 & A7.15) it states that, in the > case of the ``&&'' operator, the right operand is evaluated only if > the left operand evaluates to non-zero, and, for ``||'', the right > operand is evaluated only if the left operand evaluates to zero. > > My questions are: does gcc(1) honour this, and is it permitted to rely > on this behaviour in FreeBSD (base system)? Lots of C code would break if this wasn't honoured. Gcc deals with it just fine. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message