Opened 17 years ago

Closed 17 years ago

#489 closed Bugs (Works For Me)

many "virtual functions vs. non-virtual destructor" warnings

Reported by: nobody Owned by: Robert Ramey
Milestone: Component: serialization
Version: None Severity:
Keywords: Cc:

Description

Hello,

seems since RC1_1_33_0 the amount of warning has
increased once more.
Compling with gcc 4.02 with "-Wall -pedantic"

It's pretty annyoing and floods the output unnecessary.
Other parts of boost dont have this problem...

---- snip ---
boost/boost/archive/binary_iarchive.hpp:33: warning:
'class boost::archive::binary_iarchive_i
mpl<boost::archive::binary_iarchive>' has virtual
functions but non-virtual destructor
/home/rmichels/minimon/sdk/boost/boost/archive/binary_iarchive.hpp:76:
warning: 'class boost::archive::binary_iarchive'
has virtual functions but non-virtual destructor

boost/boost/archive/detail/common_oarchive.hpp:31:
warning: 'class boost::archive::detail::co
mmon_oarchive<boost::archive::binary_oarchive>' has
virtual functions but non-virtual destructor
boost/boost/archive/basic_binary_oarchive.hpp:53:
warning: 'class boost::archive::basic_binar
y_oarchive<boost::archive::binary_oarchive>' has
virtual functions but non-virtual destructor

boost/boost/archive/basic_xml_iarchive.hpp:40: warning:
'class boost::archive::basic_xml_iarc
hive<boost::archive::xml_iarchive>' has virtual
functions but non-virtual destructor

boost/boost/archive/xml_iarchive.hpp:39: warning:
'class boost::archive::xml_iarchive_impl<bo
ost::archive::xml_iarchive>' has virtual functions but
non-virtual destructor

--------------------

There are some more ... 
Whats the purpose of not having virtual dtor but
virtual functions?
Could you please supply a solution, this stuff clutters
output much.

Regards,

A. Focht

Change History (1)

comment:1 by Robert Ramey, 17 years ago

Status: assignedclosed
Logged In: YES 
user_id=396141

This is only a warning.  The code makes base class 
destructors private so that the most derived class destructors 
must be explicitly called.  This was a change made in the 
course of addressing issue related to dynamic 
loading/unloading runtime code which serialized data.  To 
avoid these warnings, the serialization tests suppress it 
explicitly.  In the future, we might or might not tweak the code 
to avoid the warning even though its innocuous.

Robert Ramey

Note: See TracTickets for help on using tickets.