diff options
author | torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-12 12:05:18 +0000 |
---|---|---|
committer | torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-12 12:05:18 +0000 |
commit | f9069149bc72f85750425dc89b7075cb1572b438 (patch) | |
tree | ac7dd9b4a8d33d3c0e997a93a36a45d93fac060b /gcc/cp/cp-tree.def | |
parent | 273d05b3ed91fa47a5fb9ef16592f3d7eeb527b2 (diff) | |
download | gcc-f9069149bc72f85750425dc89b7075cb1572b438.tar.gz |
Add condition to MUST_NOT_THROW_EXPR.
gcc/cp/
* cp-tree.def (MUST_NOT_THROW_EXPR): Add condition parameter.
* cp-tree.h (MUST_NOT_THROW_COND): New.
(build_must_not_throw_expr): Declare.
* dump.c (cp_dump_tree): Dump MUST_NOT_THROW_EXPR condition.
* except.c (build_must_not_throw_expr): New.
(initialize_handler_parm): Use it.
(begin_eh_spec_block, wrap_cleanups_r): Adapt to condition.
* pt.c (tsubst_expr): Handle MUST_NOT_THROW_EXPR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182233 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-tree.def')
-rw-r--r-- | gcc/cp/cp-tree.def | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/cp-tree.def b/gcc/cp/cp-tree.def index 5fc5496ef9e..83e0b5baab6 100644 --- a/gcc/cp/cp-tree.def +++ b/gcc/cp/cp-tree.def @@ -281,8 +281,9 @@ DEFTREECODE (EH_SPEC_BLOCK, "eh_spec_block", tcc_statement, 2) DEFTREECODE (HANDLER, "handler", tcc_statement, 2) /* A MUST_NOT_THROW_EXPR wraps an expression that may not - throw, and must call terminate if it does. */ -DEFTREECODE (MUST_NOT_THROW_EXPR, "must_not_throw_expr", tcc_expression, 1) + throw, and must call terminate if it does. The second argument + is a condition, used in templates to express noexcept (condition). */ +DEFTREECODE (MUST_NOT_THROW_EXPR, "must_not_throw_expr", tcc_expression, 2) /* A CLEANUP_STMT marks the point at which a declaration is fully constructed. The CLEANUP_EXPR is run on behalf of CLEANUP_DECL |