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: RFA (EH): PATCH to tree-eh to remove cleanups in must_not_throw


On 05/19/2010 02:14 PM, Jason Merrill wrote:
> The C++0x FCD says in 15.5.1 [except.terminate]:
> 
> "In the situation where the search for a handler (15.3) encounters the
> outermost block of a function with a noexcept-specification that does
> not allow the exception (15.4), it is implementation-defined whether the
> stack is unwound before std::terminate() is called."
> 
> This freedom to not do unwinding before calling terminate means that we
> can omit EH cleanups inside a must-not-throw region, such as cleanups at
> the top level of a noexcept (or throw() with -fnothrow-opt) function. So
> the tree-eh.c change implements that, and the spec11.C change tests it.
> 
> Tested x86_64-unknown-linux-gnu (all languages).  OK for trunk?

>     	* tree-eh.c (cleanup_is_dead_in): New.
>     	(lower_try_finally): Don't generate a dead cleanup region.
>     	(lower_cleanup): Likewise.

Ok.


r~


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