aboutsummaryrefslogtreecommitdiffstats
path: root/cparser
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2020-04-24 15:21:44 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2020-06-28 10:07:02 +0200
commit127b00c573ca5fef4245e77bac89e1093a7ec0d2 (patch)
tree3d84a0f7a14eb3be461341a80727e50b6af880dd /cparser
parent19aed83caebcae1103e0c4f6e200744492f17545 (diff)
downloadcompcert-kvx-127b00c573ca5fef4245e77bac89e1093a7ec0d2.tar.gz
compcert-kvx-127b00c573ca5fef4245e77bac89e1093a7ec0d2.zip
Use library function.
The function String.uppercase was deprecated and the replacement function String.upercase_ascii was only available from OCaml 4.03.0. Since the minimal OCaml version is now 4.05.0 we can use the function String.upercase_ascii.
Diffstat (limited to 'cparser')
-rw-r--r--cparser/Elab.ml5
1 files changed, 1 insertions, 4 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml
index 9e17cb7e..4f2ddce7 100644
--- a/cparser/Elab.ml
+++ b/cparser/Elab.ml
@@ -329,10 +329,7 @@ let integer_representable v ik =
v >= 0L && v < Int64.shift_left 1L (bitsize - 1)
let elab_int_constant loc s0 =
- let s = String.map (fun d -> match d with
- | '0'..'9' | 'A'..'F' | 'L' | 'U' | 'X' -> d
- | 'a'..'f' | 'l' | 'u' | 'x' -> Char.chr (Char.code d - 32)
- | _ -> error loc "bad digit '%c' in integer literal '%s'" d s0; d) s0 in
+ let s = String.uppercase_ascii s0 in
(* Determine possible types and chop type suffix *)
let (s, dec_kinds, hex_kinds) =
if has_suffix s "ULL" || has_suffix s "LLU" then