diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-03-15 15:07:47 +0100 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-03-15 15:07:47 +0100 |
commit | 272a5b812b72f4c3e409ccdbeaf3476d95c4b552 (patch) | |
tree | 6a8d5e75a11860b69522cef3b512b1ef5effb438 /backend/CMtypecheck.ml | |
parent | 2185164c1845c30ebd4118ed5bc8d339b16663a9 (diff) | |
download | compcert-272a5b812b72f4c3e409ccdbeaf3476d95c4b552.tar.gz compcert-272a5b812b72f4c3e409ccdbeaf3476d95c4b552.zip |
Deactivate warning 27 and added back removed code.
The code was mostly there for documentation effort. So warning
27 is deactivated again.
Bug 18349
Diffstat (limited to 'backend/CMtypecheck.ml')
-rw-r--r-- | backend/CMtypecheck.ml | 12 |
1 files changed, 6 insertions, 6 deletions
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 |