Re: RFC: booleans and the kernel

From: Timothy Covell (timothy.covell@ashavan.org)
Date: Fri Jan 25 2002 - 16:24:39 EST


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...
}

-- 
timothy.covell@ashavan.org.
-
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/



This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:00:24 EST