you are viewing a single comment's thread
view the rest of the comments
[–] 7 points 1 year ago (1 child)

for example, simply optimize it away

Yeah, that example makes it reasonable. But the optimizer can do ridiculous stuff when it proves the loop never terminates and also assume it terminates.

The most famous example of UB bullshit is when some compilers run code that is impossible to reach just because there's an infinite loop on the file (not even in the same function).

  • source
  • parent
  • hideshow 1 child comment