let get_uminus_assertion ~simplify_constants:simplify_constants ~warning:warning expr =
  (* - expr overflows if exp is TYPE_MIN *)
  let t = Cil.typeOf expr in
  let size = bitsSizeOf t
    in if (size > 64) then (
      (* should never happen *)
      rte_warn "bitsSize of %a > 64: not treated" d_exp expr ;
      []
    )
    else
      let minType = get_signed_min size in
      let assertion () =
        let term = translate_C_expr_to_term expr
        in Logic_const.prel (Rneq, term, Cil.lconstant minType)
      in
        if simplify_constants then (
          match get_expr_val expr with
            | Some a64 -> (* constant operand *)
                if Int64.compare a64 minType = 0 then (
                  let assertion = assertion ()
                  in
                    if warning then
                      rte_warn "unary minus assert broken: %a" d_predicate_named assertion
                    ;
                    [ (assertion, Some (make_check_false ())) ]
                )
                else []
            | None -> [ (assertion (), None) ]
        ) else [ (assertion (), None) ]