+2020-10-17 Tom Tromey <tom@tromey.com>
+
+ * valprint.c (generic_value_print): Remove comment.
+ * m2-valprint.c (m2_value_print_inner): Remove comment.
+ * gdbtypes.c (create_range_type): Set TYPE_UNSIGNED from base
+ type.
+
2020-10-17 Tom de Vries <tdevries@suse.de>
PR symtab/26317
result_type->set_bounds (bounds);
- if (low_bound->kind () == PROP_CONST && low_bound->const_val () >= 0)
- result_type->set_is_unsigned (true);
-
- /* Ada allows the declaration of range types whose upper bound is
- less than the lower bound, so checking the lower bound is not
- enough. Make sure we do not mark a range type whose upper bound
- is negative as unsigned. */
- if (high_bound->kind () == PROP_CONST && high_bound->const_val () < 0)
- result_type->set_is_unsigned (false);
-
+ result_type->set_is_unsigned (index_type->is_unsigned ());
result_type->set_endianity_is_not_default
(index_type->endianity_is_not_default ());
m2_value_print_inner (v, stream, recurse, options);
break;
}
- /* FIXME: create_static_range_type does not set the unsigned bit in a
- range type (I think it probably should copy it from the target
- type), so we won't print values which are too large to
- fit in a signed integer correctly. */
- /* FIXME: Doesn't handle ranges of enums correctly. (Can't just
- print with the target type, though, because the size of our type
- and the target type might differ). */
/* FALLTHROUGH */
case TYPE_CODE_REF:
break;
case TYPE_CODE_RANGE:
- /* FIXME: create_static_range_type does not set the unsigned bit in a
- range type (I think it probably should copy it from the
- target type), so we won't print values which are too large to
- fit in a signed integer correctly. */
- /* FIXME: Doesn't handle ranges of enums correctly. (Can't just
- print with the target type, though, because the size of our
- type and the target type might differ). */
-
- /* FALLTHROUGH */
-
case TYPE_CODE_INT:
generic_value_print_int (val, stream, options);
break;