This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PR 8805: EH vs. CFG
- From: Richard Henderson <rth at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 25 Feb 2003 10:01:18 -0800
- Subject: Re: PR 8805: EH vs. CFG
- References: <200302240102.h1O128r06564@localhost.localdomain>
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~