Re: [PATCH] only use 48-bit lba when necessary

Timothy Miller (miller@techsource.com)
Fri, 18 Apr 2003 10:34:44 -0400


Chuck Ebbert wrote:

>Matt Mackall wrote:
>
>
>
>
>>FYI, GCC as of 3.2.3 doesn't yet reduce the if(...) form to branchless
>>code but the & and && versions come out the same with -O2.
>>
>>
>
>
> The operands of & can be evaluated in any order, while && requires
>left-to-right and does not evaluate the right operand if the left one
>is false. Only the simplest cases could possibly generate the same
>code.
>
>
>
I have a vague memory of reading a kerneltrap.org article or comment
thread which discussed this. The determination was that a compiler
could choose to fully evaluate the logical expression if there were no
side-effects.

-
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/