This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11157] Annoying warning message
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jun 2003 21:12:08 -0000
- Subject: [Bug c++/11157] Annoying warning message
- References: <20030611183824.11157.emild@collectivestudios.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11157
giovannibajo@libero.it changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
------- Additional Comments From giovannibajo@libero.it 2003-06-11 21:12 -------
Instead, the warning looks very appropriate to me. If you use it as a base
class, you can get weird behaviours because the destructor is not virtual. In
other words, if you deleted your derived object through a Base*, only the
destructor in Base would be called and not the destructors in derived object.
In other words, GCC is telling you that this way you are making way to not
wanted object slicing and incomplete destructions. I rate this warning as very
useful.