diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2011-04-14 17:05:58 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2011-04-14 17:05:58 +0000 |
commit | 545f261bef70b517ea65b5a827444c41b4bba4cd (patch) | |
tree | 7c7aa65beb4d0df425539a4692a35ce53f77da3b /gcc/cp/semantics.c | |
parent | 40e71fc77f174631af4978c9e3a5d949ecb9104a (diff) | |
download | gcc-545f261bef70b517ea65b5a827444c41b4bba4cd.zip gcc-545f261bef70b517ea65b5a827444c41b4bba4cd.tar.gz gcc-545f261bef70b517ea65b5a827444c41b4bba4cd.tar.bz2 |
cp-tree.def (IF_STMT): Add an extra operand.
* cp-tree.def (IF_STMT): Add an extra operand.
* cp-objcp-common.c (cp_common_init_ts): Mark it as TS_TYPED.
* cp-tree.h (IF_SCOPE): Define.
* semantics.c (begin_if_stmt): Pass scope to build_stmt.
(finish_if_stmt): Use IF_SCOPE instead of TREE_CHAIN.
From-SVN: r172437
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index b0dcb2b..6e71733 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -662,8 +662,8 @@ begin_if_stmt (void) { tree r, scope; scope = do_pushlevel (sk_block); - r = build_stmt (input_location, IF_STMT, NULL_TREE, NULL_TREE, NULL_TREE); - TREE_CHAIN (r) = scope; + r = build_stmt (input_location, IF_STMT, NULL_TREE, + NULL_TREE, NULL_TREE, scope); begin_cond (&IF_COND (r)); return r; } @@ -711,8 +711,8 @@ finish_else_clause (tree if_stmt) void finish_if_stmt (tree if_stmt) { - tree scope = TREE_CHAIN (if_stmt); - TREE_CHAIN (if_stmt) = NULL; + tree scope = IF_SCOPE (if_stmt); + IF_SCOPE (if_stmt) = NULL; add_stmt (do_poplevel (scope)); finish_stmt (); } |