let rec mk_ctype ty = match Cil.unrollType ty with
| TVoid _ -> Fol.PTunit
| TInt (k, _) -> mk_int_ctype k
| TEnum (einfo, _) ->
Wp_parameters.warning
"enum type '%s' not fully handled yet (considered as 'integer'...)"
einfo.ename;
Fol.PTint
| TFloat (k, _) -> mk_float_ctype k
| TPtr (ty,_) -> pointer_type (mk_ctype ty)
| TArray (ty,_,_,_) -> array_type (mk_ctype ty)
| TComp (ci,_,_) ->
(try
Hashtbl.find type_table ci.ckey
with Not_found ->
let new_pt = Fol.PTexternal ([], ci.cname) in
Hashtbl.add type_table ci.ckey new_pt;
new_pt)
| TBuiltin_va_list _
| TFun (_, _, _, _) ->
let str = Pretty_utils.sfprintf "%a" !Ast_printer.d_type ty in
let str = "type: "^str in
raise (Unsupported str)
| TNamed (_, _) -> assert false