summaryrefslogtreecommitdiff
path: root/backend/CMtypecheck.ml
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-01-29 09:10:29 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-01-29 09:10:29 +0000
commit056068abd228fefab4951a61700aa6d54fb88287 (patch)
tree6bf44526caf535e464e33999641b39032901fa67 /backend/CMtypecheck.ml
parent34d58b781afec8ecd4afdcf2ab83f1c972338ba9 (diff)
Ported to Coq 8.4pl1. Merge of branches/coq-8.4.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2101 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'backend/CMtypecheck.ml')
-rw-r--r--backend/CMtypecheck.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/CMtypecheck.ml b/backend/CMtypecheck.ml
index 408e9ec..39e8c51 100644
--- a/backend/CMtypecheck.ml
+++ b/backend/CMtypecheck.ml
@@ -64,7 +64,7 @@ let type_var env id =
raise (Error (sprintf "Unbound variable %s\n" (extern_atom id)))
let type_letvar env n =
- let n = camlint_of_nat n in
+ let n = Nat.to_int n in
try
List.nth env n
with Not_found ->
@@ -303,8 +303,8 @@ let rec type_stmt env blk ret s =
| Sblock s1 ->
type_stmt env (blk + 1) ret s1
| Sexit n ->
- if camlint_of_nat n >= blk then
- raise (Error (sprintf "Bad exit(%d)\n" (camlint_of_nat n)))
+ if Nat.to_int n >= blk then
+ raise (Error (sprintf "Bad exit(%d)\n" (Nat.to_int n)))
| Sswitch(e, cases, deflt) ->
unify (type_expr env [] e) tint
| Sreturn None ->