Earlier quoted context omitted.
It should also warn if there are infinite loops, so the dev can know whether it will ever halt.
Infinite loops are undefined behavior in C++.
Hence for(;;) std::this_thread::sleep_for(1s) is not UB.
C is even more lenient.