[Bug c++/11157] Annoying warning message

gdr@integrable-solutions.net gcc-bugzilla@gcc.gnu.org
Thu Jun 12 12:04:00 GMT 2003


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



------- Additional Comments From gdr@integrable-solutions.net  2003-06-12 12:04 -------
Subject: Re:  Annoying warning message

"giovannibajo@libero.it" <gcc-bugzilla@gcc.gnu.org> writes:

| 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.

I disagree with that analysis.  Check "Inside the C++ Object Modele"
by Lippman for valide case uses.  The diagnostic is just plain
annoying in this case.

| 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. 

Yes, but he didn't.  Did he?  There is no point in boring him.

I would suggest not to close this issue based on the analysis you gave.


-- Gaby



More information about the Gcc-bugs mailing list