Definition weak_mapsto_ sh e rho :=
match (eval_expr e rho) with
| Vptr b o => (mapsto_ sh (typeof e) (Vptr b o)) ||
(mapsto_ sh (typeof e) (Vptr b o))
| _ => FF
end.

Lemma semax_cast_set:
forall (Delta: tycontext) (P: assert) id e t,
typeof_temp Delta id = Some t ->
semax Espec Delta
(fun rho =>
|> ((tc_expr Delta (Ecast e t) rho) && P rho))
(Sset id (Ecast e t))
(normal_ret_assert
(fun rho => (EX old:val,
!! (eval_id id rho = subst id old (eval_expr (Ecast e t)) rho) &&
subst id old P rho))).