PR 8805: EH vs. CFG
Richard Henderson
rth@redhat.com
Tue Feb 25 18:14:00 GMT 2003
On Sun, Feb 23, 2003 at 05:02:08PM -0800, Mark Mitchell wrote:
> The cause, in the code, is that reachable_next_level stops when it
> finds a RNL_CAUGHT region -- but cleanup handlers are only
> RNL_MAYBE_CAUGHT regions. It seems to me that we should stop after
> RNL_MAYBE_CAUGHT regions too, in this case; each cleanup handler
> should have an edge to the places it can transfer control to next,
> so we don't need them from the original place.
Well, the problem being that the first time around we're
interested in finding *handlers* that are not reachable.
struct vector { ~vector(); };
void foo()
{
try {
try {
vector x, y, z;
throw 0;
} catch (int) {
}
} catch (int) {
link_error();
}
}
This is going to have to look backward through three
cleanups back to the actual handlers. If we stop with
the first cleanup, we'll not be able to see any of this.
Perhaps there's a better way to do what I'm doing though...
r~
More information about the Gcc
mailing list