aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Camlcoq.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2016-03-10 18:07:26 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2016-03-10 18:07:26 +0100
commit12dd7431bc6aa32a4ae1cf95003523d5b878dffc (patch)
treefa87eb873120fa80fa12450b7ab70bfb3ae1f054 /lib/Camlcoq.ml
parent5b05d3668571bd9b748b781b0cc29ae10f745f61 (diff)
downloadcompcert-kvx-12dd7431bc6aa32a4ae1cf95003523d5b878dffc.tar.gz
compcert-kvx-12dd7431bc6aa32a4ae1cf95003523d5b878dffc.zip
Upgrade ocaml version needed and enable more warnings.
Since the menhir version we use requires ocaml>4.02 we can also upgrade the required ocaml version to >4.02 and remove the deprecate String functions. Also we now activate all warnings except for 4,9 und 27 for regular code plus a bunch of warnings for the generated code. 4 and 9 are not really usefull and 27 is deactivated since until the usage string is printed in a way that requires no newline. Bug 18394.
Diffstat (limited to 'lib/Camlcoq.ml')
-rw-r--r--lib/Camlcoq.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Camlcoq.ml b/lib/Camlcoq.ml
index c5fb2e55..90c3ab3f 100644
--- a/lib/Camlcoq.ml
+++ b/lib/Camlcoq.ml
@@ -307,11 +307,11 @@ let first_unused_ident () = !next_atom
(* Strings *)
let camlstring_of_coqstring (s: char list) =
- let r = String.create (List.length s) in
+ let r = Bytes.create (List.length s) in
let rec fill pos = function
| [] -> r
- | c :: s -> r.[pos] <- c; fill (pos + 1) s
- in fill 0 s
+ | c :: s -> Bytes.set r pos c; fill (pos + 1) s
+ in Bytes.to_string (fill 0 s)
let coqstring_of_camlstring s =
let rec cstring accu pos =