Mercurial > hg > CbC > old > device
changeset 871:662e2b778fc2
handle extra arguments for externed struct returning function.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 01 Apr 2014 11:28:49 +0900 |
parents | e3de6b70abe9 |
children | 11abda130b91 |
files | mc-codegen.c mc-parse.c |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mc-codegen.c Tue Apr 01 09:47:38 2014 +0900 +++ b/mc-codegen.c Tue Apr 01 11:28:49 2014 +0900 @@ -3380,6 +3380,12 @@ if(type0>0&&(car(type0)==FUNCTION || car(type0)==CODE)) { if (mode==GDECL) { fcheck(n); + NMTBL *fsave = fnptr; + int save = struct_return; + fnptr = n; + fdecl_struct(n->ty); /* insert extra argument for struct passing */ + struct_return = save; + fnptr = fsave; set_ctmode(n,ctmode); set_attributes(n,attr); return n;