Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 24 Jan 2002 17:35:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 24 Jan 2002 17:35:38 -0500 Received: from AMontpellier-201-1-1-52.abo.wanadoo.fr ([193.252.31.52]:45061 "EHLO awak") by vger.kernel.org with ESMTP id convert rfc822-to-8bit; Thu, 24 Jan 2002 17:34:39 -0500 Subject: Re: RFC: booleans and the kernel From: Xavier Bestel To: timothy.covell@ashavan.org Cc: Oliver Xymoron , "Richard B. Johnson" , Jeff Garzik , Linux Kernel Mailing List In-Reply-To: <200201242123.g0OLNAL06617@home.ashavan.org.> In-Reply-To: <200201242123.g0OLNAL06617@home.ashavan.org.> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-Mailer: Evolution/1.0 (Preview Release) Date: 24 Jan 2002 23:33:40 +0100 Message-Id: <1011911622.2631.6.camel@bip> Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org le ven 25-01-2002 ? 22:24, Timothy Covell a ?crit : > On Thursday 24 January 2002 14:39, Oliver Xymoron wrote: > > > > The compiler _will_ turn if(a==0) into a test of a with itself rather than > > a comparison against a constant. Since PDP days, no doubt. > > I thought that the whole point of booleans was to stop silly errors > like > > if ( x = 1 ) > { > printf ("\nX is true\n"); > } > else > { > # we never get here... > } > gcc already warns you about such errors. Xav - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/