* ada-lang.c (ada_evaluate_subexp): Evaluate tagged types in
EVAL_NORMAL mode when noside is EVAL_AVOID_SIDE_EFFECTS.
This commit is contained in:
parent
23117009d4
commit
6799def481
2 changed files with 14 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-01-04 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* ada-lang.c (ada_evaluate_subexp): Evaluate tagged types in
|
||||
EVAL_NORMAL mode when noside is EVAL_AVOID_SIDE_EFFECTS.
|
||||
|
||||
2008-01-04 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* ada-exp.y (chop_separator): New function.
|
||||
|
|
|
@ -8339,6 +8339,15 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
|
|||
|
||||
case OP_VAR_VALUE:
|
||||
*pos -= 1;
|
||||
|
||||
/* Tagged types are a little special in the fact that the real type
|
||||
is dynamic and can only be determined by inspecting the object
|
||||
value. So even if we're support to do an EVAL_AVOID_SIDE_EFFECTS
|
||||
evaluation, we force an EVAL_NORMAL evaluation for tagged types. */
|
||||
if (noside == EVAL_AVOID_SIDE_EFFECTS
|
||||
&& ada_is_tagged_type (SYMBOL_TYPE (exp->elts[pc + 2].symbol), 1))
|
||||
noside = EVAL_NORMAL;
|
||||
|
||||
if (noside == EVAL_SKIP)
|
||||
{
|
||||
*pos += 4;
|
||||
|
|
Loading…
Reference in a new issue