|
Boost : |
Subject: Re: [boost] [exception] warning about non-virtual destructor - resolution?
From: Olaf van der Spek (ml_at_[hidden])
Date: 2012-04-18 07:16:58
On Wed, Apr 18, 2012 at 12:00 PM, Mathias Gaunard
<mathias.gaunard_at_[hidden]> wrote:
>> Can I see a command line and a complete cpp file that triggers the
>> warning?
>
>
> You've already been given the example where including checked_delete before
> exception_ptr is enough to generate the warning.
>
> It has also been pointed out that if you're not getting the warning, you're
> probably not using a real gcc 4.7.0.
Really?
olaf_at_testing:~$ g++-4.7 -c -Wall demo.cpp
$ cat demo.cpp
#include <boost/checked_delete.hpp>
#include <boost/exception_ptr.hpp>
$ g++-4.7 -c -Wall demo.cpp -Wdelete-non-virtual-dtor
$ g++-4.7 -v
Using built-in specs.
COLLECT_GCC=g++-4.7
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian
4.7.0-3' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --enable-plugin --enable-objc-gc
--with-arch-32=i586 --with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.0 (Debian 4.7.0-3)
-- Olaf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk