[exception] gcc 4.7 non-virtual destructor warning

/usr/local/include/boost/checked_delete.hpp:34:5: warning: deleting object of polymorphic class type 'boost::error_info<boost::tag_original_exception_type, const std::type_info*>' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] Is there a reason why the destructor isn't virtual? This only shows up when I compile with -Wall, which I like to do because it catches many important errors. Unfortunately, if I have to filter out boost warnings it makes it less effective.. particularly when the warning is actually about 30 lines long in my console. Dan

On Tue, Jun 19, 2012 at 10:40 PM, Daniel Larimer <dlarimer@gmail.com> wrote:
/usr/local/include/boost/checked_delete.hpp:34:5: warning: deleting object of polymorphic class type 'boost::error_info<boost::tag_original_exception_type, const std::type_info*>' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
Please check with the current trunk revision, I've made the destructor virtual as a workaround for this warning. It'll get merged into the release branch soon, with a few other minor changes. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode

On Wed, Jun 20, 2012 at 2:27 AM, Emil Dotchevski <emildotchevski@gmail.com> wrote:
On Tue, Jun 19, 2012 at 10:40 PM, Daniel Larimer <dlarimer@gmail.com> wrote:
/usr/local/include/boost/checked_delete.hpp:34:5: warning: deleting object of polymorphic class type 'boost::error_info<boost::tag_original_exception_type, const std::type_info*>' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
Please check with the current trunk revision, I've made the destructor virtual as a workaround for this warning. It'll get merged into the release branch soon, with a few other minor changes.
The schedule calls for starting to build the 1.50.0 tomorrow, so please merge right away if you think the fix is ready. --Beman

On Wed, Jun 20, 2012 at 5:07 PM, Beman Dawes <bdawes@acm.org> wrote:
On Wed, Jun 20, 2012 at 2:27 AM, Emil Dotchevski <emildotchevski@gmail.com> wrote:
On Tue, Jun 19, 2012 at 10:40 PM, Daniel Larimer <dlarimer@gmail.com> wrote:
/usr/local/include/boost/checked_delete.hpp:34:5: warning: deleting object of polymorphic class type 'boost::error_info<boost::tag_original_exception_type, const std::type_info*>' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
Please check with the current trunk revision, I've made the destructor virtual as a workaround for this warning. It'll get merged into the release branch soon, with a few other minor changes.
The schedule calls for starting to build the 1.50.0 tomorrow, so please merge right away if you think the fix is ready.
Beman, thank you for the reminder -- it's done. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode
participants (3)
-
Beman Dawes
-
Daniel Larimer
-
Emil Dotchevski