Hi Gaz,

the message "conditional flow changed by optimizer: so said EVELYN the modified DOG" it a notification that sdcc optimized the code. It excludes the second while loop, since it assumes that SMB_busy is not set, which is true as the result of the first while loop. If SMB_busy is changed from an interrupt routine or by the hardware, then you must declare it as volatile, so that the compiler knows that this could be changed out of it's control.

You can also totally disable the optimization. See sdcc documentation.

P.S.: It is better to post such questions to sdcc user mailing list: sdcc-user@lists.sourceforge.net or to sdcc help forum at http://sourceforge.net/projects/sdcc/forums/forum/1865.


On 07/22/2010 04:40 PM, gazs wrote:

I have try several source to find out why the happen:

if wait on a bit flag if it be Hardware or Software ie:  __bit  or a  __sbit
example it does not complain about the first but the second usually
__bit SMB_busy;
while(SMB_busy);   <---  cause the warning

I get this warning and code seem to truncate

conditional flow changed by optimizer: so said EVELYN the modified DOG

is there a work round or a fix I am using SDCC 2.9.7  I tried other version 2.8 2.7
with no luck

Note this a simple wait loop that has to be done
in programing most hardware

Any help