599
with a break statement right?
(lemmy.nz)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
There's also this part of the standard that throws a wrench into this hypothesis:
§5.1.2.3/4: (Program execution, Observable behavior):
So it seems that running forever isn't an observable property that must be preserved when code is transformed.
Still, I think compilers try to not surprise the developer too badly and would recognize a trivial loop most of the time.