This is the mail archive of the gcc@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: Question w.r.t. `'class Foo' has virtual functions but non-virtualdestructor` warning.


Chris Lattner <sabre@nondot.org> writes:

| Karel Gardas wrote:
| > Yes, that's undefined, but I just define this class to be able to do:
| > Foo* f = dynamic_cast<Foo*>(x);
| > l = f->iiop_version();
| > there is nothing like delete involved. Anyway, I agree with you that
| > emit warning about this is probably the right thing to do and so I
| > will fix my code.
| 
| I've run into this warning with C++ code as well, and it is quite
| annoying.

Quite very annoying.  

[...]

| It seems that the warning could be improved to be emitted when the
| *delete* is seen of a class without a virtual dtor (but that does have

Agreed.

-- Gaby


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