diff options
author | Tor Lillqvist <tlillqvist@suse.com> | 2012-12-02 09:25:56 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2012-12-02 09:44:37 +0200 |
commit | afa3ed9eafd50de4fa07b37acd4a317d515bf09d (patch) | |
tree | 2566f819bfadb85b9e82406021449a9ec98e191f /solenv | |
parent | e93dd02e30fa6b06a04dcd83a1403a655cf08041 (diff) |
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.
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/com_MSC_defs.mk | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk index aca825cba84e..5017283a2566 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 \ |