aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Cutil.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2017-02-08 16:07:16 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2017-02-08 16:07:16 +0100
commit42adde29c69ea99256a4303503dd5b30f978f172 (patch)
tree83f6da1e73ce032ab611fc7139d5142a0bd5f46a /cparser/Cutil.ml
parent6b0dbab6d1315ae3b0df26d034bce771f743af85 (diff)
downloadcompcert-kvx-42adde29c69ea99256a4303503dd5b30f978f172.tar.gz
compcert-kvx-42adde29c69ea99256a4303503dd5b30f978f172.zip
Revert broken change to Cutil.
The optional hex parameter only worked if the intconstant was also of unsigned kind. Hence it is better to have one function in Bitfields for this.
Diffstat (limited to 'cparser/Cutil.ml')
-rw-r--r--cparser/Cutil.ml8
1 files changed, 2 insertions, 6 deletions
diff --git a/cparser/Cutil.ml b/cparser/Cutil.ml
index 8a59c147..2334966c 100644
--- a/cparser/Cutil.ml
+++ b/cparser/Cutil.ml
@@ -1007,12 +1007,8 @@ let int_pointer_conversion env tfrom tto =
(* Construct an integer constant *)
-let intconst ?hex v ik =
- let ist = match hex with
- | Some hex when hex ->
- Printf.sprintf "0x%LXU" v
- | _ -> "" in
- { edesc = EConst(CInt(v, ik, ist)); etyp = TInt(ik, []) }
+let intconst v ik =
+ { edesc = EConst(CInt(v, ik, "")); etyp = TInt(ik, []) }
(* Construct the 0 float constant of double type *)