(len % 1) != 0

David Daney ddaney@avtrex.com
Tue Feb 19 18:30:00 GMT 2008


Dave Korn wrote:
> On 19 February 2008 16:30, Sheng-Liang Song wrote:
> 
>> or
>>
>>  (len  & 1) != 0   <=>  (len % 2) != 0
>>
> 
>   That would have the advantage of not requiring a divide operation :)
> 

But GCC will fold it to the bitwise and form, so it doesn't really matter.

David Daney



More information about the Gdb mailing list