aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/PrintClight.ml
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 /cfrontend/PrintClight.ml
parent272087e1bc62bead1d1e1bea3d64e12d013eea37 (diff)
downloadcompcert-kvx-5b05d3668571bd9b748b781b0cc29ae10f745f61.tar.gz
compcert-kvx-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 'cfrontend/PrintClight.ml')
-rw-r--r--cfrontend/PrintClight.ml22
1 files changed, 9 insertions, 13 deletions
diff --git a/cfrontend/PrintClight.ml b/cfrontend/PrintClight.ml
index ed19e178..bcdedd53 100644
--- a/cfrontend/PrintClight.ml
+++ b/cfrontend/PrintClight.ml
@@ -17,14 +17,12 @@
open Format
open Camlcoq
-open Datatypes
-open Values
open AST
open PrintAST
-open Ctypes
+open !Ctypes
open Cop
open PrintCsyntax
-open Clight
+open !Clight
(* Naming temporaries *)
@@ -34,9 +32,7 @@ let temp_name (id: ident) = "$" ^ Z.to_string (Z.Zpos id)
(* Precedences and associativity (H&S section 7.2) *)
-type associativity = LtoR | RtoL | NA
-
-let rec precedence = function
+let precedence = function
| Evar _ -> (16, NA)
| Etempvar _ -> (16, NA)
| Ederef _ -> (15, RtoL)
@@ -138,11 +134,11 @@ let rec print_stmt p s =
(temp_name id)
print_expr e1
print_expr_list (true, el)
- | Sbuiltin(None, ef, tyargs, el) ->
+ | Sbuiltin(None, ef, _, el) ->
fprintf p "@[<hv 2>builtin %s@,(@[<hov 0>%a@]);@]"
(name_of_external ef)
print_expr_list (true, el)
- | Sbuiltin(Some id, ef, tyargs, el) ->
+ | Sbuiltin(Some id, ef, _, el) ->
fprintf p "@[<hv 2>%s =@ builtin %s@,(@[<hov 0>%a@]);@]"
(temp_name id)
(name_of_external ef)
@@ -227,11 +223,11 @@ and print_stmt_for p s =
(temp_name id)
print_expr e1
print_expr_list (true, el)
- | Sbuiltin(None, ef, tyargs, el) ->
+ | Sbuiltin(None, ef, _, el) ->
fprintf p "@[<hv 2>builtin %s@,(@[<hov 0>%a@]);@]"
(name_of_external ef)
print_expr_list (true, el)
- | Sbuiltin(Some id, ef, tyargs, el) ->
+ | Sbuiltin(Some id, ef, _, el) ->
fprintf p "@[<hv 2>%s =@ builtin %s@,(@[<hov 0>%a@]);@]"
(temp_name id)
(name_of_external ef)
@@ -258,10 +254,10 @@ let print_function p id f =
let print_fundef p id fd =
match fd with
- | External(EF_external(_,_), args, res, cconv) ->
+ | Clight.External(EF_external(_,_), args, res, cconv) ->
fprintf p "extern %s;@ @ "
(name_cdecl (extern_atom id) (Tfunction(args, res, cconv)))
- | External(_, _, _, _) ->
+ | Clight.External(_, _, _, _) ->
()
| Internal f ->
print_function p id f