From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263964AbTE3ULo (ORCPT ); Fri, 30 May 2003 16:11:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263969AbTE3ULn (ORCPT ); Fri, 30 May 2003 16:11:43 -0400 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:45322 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id S263964AbTE3ULn (ORCPT ); Fri, 30 May 2003 16:11:43 -0400 To: linux-kernel@vger.kernel.org From: "H. Peter Anvin" Subject: Re: drivers/char/sysrq.c Date: 30 May 2003 13:24:41 -0700 Organization: Transmeta Corporation, Santa Clara CA Message-ID: References: <5.1.0.14.2.20030530164138.00aeee40@pop.t-online.de> <20030530145851.GA15640@wohnheim.fh-wedel.de> <20030530151317.GA3973@werewolf.able.es> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Disclaimer: Not speaking for Transmeta in any way, shape, or form. Copyright: Copyright 2003 H. Peter Anvin - All Rights Reserved Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Followup to: <20030530151317.GA3973@werewolf.able.es> By author: "J.A. Magallon" In newsgroup: linux.dev.kernel > > I see a diff: > - & is bitwise and you always perform the op > - && is logical and gcc must shortcut it > > I think people use & 'cause they prefer the extra argument calculation > than the branch for the shortcut (AFAIR...) > > or not ? > In this case it doesn't matter, since gcc should be able to prove the right-hand-side is side-effect free. -hpa -- at work, in private! "Unix gives you enough rope to shoot yourself in the foot." Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64