Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
sokoloff
· 4y ago · 0 comments
I think it's defined to execute at least until overflow, is it not? (So, even assuming a 1-bit int, it's going to execute at least once I think.)
Comments
[–]
witty_username
4y ago
No, if your program ever invokes UB, anything could happen (even at the beginning). In other words, UB can time travel.
[–]
sokoloff
OP
4y ago
If the {…} includes a break, undefined behavior could well be avoided.