diff options
author | Wilfried Moser <moser@cygnus> | 1996-03-06 08:02:45 +0000 |
---|---|---|
committer | Wilfried Moser <moser@cygnus> | 1996-03-06 08:02:45 +0000 |
commit | c105168f7641b925afdd9d15cf0ea0224eb36b84 (patch) | |
tree | bdb4a350092fca142ccbe7db3616af7567ea2ac7 /gdb/valarith.c | |
parent | 6bf53072e9bb76a53b38c1be4226de67af3adba2 (diff) | |
download | gdb-c105168f7641b925afdd9d15cf0ea0224eb36b84.zip gdb-c105168f7641b925afdd9d15cf0ea0224eb36b84.tar.gz gdb-c105168f7641b925afdd9d15cf0ea0224eb36b84.tar.bz2 |
* ch-exp.c (parse_primval): Handle CARD, MAX, MIN.
(match_string_literal): Handle control sequence.
(match_character_literal): Deto.
* ch-lang.c (chill_printchar): Change formating of nonprintable
characters from C'xx' to ^(num).
(chill_printstr): Deto.
(value_chill_card, value_chill_max_min): New functions to process
Chill's CARD, MAX, MIN.
(evaluate_subexp_chill): Process UNOP_CARD, UNOP_CHMAX, UNOP_CHMIN.
* expression.h (exp_opcode): Add UNOP_CARD, UNOP_CHMAX, UNOP_CHMIN
for Chill's CARD, MAX, MIN.
* valarith.c (value_in): Add processing of TYPE_CODE_RANGE
and change return type from builtin_type_int to
builtin_type_chill_bool.
Diffstat (limited to 'gdb/valarith.c')
-rw-r--r-- | gdb/valarith.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c index 3b9d9cc..0446907 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -1191,6 +1191,8 @@ value_in (element, set) int member; struct type *settype = check_typedef (VALUE_TYPE (set)); struct type *eltype = check_typedef (VALUE_TYPE (element)); + if (TYPE_CODE (eltype) == TYPE_CODE_RANGE) + eltype = TYPE_TARGET_TYPE (eltype); if (TYPE_CODE (settype) != TYPE_CODE_SET) error ("Second argument of 'IN' has wrong type"); if (TYPE_CODE (eltype) != TYPE_CODE_INT @@ -1202,7 +1204,7 @@ value_in (element, set) value_as_long (element)); if (member < 0) error ("First argument of 'IN' not in range"); - return value_from_longest (builtin_type_int, member); + return value_from_longest (builtin_type_chill_bool, member); } void |