aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2005-01-27 07:32:26 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2005-01-27 07:32:26 +0000
commitebaae5827a4c70e7d8866c3aceeae6888e29d9fe (patch)
treef9b695c3f67dfcff98a1d75be3d18fdbb7cd6b9e /gcc/cp/semantics.c
parent7a7067386511a18792d556ed3e174f0245a5a36a (diff)
downloadgcc-ebaae5827a4c70e7d8866c3aceeae6888e29d9fe.zip
gcc-ebaae5827a4c70e7d8866c3aceeae6888e29d9fe.tar.gz
gcc-ebaae5827a4c70e7d8866c3aceeae6888e29d9fe.tar.bz2
tree.h (SWITCH_COND, [...]): Add tree checks.
* tree.h (SWITCH_COND, SWITCH_BODY, SWITCH_LABELS, CASE_LOW, CASE_HIGH, CASE_LABEL, ASM_STRING, ASM_OUTPUTS, ASM_INPUTS, ASM_CLOBBERS): Add tree checks. * c-common.h (SWITCH_TYPE): Rename to SWITCH_STMT_TYPE. (SWITCH_STMT_COND, SWITCH_STMT_BODY): New. * c-common.def (SWITCH_STMT): Update to match. * c-common.c (c_do_switch_warnings): Use SWITCH_STMT accessor macros instead of SWITCH_EXPR ones. * c-dump.c (c_dump_tree): Likewise. * c-gimplify.c (gimplify_switch_stmt): Likewise. * c-typeck.c (c_start_case, do_case, c_finish_case): Likewise. cp/ * decl.c (finish_case_label): Use SWITCH_STMT accessor macros instead of SWITCH_EXPR ones. * pt.c (tsubst_expr): Likewise. * semantics.c (begin_switch_stmt, finish_switch_cond, finish_switch_stmt): Likewise. doc/ * c-tree.texi (SWITCH_STMT): Update accessor macro names. From-SVN: r94315
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index ce7233f..466587e 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -858,7 +858,7 @@ begin_switch_stmt (void)
scope = do_pushlevel (sk_block);
TREE_CHAIN (r) = scope;
- begin_cond (&SWITCH_COND (r));
+ begin_cond (&SWITCH_STMT_COND (r));
return r;
}
@@ -902,11 +902,11 @@ finish_switch_cond (tree cond, tree switch_stmt)
cond = index;
}
}
- finish_cond (&SWITCH_COND (switch_stmt), cond);
- SWITCH_TYPE (switch_stmt) = orig_type;
+ finish_cond (&SWITCH_STMT_COND (switch_stmt), cond);
+ SWITCH_STMT_TYPE (switch_stmt) = orig_type;
add_stmt (switch_stmt);
push_switch (switch_stmt);
- SWITCH_BODY (switch_stmt) = push_stmt_list ();
+ SWITCH_STMT_BODY (switch_stmt) = push_stmt_list ();
}
/* Finish the body of a switch-statement, which may be given by
@@ -917,7 +917,8 @@ finish_switch_stmt (tree switch_stmt)
{
tree scope;
- SWITCH_BODY (switch_stmt) = pop_stmt_list (SWITCH_BODY (switch_stmt));
+ SWITCH_STMT_BODY (switch_stmt) =
+ pop_stmt_list (SWITCH_STMT_BODY (switch_stmt));
pop_switch ();
finish_stmt ();