fix some over-conversions

This commit is contained in:
Bill Currie 2004-02-04 00:27:42 +00:00
parent c74adc29b0
commit 3cd806fdcc

View file

@ -178,10 +178,10 @@ do_op_float (int op, expr_t *e, expr_t *e1, expr_t *e2)
if ((conv = convert_to_float (e1)) != e1) { if ((conv = convert_to_float (e1)) != e1) {
e->e.expr.e1 = e1 = conv; e->e.expr.e1 = e1 = conv;
} }
}
if ((conv = convert_to_float (e2)) != e2) { if ((conv = convert_to_float (e2)) != e2) {
e->e.expr.e2 = e2 = conv; e->e.expr.e2 = e2 = conv;
} }
}
if (is_compare (op) || is_logic (op)) { if (is_compare (op) || is_logic (op)) {
if (options.code.progsversion > PROG_ID_VERSION) if (options.code.progsversion > PROG_ID_VERSION)
type = &type_integer; type = &type_integer;
@ -673,10 +673,10 @@ do_op_uinteger (int op, expr_t *e, expr_t *e1, expr_t *e2)
if (get_type (e2) != &type_uinteger) { if (get_type (e2) != &type_uinteger) {
e->e.expr.e2 = e2 = cast_expr (&type_uinteger, e2); e->e.expr.e2 = e2 = cast_expr (&type_uinteger, e2);
} }
}
if ((conv = convert_to_uinteger (e2)) != e2) { if ((conv = convert_to_uinteger (e2)) != e2) {
e->e.expr.e2 = e2 = conv; e->e.expr.e2 = e2 = conv;
} }
}
if (is_compare (op) || is_logic (op)) { if (is_compare (op) || is_logic (op)) {
if (options.code.progsversion > PROG_ID_VERSION) if (options.code.progsversion > PROG_ID_VERSION)