This is the mail archive of the gcc-patches@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: [basic-improvements] try/finally support for c/c++ - more tests


Gabriel Dos Reis wrote:

I assume you're talking of

  try { X } finally { Y }

being translated into

   (1) try { X } catch (...) { Y; throw; } Y;

Right?

Maybe I got the same (mis)understanding as Mark that Y should always
be run.  Am I wrong?
What about:

  for {;;} { try { break; } finally { Y } }

which runs Y, while:

  for (;;) { try { break; } catch (...) { Y; throw; } Y; }

doesn't, if I understand things correctly.

--
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


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