@@ -499,7 +499,7 @@ struct
499499 let toInt i =
500500 match IdxDom. to_int @@ ID. cast_to ik i with
501501 | Some x -> Const (CInt (x,ik, None ))
502- | _ -> mkCast ~e: (Const (CStr " unknown" )) ~newt: intType
502+ | _ -> mkCast ~e: (Const (CStr ( " unknown" , No_encoding ) )) ~newt: intType
503503
504504 in
505505 match o with
@@ -681,8 +681,8 @@ struct
681681 (match str with Some x -> M. tracel " casto" " CInt (%s, %a, %s)\n " (Cilint. string_of_cilint num) d_ikind ikind x | None -> () );
682682 `Int (ID. cast_to ikind (IntDomain. of_const (num,ikind,str)))
683683 (* String literals *)
684- | Const (CStr x ) -> `Address (AD. from_string x) (* normal 8-bit strings, type: char* *)
685- | Const (CWStr xs as c ) -> (* wide character strings, type: wchar_t* *)
684+ | Const (CStr ( x , _ ) ) -> `Address (AD. from_string x) (* normal 8-bit strings, type: char* *)
685+ | Const (CWStr ( xs , _ ) as c ) -> (* wide character strings, type: wchar_t* *)
686686 let x = Pretty. sprint ~width: 80 (d_const () c) in (* escapes, see impl. of d_const in cil.ml *)
687687 let x = String. sub x 2 (String. length x - 3 ) in (* remove surrounding quotes: L"foo" -> foo *)
688688 `Address (AD. from_string x) (* `Address (AD.str_ptr ()) *)
@@ -773,7 +773,7 @@ struct
773773 | None -> ad
774774 in
775775 `Address (AD. map array_start (eval_lv a gs st lval))
776- | CastE (t , Const (CStr x )) -> (* VD.top () *) eval_rv a gs st (Const (CStr x )) (* TODO safe? *)
776+ | CastE (t , Const (CStr ( x , e ))) -> (* VD.top () *) eval_rv a gs st (Const (CStr (x,e) )) (* TODO safe? *)
777777 | CastE (t , exp ) ->
778778 let v = eval_rv a gs st exp in
779779 VD. cast ~torg: (Cilfacade. typeOf exp) t v
@@ -2172,7 +2172,7 @@ struct
21722172 end
21732173 | `Unknown "__builtin" ->
21742174 begin match args with
2175- | Const (CStr "invariant" ) :: ((_ :: _ ) as args ) ->
2175+ | Const (CStr ( "invariant" , _ ) ) :: ((_ :: _ ) as args ) ->
21762176 List. fold_left (fun d e -> invariant ctx (Analyses. ask_of_ctx ctx) ctx.global d e true ) ctx.local args
21772177 | _ -> failwith " Unknown __builtin."
21782178 end
0 commit comments