aboutsummaryrefslogtreecommitdiffstats
path: root/backend/CMparser.mly
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2016-03-10 13:35:48 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2016-03-10 13:35:48 +0100
commit5b05d3668571bd9b748b781b0cc29ae10f745f61 (patch)
treeaa235b80ff0666c34332be46664ae289d8afaa2c /backend/CMparser.mly
parent272087e1bc62bead1d1e1bea3d64e12d013eea37 (diff)
downloadcompcert-5b05d3668571bd9b748b781b0cc29ae10f745f61.tar.gz
compcert-5b05d3668571bd9b748b781b0cc29ae10f745f61.zip
Code cleanup.
Removed some unused variables, functions etc. and resolved some problems which occur if all warnings except 3,4,9 and 29 are active. Bug 18394.
Diffstat (limited to 'backend/CMparser.mly')
-rw-r--r--backend/CMparser.mly12
1 files changed, 6 insertions, 6 deletions
diff --git a/backend/CMparser.mly b/backend/CMparser.mly
index 5f189e7b..b20dea38 100644
--- a/backend/CMparser.mly
+++ b/backend/CMparser.mly
@@ -17,7 +17,7 @@
including function calls in expressions, matches, while statements, etc. */
%{
-open Datatypes
+open !Datatypes
open Camlcoq
open BinNums
open Integers
@@ -210,17 +210,17 @@ let mkmatch_aux expr cases =
let ncases = List.length cases in
let rec mktable n = function
| [] -> assert false
- | [key, action] -> []
- | (key, action) :: rem ->
+ | [_, _] -> []
+ | (key, _) :: rem ->
(coqint_of_camlint key, Nat.of_int n)
:: mktable (n + 1) rem in
let sw =
Sswitch(false, expr, mktable 0 cases, Nat.of_int (ncases - 1)) in
let rec mkblocks body n = function
| [] -> assert false
- | [key, action] ->
+ | [_, action] ->
Sblock(Sseq(body, action))
- | (key, action) :: rem ->
+ | (_, action) :: rem ->
mkblocks
(Sblock(Sseq(body, Sseq(action, Sexit (Nat.of_int n)))))
(n - 1)
@@ -233,7 +233,7 @@ let mkmatch expr cases =
let s =
match cases with
| [] -> Sskip (* ??? *)
- | [key, action] -> action
+ | [_, action] -> action
| _ -> mkmatch_aux c cases in
prepend_seq !convert_accu s