This is the mail archive of the
mailing list for the GCC project.
Re: does g++ perform return-value-optimization?
- From: Jason Merrill <jason at redhat dot com>
- To: Gabriel Dos Reis <gdr at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 02 May 2002 10:31:41 +0100
- Subject: Re: does g++ perform return-value-optimization?
- References: <3CCD4028.firstname.lastname@example.org><email@example.com>
>>>>> "Gabriel" == Gabriel Dos Reis <firstname.lastname@example.org> writes:
> Jeff Lee <email@example.com> writes:
> | Hi,
> | Does anyone know if g++ performs return-value-optimization?
> GCC-3.1, or later, does.
> | If so, how do you enable it?
> It is turned on at optimization level 2 or with -felide-constructors.
Actually, -felide-constructors, and thus the return value optimization, is
on by default.