On 11/7/07, Miles Bader <miles.bader@xxxxxxxxx> wrote: > [1] This is a _good idea_ in many cases, but may not make much sense > when there are no other virtual methods and no data members in the > derived class, and the resulting addition of a vtable pointer and > overhead of calling a virtual destructor is often unacceptable. > Yes in this case is it possible for gcc to know that that a virtual destructor warning is not needed? struct A{ A(); ~A(); }; struct B: private A {B();~B();}; int main(){} $ g++ -Weffc++ t.c t.c:2: warning: base class `struct A' has a non-virtual destructor Regards, JT