[Bf-committers] warnings

Arne Schmitz arne.schmitz at gmx.net
Sat Apr 8 09:05:38 CEST 2006


Am Freitag, 7. April 2006 22:29 schrieb Jean-Luc Peurière:
> With Gcc4 there is an awful lot of warnings of this type in the C++
> code :
>
> warning: 'class ...' has virtual functions but non-virtual destructor
>
> elbeem and ghost have some, but there is quite a number in bullet code.
>
> if the warning is valid this should be corrected. if not, can someone
>
> check what is the valid flag for disabling that in gcc4.

This warning can be disabled by -Wno-non-virtual-dtor. It is valid because 
with a polymorphic class that contains virtual functions, you might need a 
virtual destructor. If you don't have one, the wrong destructor might get 
called and produce memory leaks or worse stuff.

Arne

-- 
Dipl.-Inform. Arne Schmitz              Phone   +49 (0)241 80-21814
Computer Graphics Group                 Fax     +49 (0)241 80-22899
RWTH Aachen University                  http://www.rwth-graphics.de
Ahornstrasse 55, 52074 Aachen, Germany
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://projects.blender.org/pipermail/bf-committers/attachments/20060408/d31db6fa/attachment.pgp


More information about the Bf-committers mailing list