The latest SDCC built from CVS head is giving me an
error (Note was not a problem 3 weeks eariler). Using
the following code with "sdcc -S -V -mz80" get
warning: conditional flow changed by optimizer: so said
EVELYN the modified DOG
warning: unreachable code
unsigned short Secs;
// ----------------------------------------------------
------------------------
// Return True if it has timed out
char IsTimedOut(unsigned short timeOut) {
unsigned short diff = Secs - timeOut;
return (diff & 0x8000) ? 0 : 1;
}
// ----------------------------------------------------
------------------------
void main(void) {
IsTimedOut(0);
}
Hope you can help,
Thank you
Slade
slade_rich@users.sourceforge.net
Logged In: YES
user_id=635249
This looks like a bug in the new type flow code, since (diff
& 0x8000) is being cast to the function's return type before
being evaluated. I suspect Bernhard would know how to fix
this faster (this is not a z80 specific bug).
Logged In: YES
user_id=203539
Fixed in SDCCast.c 1.224