summaryrefslogtreecommitdiffstats
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-31 11:55:53 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-31 11:55:53 +0000
commit3f1e707c080260e02043d2ceb0a8ee0396fd59ff (patch)
tree7c7a9e4fcb89849c3506dc5759f39b7ca43967f1 /gcc/fold-const.c
parentc58d0063973c5c84ea616d75c56461fdf56c1c82 (diff)
downloadppe42-gcc-3f1e707c080260e02043d2ceb0a8ee0396fd59ff.tar.gz
ppe42-gcc-3f1e707c080260e02043d2ceb0a8ee0396fd59ff.zip
* tree.h (TREE_CODE_LENGTH): New macro.
* c-common.c (c_find_base_decl): Use it. * expr.c (safe_from_p): Likewise. * print-tree.c (print_node): Likewise. * tree.c (make_node, copy_node, get_identifier): Likewie. (first_rtl_op, contains_placeholder_p, substitute_in_expr): Likewise. (build, build_nt, build_parse_node, simple_cst_equal): Likewise. * fold-const.c (make_range): Likewise. (fold): Likewise; also use first_rtl_op. * c-iterate.c (collect_iterators): Use first_rtl_op. * calls.c (calls_function_1): Likewise; also rename TYPE to CLASS. Use IS_EXPR_CODE_CLASS. (preexpand_calls): Likewise. * ggc-common.c (ggc_mark_trees): Rework to use first_rtl_op and TREE_CODE_LENGTH. * stmt.c (warn_if_unused_value): If no operands, no unused value. * ch/lang.c (deep_const_expr): Use first_rtl_op. * ch/satisfy.c (satisfy): Use TREE_CODE_LENGTH. * cp/method.c (mangle_expression): Use TREE_CODE_LENGTH. * cp/tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH. (built_min, cp_tree_equal): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34295 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index eec3bc48b76..ca50852c975 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -3337,7 +3337,7 @@ make_range (exp, pin_p, plow, phigh)
if (TREE_CODE_CLASS (code) == '2'
|| TREE_CODE_CLASS (code) == '<'
|| (TREE_CODE_CLASS (code) == 'e'
- && tree_code_length[(int) code] > 1))
+ && TREE_CODE_LENGTH (code) > 1))
arg1 = TREE_OPERAND (exp, 1);
}
@@ -4748,10 +4748,9 @@ fold (expr)
do arithmetic on them. */
wins = 0;
}
- else if (kind == 'e' || kind == '<'
- || kind == '1' || kind == '2' || kind == 'r')
+ else if (IS_EXPR_CODE_CLASS (kind) || kind == 'r')
{
- register int len = tree_code_length[(int) code];
+ register int len = TREE_CODE_LENGTH (code);
register int i;
for (i = 0; i < len; i++)
{
OpenPOWER on IntegriCloud