This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55098] c++11: move constructor doesn't run at all (but with a hammer)
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 27 Oct 2012 16:03:17 +0000
- Subject: [Bug c++/55098] c++11: move constructor doesn't run at all (but with a hammer)
- Auto-submitted: auto-generated
- References: <bug-55098-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55098
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-27 16:03:17 UTC ---
(In reply to comment #2)
> See http://en.wikipedia.org/wiki/Return_value_optimization
> Use -fno-elide-constructors to disable constructor elision
And also http://en.wikipedia.org/wiki/Copy_elision which says "It is generally
not recommended to disable this important optimization."