[patch] trans-mem: Support noexcept specifications for transaction statements and expressions.

Torvald Riegel triegel@redhat.com
Wed Nov 16 21:52:00 GMT 2011


Here is a revised version of the patch.  It still fails when combined
with transaction expressions (noexcept-4.C and noexcept-1.C) because
gimplify_must_not_throw_expr() calls voidify_wrapper_expr() on a
MUST_NOT_THROW_EXPR which it doesn't know to be a wrapper.  What's the
cleanest way to solve that?  Adding handling of MUST_NOT_THROW_EXPR
inside voidify_... will include C++ stuff there, right?  Or should there
be a C++ version of voidify_...?  Or something else?

Jason, I also addressed your other previous comments regarding not
adding MUST_NOT_THROW_EXPR until instantiation time, except...

On Mon, 2011-11-07 at 23:12 -0500, Jason Merrill wrote:
> On 11/07/2011 10:42 PM, Torvald Riegel wrote:
> > +		noex = tsubst_copy_and_build (noex, args, complain, in_decl,
> > +					      /*function_p=*/false,
> > +					      /*integral_const_expr_p=*/true);
> > +		noex = build_noexcept_spec (TREE_PURPOSE (noex),
> > +					    tf_warning_or_error);
> 
> If you're going to pull the TREE_PURPOSE out, you might as well do that 
> before tsubsting rather than after.

... this one.  I tried that, but this failed when I tried to use the
purpose obtained before tsubst for the call to build_noexcept_spec.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-patch
Size: 17701 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20111116/c7a64b90/attachment.bin>


More information about the Gcc-patches mailing list