* ada-lang.c (ada_evaluate_subexp) [UNOP_IN_RANGE]: make sure
authorJoel Brobecker <brobecker@gnat.com>
Tue, 24 Mar 2009 02:04:19 +0000 (02:04 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Tue, 24 Mar 2009 02:04:19 +0000 (02:04 +0000)
        we try to apply the attribute on the real type, rather than
        its associated typedef.

gdb/ChangeLog
gdb/ada-lang.c

index f6f8c29..7754d64 100644 (file)
@@ -1,5 +1,11 @@
 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
        to make sure we try to get the modulus of the actual type, not the
        associated typedef.
index 38902af..f257fb3 100644 (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;