Fix "casts" between signed and unsigned int

This commit is contained in:
Bill Currie 2020-02-14 20:42:12 +09:00
parent 5d8d805b60
commit 7e09a94469

View file

@ -2623,6 +2623,8 @@ cast_expr (type_t *type, expr_t *e)
e->e.value = convert_value (val, type);
e->type = ex_value;
c = e;
} else if (is_integral (type) && is_integral (e_type)) {
c = new_alias_expr (type, e);
} else if (is_scalar (type) && is_scalar (e_type)) {
c = new_unary_expr ('C', e);
c->e.expr.type = type;