[Libreoffice-commits] .: solenv/gbuild

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Dec 1 23:45:18 PST 2012


 solenv/gbuild/platform/com_MSC_defs.mk |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit afa3ed9eafd50de4fa07b37acd4a317d515bf09d
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Sun Dec 2 09:25:56 2012 +0200

    Disable MSVC warning C4986
    
    This is a new warning in Visual Studio 2012.
    
    Otherwise, when using /Wall (as we do), you get tons of warnings from
    the compiler's own headers:
    
    .../crtdbg.h(1041) : warning C4986: 'operator new[]': exception
      specification does not match previous declaration
    .../new(79) : see declaration of 'operator new[]'
    
    It seems to be generally recommended not to use /Wall with MSVC (that
    option does not really have the same intended use as gcc's -Wall,
    people say), but use /W4 instead:
    http://stackoverflow.com/a/4001759/259398
    
    So maybe we should change that -Wall to -W4?
    
    Also, we should go over the long list of -wd options and check each
    whether we really want it or not. Maybe, while at it, add a comment
    for each giving its one-line meaning.

diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index aca825c..5017283 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -184,6 +184,20 @@ gb_CXXFLAGS := \
 	-Zc:forScope,wchar_t- \
 	-Zm500 \
 
+# New warning(s) in Visual Studio 2012, let's try disabling these only
+# for that specific compiler version, in case a later one will not
+# need them disabled.
+ifeq ($(VCVER),110)
+
+# C4986: 'function': exception specification does not match previous
+#   declaration. This warning is generated by VS2012 headers (!), and is
+#   C++-only.
+
+gb_CXXFLAGS += \
+	-wd4986 \
+
+endif
+
 gb_STDLIBS := \
 	advapi32.lib \
 


More information about the Libreoffice-commits mailing list