From a68a6ba072bbc5d6496f6a564c4564b911efe3e8 Mon Sep 17 00:00:00 2001 From: xleroy Date: Mon, 25 Aug 2014 08:10:39 +0000 Subject: More careful detection of inlined builtins. Produces better error messages if an unsupported __builtin_xxx function is used by mistake. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2617 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cfrontend/C2C.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml index ffea5a8..73d9edb 100644 --- a/cfrontend/C2C.ml +++ b/cfrontend/C2C.ml @@ -870,6 +870,7 @@ let convertFundecl env (sto, id, ty, optinit) = if id.name = "malloc" then EF_malloc else if id.name = "free" then EF_free else if Str.string_match re_builtin id.name 0 + && List.mem_assoc id.name builtins.functions then EF_builtin(id', sg) else EF_external(id', sg) in (id', Gfun(External(ef, args, res, cconv))) -- cgit v1.2.3