Template:c/language/forward progress note

A program with an endless loop has undefined behavior if the loop has no observable behavior (I/O, volatile accesses, atomic or synchronization operation) in any part of its. This allows the compilers to optimize out all unobservable loops without proving that they terminate. The only exceptions are the loops where is a constant expression; is always an endless loop.