From 65ebb575ba3cf0893202b1756c9142d49c0e67b5 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Thu, 11 Sep 2008 14:15:00 +0000 Subject: * eval.c (evaluate_subexp_standard): Add calls to binop_promote and unop_promote before calling value_binop et. al. * ada-lang.c (ada_evaluate_subexp): Add calls to binop_promote and unop_promote before calling value_binop et. al. * valarith.c (value_binop): Do not call binop_promote or unop_promote. (value_pos): Do not call unop_promote. (value_neg, value_complement): Likewise. --- gdb/valarith.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'gdb/valarith.c') diff --git a/gdb/valarith.c b/gdb/valarith.c index 86accdd57d7..b4bce730593 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -876,14 +876,6 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) struct value *val; struct type *type1, *type2, *result_type; - /* For shift and integer exponentiation operations, - only promote the first argument. */ - if ((op == BINOP_LSH || op == BINOP_RSH || op == BINOP_EXP) - && is_integral_type (value_type (arg2))) - unop_promote (current_language, current_gdbarch, &arg1); - else - binop_promote (current_language, current_gdbarch, &arg1, &arg2); - arg1 = coerce_ref (arg1); arg2 = coerce_ref (arg2); @@ -1489,8 +1481,6 @@ value_pos (struct value *arg1) { struct type *type; - unop_promote (current_language, current_gdbarch, &arg1); - arg1 = coerce_ref (arg1); type = check_typedef (value_type (arg1)); @@ -1514,8 +1504,6 @@ value_neg (struct value *arg1) { struct type *type; - unop_promote (current_language, current_gdbarch, &arg1); - arg1 = coerce_ref (arg1); type = check_typedef (value_type (arg1)); @@ -1553,8 +1541,6 @@ value_complement (struct value *arg1) { struct type *type; - unop_promote (current_language, current_gdbarch, &arg1); - arg1 = coerce_ref (arg1); type = check_typedef (value_type (arg1)); -- cgit v1.2.1