* ada-lang.c (ada_array_length): Use builtin_type_int32 instead
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 10 Sep 2008 09:47:39 +0000 (09:47 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Wed, 10 Sep 2008 09:47:39 +0000 (09:47 +0000)
of builtin_type_int.
(ada_evaluate_subexp) [UNOP_IN_RANGE]: Use operand range type
instead of builtin_type_int.

gdb/ChangeLog
gdb/ada-lang.c

index 848e00e3100d92d60b00156128eeccd4f79284c9..1c00e78f2441d629851f9f62b18b3703a1db50bd 100644 (file)
@@ -1,3 +1,10 @@
+2008-09-10  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * ada-lang.c (ada_array_length): Use builtin_type_int32 instead
+       of builtin_type_int.
+       (ada_evaluate_subexp) [UNOP_IN_RANGE]: Use operand range type
+       instead of builtin_type_int.
+
 2008-09-09  Pedro Alves  <pedro@codesourcery.com>
 
        * infrun.c (normal_stop): Run hook-stop last.
index 643cbec1e61110201f1d4046dc4438be312bd8e8..8845433061f6c4385c093b6bae4f360990d0138b 100644 (file)
@@ -2621,7 +2621,7 @@ ada_array_length (struct value *arr, int n)
     }
   else
     return
-      value_from_longest (builtin_type_int,
+      value_from_longest (builtin_type_int32,
                           value_as_long (desc_one_bound (desc_bounds (arr),
                                                          n, 1))
                           - value_as_long (desc_one_bound (desc_bounds (arr),
@@ -8842,9 +8842,8 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
           return value_from_longest (builtin_type_int, (LONGEST) 1);
 
         case TYPE_CODE_RANGE:
-          arg2 = value_from_longest (builtin_type_int, TYPE_LOW_BOUND (type));
-          arg3 = value_from_longest (builtin_type_int,
-                                     TYPE_HIGH_BOUND (type));
+         arg2 = value_from_longest (type, TYPE_LOW_BOUND (type));
+         arg3 = value_from_longest (type, TYPE_HIGH_BOUND (type));
           return
             value_from_longest (builtin_type_int,
                                 (value_less (arg1, arg3)