From 12dd7431bc6aa32a4ae1cf95003523d5b878dffc Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 10 Mar 2016 18:07:26 +0100 Subject: 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. --- cparser/Elab.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cparser') diff --git a/cparser/Elab.ml b/cparser/Elab.ml index ceab0aa5..fb75c687 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -253,11 +253,11 @@ let elab_string_literal loc wide chars = if wide then CWStr chars else begin - let res = String.create (List.length chars) in + let res = Bytes.create (List.length chars) in List.iteri - (fun i c -> res.[i] <- Char.unsafe_chr (Int64.to_int c)) + (fun i c -> Bytes.set res i (Char.unsafe_chr (Int64.to_int c))) chars; - CStr res + CStr (Bytes.to_string res) end let elab_constant loc = function -- cgit