Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On 03/13/2012 11:43 AM, Tor Lillqvist wrote:
Hmm, now that the reason for using  -Wno-non-virtual-dtor has been
documented (760e0d2d7329ca6fc00a8439715bae38becb168a ), I wonder,
should we globally then also turn off the corresponding MSVC warning?

That would be kinda predictable (from a "the usual waste of time"
point of view), as I and others have committed over times dozens of
WaE fixes for this very issue... (I.e. added a virtual no-op
destructor in most cases).

Or does gcc and MSVC warn for different cases of lack of virtual
destructor? Is it certain that in all cases this warning is bogus, in
both the gcc and MSVC cases?

I think the warning is generally non-bogus. The problem is that we were not able to change the cppumaker-generated C++ headers without breaking backwards compatiblity[1], and GCC was somewhat over-ambitious with this warning[2], so had to disable it -- even if we would have preferred to keep it on.

[1] There might be a way around that after all, adding a non-virtual, protected destructor to the C++ classes representing UNO interfaces. Will look into that.

[2] <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302> "-Wnon-virtual-dtor should't complain of protected dtor" apparently solves the problem for cppuhelper/propertysetmixin.hxx that originally caused problems. Seems to be available at least in the Fedora-16 GCC 4.6.2. (And -Wall appears to no longer automatically enable -Wnon-virtual-dtor.) Maybe all this allows us to re-enable -Wnon-virtual-dtor after all; will look into that.

Stephan

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.