Jason Merrill wrote:
On Thu, 24 Mar 2005 11:29:09 -0800, Mark Mitchell <[EMAIL PROTECTED]> wrote:


19317 C++ problems with temporary return values

 This patch breaks Qt builds.  One of my patches is implicated, but I
 believe that the consensus is that this is an NRV bug.  Jason made
 several attempts at fixing this.  Does anyone know what the current
 status is?


Basically, the problem is that the return slot optimization in expand_call
is incompatible with the NRVO; if the callee shares the return slot with a
variable, the caller can't share it with an object which escapes.
expand_call has no way of checking whether "target" escapes, so I think we
probably just need to disable the optimization there.

I agree that now is not the time for heroic fixes. Would you be willing to work up a patch to disable the expand_call optimization?


Thanks,

--
Mark Mitchell
CodeSourcery, LLC
[EMAIL PROTECTED]
(916) 791-8304

Reply via email to