aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/CPragmas.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2017-01-18 14:52:40 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2017-01-18 14:52:40 +0100
commit4b8a1d328139b28ffe3d9ad44c0182aeea13649b (patch)
treebb1bee2969f39853535b8d63baf9308e8af7bf84 /cfrontend/CPragmas.ml
parentb82ae19b91db32b12f0c0afe1a478f9d4caa6497 (diff)
downloadcompcert-kvx-4b8a1d328139b28ffe3d9ad44c0182aeea13649b.tar.gz
compcert-kvx-4b8a1d328139b28ffe3d9ad44c0182aeea13649b.zip
Simplified C2C.error.
Instead of just accepting a string the function is changed to accept a format string. This removes a lot of artificial sprintfs in calls to the functions. Bug 19872
Diffstat (limited to 'cfrontend/CPragmas.ml')
-rw-r--r--cfrontend/CPragmas.ml5
1 files changed, 2 insertions, 3 deletions
diff --git a/cfrontend/CPragmas.ml b/cfrontend/CPragmas.ml
index 2a199ff8..d61af920 100644
--- a/cfrontend/CPragmas.ml
+++ b/cfrontend/CPragmas.ml
@@ -15,7 +15,6 @@
(* Handling of pragmas *)
-open Printf
open Camlcoq
(* #pragma section *)
@@ -43,9 +42,9 @@ let re_c_ident = Str.regexp "[A-Za-z_][A-Za-z_0-9]*$"
let process_use_section_pragma classname id =
if id = "," || id = ";" then () else begin
if not (Str.string_match re_c_ident id 0) then
- C2C.error (sprintf "bad identifier `%s' in #pragma use_section" id);
+ C2C.error "bad identifier `%s' in #pragma use_section" id;
if not (Sections.use_section_for (intern_string id) classname) then
- C2C.error (sprintf "unknown section name `%s'" classname)
+ C2C.error "unknown section name `%s'" classname
end
(* #pragma reserve_register *)