diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-06-21 15:49:07 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-06-21 15:49:07 +0200 |
commit | 7237ccb621d58b2c86ef250f1c3e3ffd29260955 (patch) | |
tree | e770b9a015468751e0b006496fa7518402c88c96 /cparser/Elab.ml | |
parent | 8f444dec7112e5b125bf3ead8481ae0f698bbb96 (diff) | |
download | compcert-7237ccb621d58b2c86ef250f1c3e3ffd29260955.tar.gz compcert-7237ccb621d58b2c86ef250f1c3e3ffd29260955.zip |
Remove code that will is deprecated in ocaml 4.03
Most of the code can be String.uppercase usages can either be
replaced by a more specialized version of coqstring_of_camlstring
(which is also slightly more effecient) or by specialized checks
that reject wrong code earlier.
Bug 19187
Diffstat (limited to 'cparser/Elab.ml')
-rw-r--r-- | cparser/Elab.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml index cdae2fd9..722303d2 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -154,7 +154,10 @@ let integer_representable v ik = v >= 0L && v < Int64.shift_left 1L (bitsize - 1) let elab_int_constant loc s0 = - let s = String.uppercase s0 in + 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 (* Determine possible types and chop type suffix *) let (s, dec_kinds, hex_kinds) = if has_suffix s "ULL" || has_suffix s "LLU" then @@ -190,7 +193,7 @@ let elab_int_constant loc s0 = error loc "integer literal '%s' is too large" s0; 0L | Bad_digit -> - error loc "bad digit in integer literal '%s'" s0; + (*error loc "bad digit in integer literal '%s'" s0;*) (* Is caught earlier *) 0L in (* Find smallest allowable type that fits *) |