From 272a5b812b72f4c3e409ccdbeaf3476d95c4b552 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 15 Mar 2016 15:07:47 +0100 Subject: Deactivate warning 27 and added back removed code. The code was mostly there for documentation effort. So warning 27 is deactivated again. Bug 18349 --- backend/CMtypecheck.ml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'backend/CMtypecheck.ml') diff --git a/backend/CMtypecheck.ml b/backend/CMtypecheck.ml index 399eb9bd..cd0d25dc 100644 --- a/backend/CMtypecheck.ml +++ b/backend/CMtypecheck.ml @@ -296,12 +296,12 @@ let rec type_stmt env blk ret s = | Sexit n -> if Nat.to_int n >= blk then raise (Error (sprintf "Bad exit(%d)\n" (Nat.to_int n))) - | Sswitch(islong, e, _, _) -> + | Sswitch(islong, e, cases, deflt) -> unify (type_expr env [] e) (if islong then tlong else tint) | Sreturn None -> begin match ret with | None -> () - | Some _ -> raise (Error ("return without argument")) + | Some tret -> raise (Error ("return without argument")) end | Sreturn (Some e) -> begin match ret with @@ -322,9 +322,9 @@ let rec type_stmt env blk ret s = with Error s -> raise (Error (sprintf "In tail call:\n%s" s)) end - | Slabel(_, s1) -> + | Slabel(lbl, s1) -> type_stmt env blk ret s1 - | Sgoto _ -> + | Sgoto lbl -> () let rec env_of_vars idl = @@ -343,8 +343,8 @@ let type_function id f = let type_globdef (id, gd) = match gd with | Gfun(Internal f) -> type_function id f - | Gfun(External _) -> () - | Gvar _ -> () + | Gfun(External ef) -> () + | Gvar v -> () let type_program p = List.iter type_globdef p.prog_defs; p -- cgit