This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/64399] g++ does not diagnose when upcasting owning pointer (e.g. unique_ptr) with non-virtual destructor
- 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: Wed, 24 Dec 2014 08:58:56 +0000
- Subject: [Bug libstdc++/64399] g++ does not diagnose when upcasting owning pointer (e.g. unique_ptr) with non-virtual destructor
- Auto-submitted: auto-generated
- References: <bug-64399-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64399
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It might be valid with a custom deleter, but the example shown has undefined
behaviour.