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++


On Wed, Nov 06, 2002 at 08:44:01AM +0000, Joseph S. Myers wrote:
> > + The __finally block is guaranteed to execute after the __try block,
> > + provided the program does not terminate while inside such block.
> > + After the __finally block executes, the flow of the program will
> > + continue where the __try block was meant to transfer control to, had
> > + there been no __finally block.
> 
> I believe the intention is that variables defined outside the try block 
> are live, but variables definied within it are not, while the finally 
> block is executing, regardless of how entered?  Also, if the try block 
> terminates by falling off the end, the intended point of transfer of 
> control is after the end of the finally block?

If __try block was exited by return, then the function returns after
finishing the __finally block (unless inside other __try block), if
__try is exited normally, then execution continues after the end
of the finally block, if __try block is exited through exception being
thrown (or forced unwinding), then after __finally block exits the
exception is resumed or forced unwinding continues.

	Jakub


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