0
what if we run infinite loop in smartphonewhi ?
infinite loop throw while loop ?
2 Antworten
0
You have not mentioned language ...
Also beware: in C, the language for the generated source, while an empty loop with constant controlling expression, such as `while(1){}`, is formally OK, it may cause issues with some compilers.
There was such an issue with clang, (https://bugs.llvm.org/show_bug.cgi?id=965).
And in C++ /any/ inifnite loop with do-nothing body, such as the generated code's `while(1){}`, is effectively Undefined Behavior, because a C++ compiler can /assume/ that any thread eventually makes some observable progress.