aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Cprint.ml
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-12-28 08:47:43 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-12-28 08:47:43 +0000
commit8d7c806e16b98781a3762b5680b4dc64764da1b8 (patch)
tree82fb3ecd34e451e4e96f57e2103a694c9acc0830 /cparser/Cprint.ml
parentad12162ff1f0d50c43afefc45e1593f27f197402 (diff)
downloadcompcert-kvx-8d7c806e16b98781a3762b5680b4dc64764da1b8.tar.gz
compcert-kvx-8d7c806e16b98781a3762b5680b4dc64764da1b8.zip
Simpler, more robust emulation of calls to variadic functions:
- C function types and Cminor signatures annotated by calling conventions. esp. vararg / not vararg - Cshmgen: generate correct code for function call where there are more arguments than listed in the function prototype. This is still undefined behavior according to the formal semantics, but correct code is generated. - C2C, */PrintAsm.ml: remove "printf$iif" hack. - powerpc/, checklink/: don't generate stubs for variadic functions. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2386 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cparser/Cprint.ml')
-rw-r--r--cparser/Cprint.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/cparser/Cprint.ml b/cparser/Cprint.ml
index c6864ff3..0bbea683 100644
--- a/cparser/Cprint.ml
+++ b/cparser/Cprint.ml
@@ -458,7 +458,8 @@ let fundef pp f =
fprintf pp "@[<hov 2>%s%a"
(if f.fd_inline then "inline " else "")
storage f.fd_storage;
- simple_decl pp (f.fd_name, TFun(f.fd_ret, Some f.fd_params, f.fd_vararg, []));
+ simple_decl pp (f.fd_name,
+ TFun(f.fd_ret, Some f.fd_params, f.fd_vararg, f.fd_attrib));
fprintf pp "@]@ @[<v 2>{@ ";
List.iter (fun d -> fprintf pp "%a@ " full_decl d) f.fd_locals;
stmt_block pp f.fd_body;