RFC: C++ PATCH to stop emitting code for throw() by default

Mark Mitchell mark@codesourcery.com
Mon Mar 22 17:10:00 GMT 2010


Jason Merrill wrote:

> That got me thinking that there's not much point in us emitting the code
> necessary to catch an exception and call unexpected() in a function with
> a throw() exception-specification; it will pass along to terminate()
> eventually, and so we might as well just emit nothing and let the
> unwinder call terminate() directly by default.

I recognize that we're talking about an intentionally non-conformant
mode here; the EH equivalent of -ffast-math or some such.  Are you
proposing that this be the default?

Also, how do we know that emitting nothing will result in a call to
terminate?  Perhaps our caller has an exception handler that will catch
this exception?

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list