diff --git a/compiler/obc/c/c.ml b/compiler/obc/c/c.ml index cc2dd04..80dd431 100644 --- a/compiler/obc/c/c.ml +++ b/compiler/obc/c/c.ml @@ -242,6 +242,8 @@ and pp_cexpr fmt ce = match ce with | Cbop (s, l, r) -> fprintf fmt "(%a%s%a)" pp_cexpr l s pp_cexpr r | Cfun_call (s, el) -> fprintf fmt "%a(@[%a@])" pp_string s (pp_list1 pp_cexpr ",") el + | Caddrof (Cderef e) -> pp_cexpr fmt e + | Cderef (Caddrof e) -> pp_cexpr fmt e | Caddrof e -> fprintf fmt "&%a" pp_cexpr e | Cstructlit (s, el) -> fprintf fmt "(%a){@[%a@]}" pp_string s (pp_list1 pp_cexpr ",") el diff --git a/compiler/obc/c/cgen.ml b/compiler/obc/c/cgen.ml index 18b5bc3..c0136d2 100644 --- a/compiler/obc/c/cgen.ml +++ b/compiler/obc/c/cgen.ml @@ -118,7 +118,7 @@ let cvar_of_vd vd = let inputlist_of_ovarlist vl = let cvar_of_ovar vd = let ty = ctype_of_otype vd.v_type in - let ty = if Linearity.is_linear vd.v_linearity then pointer_to ty else ty in + let ty = if vd.v_mutable then pointer_to ty else ty in name vd.v_ident, ty in List.map cvar_of_ovar vl