This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug c++/11157] 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]