diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2011-06-13 18:11:19 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2011-06-13 18:11:19 +0000 |
commit | a5ffc59246b09a389e5f8cbc2f217e323e76990f (patch) | |
tree | e1bc7cc54518aad7c20645f187cee8110de8cff9 /cparser/Elab.ml | |
parent | 4daccd62b92b23016d3f343d5691f9c164a8a951 (diff) | |
download | compcert-a5ffc59246b09a389e5f8cbc2f217e323e76990f.tar.gz compcert-a5ffc59246b09a389e5f8cbc2f217e323e76990f.zip |
Revised handling of annotation statements, and more generally built-in functions, and more generally external functions
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1672 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cparser/Elab.ml')
-rw-r--r-- | cparser/Elab.ml | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml index 98d9d8bb..b52299a9 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -796,17 +796,6 @@ let elab_expr loc env a = let ty = match b3.edesc with ESizeof ty -> ty | _ -> assert false in { edesc = ECall(b1, [b2; b3]); etyp = ty } -(* Hack to treat __builtin_annotation the CompCert way. - Arguments are treated as per the prototype (const char *, ...). - Result type is type of second argument, or void if only one argument. *) - | CALL((VARIABLE "__builtin_annotation" as a1), al) -> - let b1 = elab a1 in - let bl = List.map elab al in - let bl' = elab_arguments 1 bl [Env.fresh_ident "", - TPtr(TInt(IChar, [AConst]),[])] true in - let tyres = match bl' with _ :: b2 :: _ -> b2.etyp | _ -> TVoid[] in - { edesc = ECall(b1, bl'); etyp = tyres } - | CALL(a1, al) -> let b1 = (* Catch the old-style usage of calling a function without |