This is the mail archive of the
mailing list for the GCC project.
Re: C++ pcc struct return fix
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: jason at redhat dot com (Jason Merrill)
- Cc: gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com
- Date: Mon, 3 Dec 2001 11:40:08 -0500 (EST)
- Subject: Re: C++ pcc struct return fix
> >>>>> "John" == John David Anglin <email@example.com> writes:
> > * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
> > call to build_aggr_init.
> DIRECT_BIND is for binding temporaries to reference variables; I'm not sure
> why this would have any effect on your problem. Perhaps rather than call
> build_aggr_init here, we should be doing an explicit constructor call as in
It is a while since I looked at this problem but roughly what happens is
that build_aggr_init calls ocp_convert which calls simplify_aggr_init_exprs_r
which calls build_aggr_init which calls ... Look at expand_default_init.
I think this is why DIRECT_BIND has an affect.
I do know that the code generated for function returning a struct seemed
reasonable when DIRECT_BIND was added to the flags in the call.
J. David Anglin firstname.lastname@example.org
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)