This is the mail archive of the
mailing list for the GCC project.
Re: C++ pcc struct return fix
- From: Jason Merrill <jason at redhat dot com>
- To: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com
- Date: Mon, 03 Dec 2001 18:38:51 +0000
- Subject: Re: C++ pcc struct return fix
- References: <200112031640.fB3Ge8YS027655@hiauly1.hia.nrc.ca>
>>>>> "John" == John David Anglin <email@example.com> writes:
>> >>>>> "John" == John David Anglin <firstname.lastname@example.org> 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.
OK, it looks like initialize_handler_parm is already using DIRECT_BIND this
way, so it's just a documentation issue. This patch is OK for trunk and
branch; please also adjust the comment about DIRECT_BIND in cp-tree.h to
reflect this usage.