From: Vladimir Prus (vladimir_at_[hidden])
Date: 2008-05-03 13:30:29
Emil Dotchevski wrote:
> On Fri, May 2, 2008 at 10:25 PM, Ralf W. Grosse-Kunstleve
> <rwgk_at_[hidden]> wrote:
>> I see, in the meantime you've checked in destructors, but without
>> the virtual keyword. Therefore the warnings didn't go away. Is this
>> an oversight?
> No, I wasn't trying to remove the warnings.
> I believe that the correct way to remove this particular GCC warning
> is to use -Wno-non-virtual-dtor.
> Other compilers generate bogus warnings also, for example msvc warns
> if you use strcpy, but the solution is not to "fix" the code and use
> strcpy_s; instead you disable the warning.
This is not a bogus warning, it often catches real problems in the code.
Just because in your case, the destructor does not need to be virtual,
I should not be forced to globally disable an otherwise good warning.
>> I'm currently testing with the "virtual" added (below). This seems
>> to eliminate all warnings.
> I don't need help "fixing" the warnings; these destructors are
> non-virtual by design.
And what exact problem will arise if there's virtual specifier added
when compiling for gcc? Or it will just spoil the purity of design?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk