http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57111
jb changed:
What|Removed |Added
Status|RESOLVED|VERIFIED
--- Comment #8 from jb 2013-04-3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57111
--- Comment #7 from jb 2013-04-30 22:22:44 UTC
---
(In reply to comment #6)
> (In reply to comment #5)
> > It seems to me that the option "free-nonheap-object" does not work in gcc.
>
> You need to add -O2 (maybe -O1 is enough, sometimes you ne
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57111
--- Comment #5 from jb 2013-04-30 21:57:00 UTC
---
(In reply to comment #4)
> gcc has -Wfree-nonheap-object, which works for free but not for delete or
> delete[]. Extending it to these functions seems like a reasonable RFE.
I agree wit
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57111
--- Comment #2 from jb 2013-04-29 14:04:38 UTC
---
(In reply to comment #1)
> That's not how you use unique_ptr.
That's besides the point when you get a dump.
If the proper use of unique_ptr with array is:
unique_ptr up(new int[4]); //
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57111
Bug #: 57111
Summary: Core dump - invalid pointer detected after
std::unique_ptr
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRME