let coerce_at_least_integer 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
( Tint | Tuint
| Tlong | Tulong
| Tlonglong | Tulonglong) -> e1
| _ -> raise (TypeError_typed(e1,"not a numeric"))