4 ms·
Good point. Some responses: Function calls themselves can force something like "x = 1" if x is observable from the callee. In the case where "x = 1" is not ob
by softc 10y ago
Good point. Some responses:
Function calls themselves can force something like "x = 1" if x is observable from the callee.
In the case where "x = 1" is not observable from the catch block, then there is no effect. In cases where you would use "try!" in Rust, in the equivalent C++ cases the catch block wouldn't be able see local variables since it would be in a parent function call.
I think LTO largely eliminates this issue altogether since function bodies are visible to the optimizer in that case.