* ada-lang.c (ada_evaluate_subexp) [UNOP_IN_RANGE]: make sure

we try to apply the attribute on the real type, rather than
        its associated typedef.
This commit is contained in:
Joel Brobecker 2009-03-24 02:04:19 +00:00
parent 31dedfee60
commit 8008e2653f
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2009-03-23 Joel Brobecker <brobecker@adacore.com>
* ada-lang.c (ada_evaluate_subexp) [UNOP_IN_RANGE]: make sure
we try to apply the attribute on the real type, rather than
its associated typedef.
2009-03-23 Joel Brobecker <brobecker@adacore.com>
* ada-lang.c (ada_evaluate_subexp) [OP_ATR_MODULUS]: Use check_typdef

View File

@ -8786,7 +8786,7 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
case UNOP_IN_RANGE:
(*pos) += 2;
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
type = exp->elts[pc + 1].type;
type = check_typedef (exp->elts[pc + 1].type);
if (noside == EVAL_SKIP)
goto nosideret;