diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2014-08-25 08:10:39 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2014-08-25 08:10:39 +0000 |
commit | a68a6ba072bbc5d6496f6a564c4564b911efe3e8 (patch) | |
tree | e2e8724053d81f91ac0ea913d9daf89ec067e55f | |
parent | 1ea7fbeaab845a14b4df803b791e0fc81f61ff9d (diff) |
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
-rw-r--r-- | cfrontend/C2C.ml | 1 |
1 files changed, 1 insertions, 0 deletions
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))) |