This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR 8805: EH vs. CFG


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]