|
Boost : |
Subject: Re: [boost] [exception] warning about non-virtual destructor - resolution?
From: Joshua Boyce (raptorfactor_at_[hidden])
Date: 2012-04-14 12:31:49
On Sun, Apr 15, 2012 at 1:43 AM, Mathias Gaunard <
mathias.gaunard_at_[hidden]> wrote:
> On 14/04/12 17:18, Daniel James wrote:
>
>> On 14 April 2012 14:00, Mathias Gaunard<mathias.gaunard_at_ens-**lyon.org<mathias.gaunard_at_[hidden]>>
>> wrote:
>>
>>>
>>> Yes, basically, the author said he didn't care and it wasn't virtual by
>>> design, and the compiler warning was bogus.
>>>
>>> In the meantime, it's a major annoyance for all users of this library.
>>> I'm
>>> hoping a sufficient amount of people can point it out to convince the
>>> author
>>> to include the fix.
>>>
>>
>> A better tactic would be to help him reproduce the warning. It looks
>> like he's using '#pragma GCC system_header' which IIRC is an imperfect
>> warning suppression mechanism - although I forget why.
>>
>
> All preprocessor-based warning suppression mechanisms do not work with
> warnings generated when templates are instantiated.
>
>
I'm using the new GCC warning pragmas to disable warnings in the Boost
headers (including those caused by template instantiation) just fine.
Could you provide a sample where this does not work?
Example of what I'm currently doing (yes, I have a stupid amount of
warnings enabled):
#pragma GCC diagnostic push
> #pragma GCC diagnostic ignored "-Weffc++"
> #pragma GCC diagnostic ignored "-Wshadow"
> #pragma GCC diagnostic ignored "-pedantic"
> #pragma GCC diagnostic ignored "-Wconversion"
> #pragma GCC diagnostic ignored "-Wunused-value"
> #pragma GCC diagnostic ignored "-Wstrict-aliasing"
> #pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
> #pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
> #pragma GCC diagnostic ignored "-Wmissing-field-initializers"
> #include <boost/locale.hpp>
> #include <boost/thread.hpp>
> #include <boost/filesystem.hpp>
> #include <boost/archive/text_iarchive.hpp>
> #include <boost/interprocess/ipc/message_queue.hpp>
> #pragma GCC diagnostic pop
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk