aboutsummaryrefslogtreecommitdiff
path: root/gdb/eval.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1995-12-01 08:08:41 +0000
committerPer Bothner <per@bothner.com>1995-12-01 08:08:41 +0000
commita366d882c09d3fb36aafca0d3f9cc7aa1aa46dfe (patch)
tree2802fc355e6f4068462d07cb309bb152fd5ea2f9 /gdb/eval.c
parent5f3e7bfcbfcd9a744d69e5ed2a2a56af38bf2e35 (diff)
downloadgdb-a366d882c09d3fb36aafca0d3f9cc7aa1aa46dfe.zip
gdb-a366d882c09d3fb36aafca0d3f9cc7aa1aa46dfe.tar.gz
gdb-a366d882c09d3fb36aafca0d3f9cc7aa1aa46dfe.tar.bz2
* language.c (lang_bool_type), language.h: New function.
* language.h (LA_BOOL_TYPE): New macro. * eval.c (evaluate_subexp_standard) Use LA_BOOL_TYPE instead of builtin_type_int where appropriate, * valarith.c (value_subscript): Likewise.
Diffstat (limited to 'gdb/eval.c')
-rw-r--r--gdb/eval.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/eval.c b/gdb/eval.c
index b45c3c8..c391848 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -1258,7 +1258,7 @@ evaluate_subexp_standard (expect_type, exp, pos, noside)
tem = value_logical_not (arg1);
arg2 = evaluate_subexp (NULL_TYPE, exp, pos,
(tem ? EVAL_SKIP : noside));
- return value_from_longest (builtin_type_int,
+ return value_from_longest (LA_BOOL_TYPE,
(LONGEST) (!tem && !value_logical_not (arg2)));
}
@@ -1284,7 +1284,7 @@ evaluate_subexp_standard (expect_type, exp, pos, noside)
tem = value_logical_not (arg1);
arg2 = evaluate_subexp (NULL_TYPE, exp, pos,
(!tem ? EVAL_SKIP : noside));
- return value_from_longest (builtin_type_int,
+ return value_from_longest (LA_BOOL_TYPE,
(LONGEST) (!tem || !value_logical_not (arg2)));
}
@@ -1300,7 +1300,7 @@ evaluate_subexp_standard (expect_type, exp, pos, noside)
else
{
tem = value_equal (arg1, arg2);
- return value_from_longest (builtin_type_int, (LONGEST) tem);
+ return value_from_longest (LA_BOOL_TYPE, (LONGEST) tem);
}
case BINOP_NOTEQUAL:
@@ -1315,7 +1315,7 @@ evaluate_subexp_standard (expect_type, exp, pos, noside)
else
{
tem = value_equal (arg1, arg2);
- return value_from_longest (builtin_type_int, (LONGEST) ! tem);
+ return value_from_longest (LA_BOOL_TYPE, (LONGEST) ! tem);
}
case BINOP_LESS:
@@ -1330,7 +1330,7 @@ evaluate_subexp_standard (expect_type, exp, pos, noside)
else
{
tem = value_less (arg1, arg2);
- return value_from_longest (builtin_type_int, (LONGEST) tem);
+ return value_from_longest (LA_BOOL_TYPE, (LONGEST) tem);
}
case BINOP_GTR:
@@ -1345,7 +1345,7 @@ evaluate_subexp_standard (expect_type, exp, pos, noside)
else
{
tem = value_less (arg2, arg1);
- return value_from_longest (builtin_type_int, (LONGEST) tem);
+ return value_from_longest (LA_BOOL_TYPE, (LONGEST) tem);
}
case BINOP_GEQ:
@@ -1360,7 +1360,7 @@ evaluate_subexp_standard (expect_type, exp, pos, noside)
else
{
tem = value_less (arg2, arg1) || value_equal (arg1, arg2);
- return value_from_longest (builtin_type_int, (LONGEST) tem);
+ return value_from_longest (LA_BOOL_TYPE, (LONGEST) tem);
}
case BINOP_LEQ:
@@ -1375,7 +1375,7 @@ evaluate_subexp_standard (expect_type, exp, pos, noside)
else
{
tem = value_less (arg1, arg2) || value_equal (arg1, arg2);
- return value_from_longest (builtin_type_int, (LONGEST) tem);
+ return value_from_longest (LA_BOOL_TYPE, (LONGEST) tem);
}
case BINOP_REPEAT: