Boost logo

Boost Users :

Subject: [Boost-users] compiler warnings in
From: Chris Cleeland (chris.cleeland_at_[hidden])
Date: 2012-01-17 17:26:10


Using Boost 1_47_0, in checking some automated builds on a CentOS 4
machine, I get the following errors from the compiler there (gcc
v3.4.6).

../../../boost/exception/detail/error_info_impl.hpp:43: warning:
`class boost::error_info<tag_answer, int>' has virtual functions but
non-virtual destructor

Indeed, if I go back and compile the boost tests for exceptions, I get
the same compiler warning.

GCC 3.4.6 is listed as a tested compiler for 1.47.0; is this warning
then expected? Or not?

The change that silences the compiler is declaring the destructor of
boost::error_info_base to be virtual, but I'm not entirely sure if
that's correct. I'm also hesitant to make this change only for CentOS
4 as that will change the object layout in memory and could result in
linker confusion, though one could argue that linking against the
wrong library is an error unto itself.

If there's a more appropriate place to report/discuss these sorts of
issues, please point me towards them.

Thanks!

-- 
Chris Cleeland

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net