Tool/software: TI C/C++ Compiler
Hello, I am seeing some weird behavior out a program and it seems to boil down to the compiler optimizing out some while loops? my original code had the single line (ie loop2 and did not work properly) I changed it similar to LOOP1 and now it works properly, is this due to a level of optimization on the compiler? is this a known challenge (ie empty while structures?)
//------------------------------ [LOOP1]------------------------------------
// This seems to work
while (comm_flags & RAN_Busy_flag){ // Yield if RAN is busy
__no_operation(); //
}
//------------------------------ [LOOP2]------------------------------------
// This seems to be optimized out or ignored by the compiler?
while (comm_flags & RAN_Busy_flag);
thanks in avance.