From: "Ben Combee" <[EMAIL PROTECTED]>
> At 11:02 PM 8/26/2003, Chris Tutty wrote:
> >My problem is that with dead code elimination on, the test is
> >ignored and errNone is returned regardless of the state of the
> >TestsOK variable (which *is* false when this function exits).
> >
> Check the assembly.  Without the whole code, I can't check to see if
you've
> hit an IR optimizer problem.  You can't trust the debugger to show you
> TestsOK at the end of the code, since the compiler optimized out the test,
> which means this variable isn't live at the end of your function and
> probably is sharing a register with some other variable.
>
Good point, and the assembler (what little I understand of it)
seems OK.  I couldn't understand how the test could be
optimised out since it determined whether a constant was
returned or the value of a global variable but in looking
further it's possible that for that logic flow the global variable
would not have been written to yet, making both sides of the
test return the same value.  Or to put it another way, dumb
programmer mistake strikes again.

I've got to learn to ignore those dashes against the lines of
code...

Chris Tutty


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to