@@ -140,6 +140,7 @@ let type_constant_to_string (c: type_constant_t) =
140140 ^ " (" ^ (string_of_int si) ^ " )"
141141 | TyTStruct (_ , name ) -> " t_struct_" ^ name
142142 | TyTFloat k -> float_type_to_string k
143+ | TyVoidPtr -> " t_voidptr"
143144 | TyTUnknown -> " t_top"
144145 | TyBottom -> " t_bottom"
145146
@@ -442,6 +443,8 @@ let rec mk_btype_constraint (tv: type_variable_t) (ty: btype_t)
442443 | TComp (key , _ ) ->
443444 let cinfo = bcfiles#get_compinfo key in
444445 Some (TyGround (TyVariable tv, TyConstant (TyTStruct (key, cinfo.bcname))))
446+ | TPtr (TVoid _ , _ ) ->
447+ Some (TyGround (TyVariable tv, TyConstant TyVoidPtr ))
445448 | TPtr (pty , _ ) ->
446449 let ptv = add_deref_capability tv in
447450 mk_btype_constraint ptv pty
@@ -461,6 +464,10 @@ let rec mk_btype_constraint (tv: type_variable_t) (ty: btype_t)
461464 " Unable to create array access capability (no size): %s [%s:%d]"
462465 (String. concat " ; " e)
463466 __FILE__ __LINE__;
467+ log_diagnostics_result
468+ __FILE__ __LINE__
469+ [" Unable to create array access capability (no size): "
470+ ^ (String. concat " ; " e)];
464471 None
465472 end )
466473 | rty ->
@@ -514,6 +521,7 @@ let type_constant_to_btype (tc: type_constant_t) =
514521 TInt (ikind, [] )
515522 | TyTStruct (key , _ ) -> get_compinfo_struct_type (bcfiles#get_compinfo key)
516523 | TyTFloat fkind -> TFloat (fkind, FScalar , [] )
524+ | TyVoidPtr -> t_voidptr
517525 | TyBottom -> t_unknown
518526 | TyTUnknown -> t_unknown
519527
0 commit comments