
25 Aug
2005
25 Aug
'05
4:46 p.m.
Jonathan Wakely wrote:
Andreas Huber wrote:
I'm at least reluctant to do that. Given the abundance of platforms that support C++ we can never be sure that there is not one where performance will suffer significantly when the dtors are made virtual. From the 3 compilers I use GCC is the only one that a) has such a non-virtual dtor warning *and* b) doesn't have a pragma to turn off warnings. Hopefully, the latter will soon be taken care of...
GCC does have -Wno-non-virtual-dtor to disable the warning.
But it doesn't have a way to leave the warning on for the useful cases and disable it when it's useless (when the destructor is protected, for instance.) :-)