| Submitter | Torvald Riegel |
|---|---|
| Date | Dec. 10, 2011, 8:28 p.m. |
| Message ID | <1323548885.4159.6999.camel@triegel.csb> |
| Download | mbox | patch |
| Permalink | /patch/130563/ |
| State | New |
| Headers | show |
Comments
On 12/10/2011 12:28 PM, Torvald Riegel wrote: > patch2: voidify_wrapper_expr wasn't handling MUST_NOT_THROW_EXPR. The > patch adds a reasonable default handling that applies to this case (and > this way, we don't need to teach language-independent code about > MUST_NOT_THROW_EXPR). > > patch3: As Jason pointed out, storing the noexcept specification in the > TRANSACTION_EXPR is less clean than just extending MUST_NOT_THROW_EXPR > with support for a boolean condition. This patch does that, including > instantiation etc. > > patch4: This is the noexcept patch again. Nothing changed since last > time except it's now based on conditional MUST_NOT_THROW_EXPR, which > simiplifies things. > > OK for trunk? Ok. r~
Patch
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index f548e70..fe8d2f8 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -1081,6 +1081,15 @@ voidify_wrapper_expr (tree wrapper, tree temp) break; default: + /* Assume that any tree upon which voidify_wrapper_expr is + directly called is a wrapper, and that its body is op0. */ + if (p == &wrapper) + { + TREE_SIDE_EFFECTS (*p) = 1; + TREE_TYPE (*p) = void_type_node; + p = &TREE_OPERAND (*p, 0); + break; + } goto out; } }