From 4b8a1d328139b28ffe3d9ad44c0182aeea13649b Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Wed, 18 Jan 2017 14:52:40 +0100 Subject: 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 --- cfrontend/CPragmas.ml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cfrontend/CPragmas.ml') 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 *) -- cgit