* ada-lang.c (ada_evaluate_subexp) <BINOP_DIV>: make sure to
promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS.
This commit is contained in:
parent
2360f94a42
commit
9c2be529f5
|
@ -1,3 +1,8 @@
|
||||||
|
2009-03-12 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* ada-lang.c (ada_evaluate_subexp) <BINOP_DIV>: make sure to
|
||||||
|
promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS.
|
||||||
|
|
||||||
2009-03-12 Joel Brobecker <brobecker@adacore.com>
|
2009-03-12 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* ada-tasks.c (ada_task_is_alive): Move up and make static.
|
* ada-tasks.c (ada_task_is_alive): Move up and make static.
|
||||||
|
|
|
@ -8458,7 +8458,10 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
|
||||||
goto nosideret;
|
goto nosideret;
|
||||||
else if (noside == EVAL_AVOID_SIDE_EFFECTS
|
else if (noside == EVAL_AVOID_SIDE_EFFECTS
|
||||||
&& (op == BINOP_DIV || op == BINOP_REM || op == BINOP_MOD))
|
&& (op == BINOP_DIV || op == BINOP_REM || op == BINOP_MOD))
|
||||||
return value_zero (value_type (arg1), not_lval);
|
{
|
||||||
|
binop_promote (exp->language_defn, exp->gdbarch, &arg1, &arg2);
|
||||||
|
return value_zero (value_type (arg1), not_lval);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
type = builtin_type (exp->gdbarch)->builtin_double;
|
type = builtin_type (exp->gdbarch)->builtin_double;
|
||||||
|
|
Loading…
Reference in New Issue