This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: named return value optimization
- From: Jeffrey A Law <law at redhat dot com>
- To: Stephane Aubry <stephane at algorithmics dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sat, 03 Jul 2004 17:11:18 -0600
- Subject: Re: named return value optimization
- Organization: Red Hat, Inc
- References: <40E6F44D.8020302@algorithmics.com>
- Reply-to: law at redhat dot com
On Sat, 2004-07-03 at 12:00, Stephane Aubry wrote:
> Hello,
>
> I am wondering why this optimization has been removed from gcc 3.0.
> There is apparently no explanation for it in the manual which says that
> obsoleted features have been replaced by superior alternatives.
> Yet no such alternative seems to be provided in this case.
The optimizers are no longer dependent on the non-standard syntax
previously used to implement the NRV optimization. ie, the compiler
should be able to take standard C++ code and determine when it is
safe and profitable to apply the NRV optimization.
If you have cases where the NRV optimization is not being performed
and you think it should be performed, feel free to send them along
for us to investigate.
Jeff