[Webkit-unassigned] [Bug 155048] [CMake] Enable -Wnon-virtual-dtor
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 4 14:59:22 PST 2016
https://bugs.webkit.org/show_bug.cgi?id=155048
--- Comment #1 from Michael Catanzaro <mcatanzaro at igalia.com> ---
For the record:
-Wdelete-non-virtual-dtor (C++ and Objective-C++ only)
Warn when "delete" is used to destroy an instance of a class that
has virtual functions and non-virtual destructor. It is unsafe to
delete an instance of a derived class through a pointer to a base
class if the base class does not have a virtual destructor. This
warning is enabled by -Wall.
-Wnon-virtual-dtor (C++ and Objective-C++ only)
Warn when a class has virtual functions and an accessible non-
virtual destructor itself or in an accessible polymorphic base
class, in which case it is possible but unsafe to delete an
instance of a derived class through a pointer to the class itself
or base class. This warning is automatically enabled if -Weffc++
is specified.
Note that we currently use -Wall, but not spammy and nonstandard -Weffc++ (if you haven't heard of -Weffc++, it enables warnings about things Scott Meyers tells us not to do :)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160304/3ccd808f/attachment-0001.html>
More information about the webkit-unassigned
mailing list