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: RFC: C++ PATCH to stop emitting code for throw() by default


On Mon, Mar 22, 2010 at 11:41 AM, Jason Merrill <jason@redhat.com> wrote:
> At the Pittsburgh meeting last week there was a lot of talk about changes to
> exception specifications in C++0x: the short version is that they will be
> deprecated, to be replaced with an alternate form that just says whether or
> not the function will throw, with an integral constant expression operand.
> ?For more information, see N3050 in the post-meeting mailing (when that
> comes out), or the earlier version
> (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2983.html).
>
> 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.
>
> So, this patch does that by default. ?-ansi, -std=c++98, -std=c++0x, or
> -fenforce-eh-specs will enable fully conformant handling.
>
> Thoughts?
>

this probably should not be the default.  My suspicion is that it should
be controlled by a flag that users activate to request non-standard
implementation.

-- Gaby


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