https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126508
Hana Dusíková <hanicka at hanicka dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hanicka at hanicka dot net
--- Comment #1 from Hana Dusíková <hanicka at hanicka dot net> ---
I think you are correct, the mechanism can't be only about caching when:
- if you see a `throw` keyword without any argument outside of sub-AST of a
catch-statement then the function call can't be cached
- or if you call such marked function from outside of a catch statement (to
handle cases where the throw; is hidden multiple layers deep, but still outside
of any `catch` statement along the way)
but also about not using the cache when exception is around and rather evaluate
function again, you could loose some performance, but exceptions should be
exceptional anyway.