Question w.r.t. `'class Foo' has virtual functions but non-virtual destructor` warning.

Florian Weimer fw@deneb.enyo.de
Fri Mar 4 22:33:00 GMT 2005


* Jonathan Wakely:

> e.g. this is undefined behaviour:
>
> class Base {};
> class Derived : public Base {};
>
> Base* p = new Derived;
> delete p;

Wouldn't it make more sense to issue the warning at the point of the
delete, then?



More information about the Gcc mailing list