On Fri, Aug 22, 2008 at 3:14 PM, Andrew Pinski <[EMAIL PROTECTED]> wrote:
> On Fri, Aug 22, 2008 at 2:47 PM, Niklaus <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>>
>> When i run with the options g++ prog.c -o prog and run the exectuable
>> it gives me the correct output
>> but when i do g++ prog.c -o prog -O2 i get the wrong output
>>

Note by the way I think your ispow2 is incorrect.  It is doing a "a ==
1 & a != 0" and not ((a-1)&a) == 0.  We do warn about this too:
t.c:189: warning: suggest parentheses around comparison in operand of &


-- Pinski

Reply via email to