aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/C2Clight.ml
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-03-07 17:49:18 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-03-07 17:49:18 +0000
commitc24a652789e15b33153c1d90c6869eb6e6e28040 (patch)
treee5e5aa2767fe098e3b23f82091ff6d60b0c6d8f2 /cfrontend/C2Clight.ml
parent6a8503115a9952dc793d15d0ea9033b68b30aae6 (diff)
downloadcompcert-c24a652789e15b33153c1d90c6869eb6e6e28040.tar.gz
compcert-c24a652789e15b33153c1d90c6869eb6e6e28040.zip
Handling of builtins, continued.
PrintCsyntax, PrintAsm: improve printing of float literals. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1284 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend/C2Clight.ml')
-rw-r--r--cfrontend/C2Clight.ml14
1 files changed, 14 insertions, 0 deletions
diff --git a/cfrontend/C2Clight.ml b/cfrontend/C2Clight.ml
index 2ad2ac5e..57ee8fd5 100644
--- a/cfrontend/C2Clight.ml
+++ b/cfrontend/C2Clight.ml
@@ -704,6 +704,7 @@ let convertProgram p =
Hashtbl.clear decl_atom;
Hashtbl.clear stringTable;
Hashtbl.clear stub_function_table;
+ let p = Builtins.declarations() @ p in
try
let (funs1, vars1) =
convertGlobdecls (translEnv Env.empty p) [] [] (cleanupGlobals p) in
@@ -743,3 +744,16 @@ let atom_is_readonly a =
type_is_readonly env ty
with Not_found ->
false
+
+(** ** The builtin environment *)
+
+let builtins = {
+ Builtins.typedefs = [
+ (* keeps GCC-specific headers happy, harmless for others *)
+ "__builtin_va_list", C.TPtr(C.TVoid [], [])
+ ];
+ Builtins.functions = [
+ ]
+}
+
+