let promote_KandR e1 =
match (type_of e1).ct_ty with
Tbuiltin
((Tchar | Tschar | Tuchar | Tshort | Tushort) as t) ->
let target_t =
match t with
| Tushort when sizeof_short = sizeof_int -> type_unsigned_int
| Tuchar when sizeof_char = sizeof_int -> type_unsigned_int
| Tchar when sizeof_char = sizeof_int && char_is_signed -> type_unsigned_int
| _ -> type_int
in
arithmetic_coerce e1 target_t
| Tbuiltin Tfloat ->
arithmetic_coerce e1 type_double
| _ -> e1