This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

While not compiled

Perhaps someone can tell me why the line "while(EE_busy & 0x01);" is not compiled?

volatile UINT8 EE_busy;

EE_busy = 0x01;
do
EE_busy = hs_NvmRDSR();
while(EE_busy & 0x01);

Thanks

Rich

Parents
  • "the debugger indicates which lines of code were compiled and which were optimized out"

    Not exactly.

    The debugger doesn't know aything about optimisation.

    In 'C' source, 'do...while' is a single construct

    In this particular case, you will almost certainly find that all the code associated with the do...while control construct has been associated with the 'do' source line.
    It's not that the 'while' has been optimised out or not compiled; it's just that all the functionality of the 'do...while' construct has been associated with the 'do' source line, rather than the 'while' source line.

    You will probably find similar effects with 'for' loops...

Reply
  • "the debugger indicates which lines of code were compiled and which were optimized out"

    Not exactly.

    The debugger doesn't know aything about optimisation.

    In 'C' source, 'do...while' is a single construct

    In this particular case, you will almost certainly find that all the code associated with the do...while control construct has been associated with the 'do' source line.
    It's not that the 'while' has been optimised out or not compiled; it's just that all the functionality of the 'do...while' construct has been associated with the 'do' source line, rather than the 'while' source line.

    You will probably find similar effects with 'for' loops...

Children
No data