Y
Hacker News
new
|
ask
|
show
|
jobs
by
1718627440
36 days ago
That's only true in C++ though, not in C.
1 comments
dzaima
36 days ago
C does allow unconditional infinite loops (e.g. "while (1) { }" isn't UB) but still is UB if the controlling expression isn't constant (e.g. "while (two < 10) { }" is UB if two is a variable less than 10)
link