From efd58783444cdeb32ac41a9a1bc645e9544e8c1f Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Wed, 31 May 2000 07:55:53 -0400 Subject: [PATCH] tree.h (TREE_CODE_LENGTH): New macro. * 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. From-SVN: r34295 --- gcc/fold-const.c | 7 +++---- 1 file 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++) { -- 2.30.2