This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/54351] ~unique_ptr() should not set stored pointer to null
- 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: Sun, 26 Aug 2012 00:29:46 +0000
- Subject: [Bug libstdc++/54351] ~unique_ptr() should not set stored pointer to null
- Auto-submitted: auto-generated
- References: <bug-54351-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54351
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-08-26 00:29:46 UTC ---
Author: redi
Date: Sun Aug 26 00:29:41 2012
New Revision: 190681
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190681
Log:
2012-08-26 Jonathan Wakely <jwakely.gcc@gmail.com>
Geoff Romer <gromer@google.com>
PR libstdc++/54351
* include/bits/unique_ptr.h (unique_ptr<T>::~unique_ptr): Do not use
reset().
(unique_ptr<T[]>::~unique_ptr()): Likewise.
* testsuite/20_util/unique_ptr/54351.cc: New.
* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust dg-error
line numbers.
Added:
branches/gcc-4_7-branch/libstdc++-v3/testsuite/20_util/unique_ptr/54351.cc
- copied, changed from r190679,
branches/gcc-4_7-branch/libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635_neg.cc
Modified:
branches/gcc-4_7-branch/libstdc++-v3/ChangeLog
branches/gcc-4_7-branch/libstdc++-v3/include/bits/unique_ptr.h
branches/gcc-4_7-branch/libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635_neg.cc