This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18272] weird behaviour on temporary return values
- From: "philippe dot haution at mines-paris dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Nov 2004 15:58:36 -0000
- Subject: [Bug c++/18272] weird behaviour on temporary return values
- References: <20041102123746.18272.philippe.haution@mines-paris.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From philippe dot haution at mines-paris dot org 2004-11-02 15:58 -------
Well OK, I'll check with purify that res3 and res4 memory area is released
whether or not res5 has been intialized.
I will from now on use
vector<int>& res5 = *(ert().release());
as the correct way to get a reference to an object returned wrapped into an
auto_ptr.
Regards.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18272