3 ms·
>We are not relying on specifics about bar(), just the general assumption that up until the return 0, the program hasn't done anything incorrect which interfere
by ivanbakel 3y ago
>We are not relying on specifics about bar(), just the general assumption that up until the return 0, the program hasn't done anything incorrect which interferes with what we want to do.
That's not qualitatively any different. You're still describing a class of behaviour (messing with local variables not in the same scope) that the program isn't allowed to do, because it breaks the compiler's view of the code. That behaviour is UB.
What do you think separates "good" assumptions from "bad" ones?
- kazinator 3y ago> What do you think separates "good" assumptions from "bad" ones? Rarely to never wrong vs often wrong.