How do I make an infinite empty loop that won't be optimized away?
问题 The C11 standard appears to imply that iteration statements with constant controlling expressions should not be optimized out. I'm taking my advice from this answer, which specifically quotes section 6.8.5 from the draft standard: An iteration statement whose controlling expression is not a constant expression ... may be assumed by the implementation to terminate. In that answer it mentions that a loop like while(1) ; should not be subject to optimization. So...why does Clang/LLVM optimize