* How to turn off NRVO in gcc
@ 2007-11-07 14:17 Debarshi Sanyal
2007-11-07 16:16 ` Ian Lance Taylor
0 siblings, 1 reply; 4+ messages in thread
From: Debarshi Sanyal @ 2007-11-07 14:17 UTC (permalink / raw)
To: gcc
Hi,
Is there any way to turn off "named return value optimization"
(NRVO) while compiling a C++ program with g++?
Please reply. This is very urgent.
Regards,
Debarshi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to turn off NRVO in gcc
2007-11-07 14:17 How to turn off NRVO in gcc Debarshi Sanyal
@ 2007-11-07 16:16 ` Ian Lance Taylor
2007-11-07 16:40 ` Joe Buck
0 siblings, 1 reply; 4+ messages in thread
From: Ian Lance Taylor @ 2007-11-07 16:16 UTC (permalink / raw)
To: Debarshi Sanyal; +Cc: gcc
"Debarshi Sanyal" <debarshisanyal@gmail.com> writes:
> Is there any way to turn off "named return value optimization"
> (NRVO) while compiling a C++ program with g++?
This question is not appropriate for gcc@gcc.gnu.org, which is for
developers of gcc. It is appropriate for gcc-help@gcc.gnu.org.
Please take any followups to that mailing list. Thanks.
The answer to your question is no. g++ will always implement NRVO
when possible.
Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to turn off NRVO in gcc
2007-11-07 16:16 ` Ian Lance Taylor
@ 2007-11-07 16:40 ` Joe Buck
2007-11-07 16:41 ` Ian Lance Taylor
0 siblings, 1 reply; 4+ messages in thread
From: Joe Buck @ 2007-11-07 16:40 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: Debarshi Sanyal, gcc
On Wed, Nov 07, 2007 at 07:48:53AM -0800, Ian Lance Taylor wrote:
> "Debarshi Sanyal" <debarshisanyal@gmail.com> writes:
>
> > Is there any way to turn off "named return value optimization"
> > (NRVO) while compiling a C++ program with g++?
>
> This question is not appropriate for gcc@gcc.gnu.org, which is for
> developers of gcc. It is appropriate for gcc-help@gcc.gnu.org.
> Please take any followups to that mailing list. Thanks.
>
> The answer to your question is no. g++ will always implement NRVO
> when possible.
You forgot about -fno-elide-constructors , Ian. I've needed it in
the past to work around a bug in profiling; there's a PR for this.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to turn off NRVO in gcc
2007-11-07 16:40 ` Joe Buck
@ 2007-11-07 16:41 ` Ian Lance Taylor
0 siblings, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 2007-11-07 16:41 UTC (permalink / raw)
To: Joe Buck; +Cc: Debarshi Sanyal, gcc
Joe Buck <Joe.Buck@synopsys.COM> writes:
> On Wed, Nov 07, 2007 at 07:48:53AM -0800, Ian Lance Taylor wrote:
> > "Debarshi Sanyal" <debarshisanyal@gmail.com> writes:
> >
> > > Is there any way to turn off "named return value optimization"
> > > (NRVO) while compiling a C++ program with g++?
> >
> > This question is not appropriate for gcc@gcc.gnu.org, which is for
> > developers of gcc. It is appropriate for gcc-help@gcc.gnu.org.
> > Please take any followups to that mailing list. Thanks.
> >
> > The answer to your question is no. g++ will always implement NRVO
> > when possible.
>
> You forgot about -fno-elide-constructors , Ian. I've needed it in
> the past to work around a bug in profiling; there's a PR for this.
Ah, tricky. Thanks.
Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-11-07 16:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-07 14:17 How to turn off NRVO in gcc Debarshi Sanyal
2007-11-07 16:16 ` Ian Lance Taylor
2007-11-07 16:40 ` Joe Buck
2007-11-07 16:41 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).