Bug 1124033 - Replace blanket disabling of VS2015 warnings with C5026 and C5027; r?ehsan draft
authorGregory Szorc <gps@mozilla.com>
Mon, 14 Mar 2016 14:38:12 -0700
changeset 340311 8cf04c34b495fdebd4a5f0d18c3eb438169e8698
parent 340310 10111cf6490c785bdfeafe6a5566c1c4f4b44c9c
child 340312 c596d07a280b1384b849eac486b710ffa490d503
push id12938
push usergszorc@mozilla.com
push dateTue, 15 Mar 2016 04:41:37 +0000
reviewersehsan
bugs1124033, 1119072
milestone48.0a1
Bug 1124033 - Replace blanket disabling of VS2015 warnings with C5026 and C5027; r?ehsan Wv:18 was added in bug 1119072 as a quick way to get the tree building with VS2015. Now that we're closer to rolling out VS2015 support, we want to expose its new warnings. This patch replaces the blanket disabling of new warnings in VS2015 with just disabling C5026 and C5027, which relate to symbols being implicitly defined as deleted. MozReview-Commit-ID: 8uniydfNJns
js/src/old-configure.in
old-configure.in
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -309,20 +309,21 @@ case "$target" in
             _CC_SUITE=12
             MSVC_C_RUNTIME_DLL=msvcr120.dll
             MSVC_CXX_RUNTIME_DLL=msvcp120.dll
         elif test "$_CC_MAJOR_VERSION" = "19"; then
             _CC_SUITE=14
             MSVC_C_RUNTIME_DLL=vcruntime140.dll
             MSVC_CXX_RUNTIME_DLL=msvcp140.dll
 
-            # -Wv:18 disables all warnings introduced after VS2013
-            # See http://blogs.msdn.com/b/vcblog/archive/2014/11/12/improvements-to-warnings-in-the-c-compiler.aspx
-            CFLAGS="$CFLAGS -Wv:18"
-            CXXFLAGS="$CXXFLAGS -Wv:18"
+            # C5026: move constructor was implicitly defined as deleted
+            CXXFLAGS="$CXXFLAGS -wd5026"
+
+            # C5027: move assignment operator was implicitly defined as deleted
+            CXXFLAGS="$CXXFLAGS -wd5027"
 
             # -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146)
             CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-"
 
             # Disable C++11 thread-safe statics due to crashes on XP (bug 1204752)
             # See https://connect.microsoft.com/VisualStudio/feedback/details/1789709/visual-c-2015-runtime-broken-on-windows-server-2003-c-11-magic-statics
             CXXFLAGS="$CXXFLAGS -Zc:threadSafeInit-"
         else
--- a/old-configure.in
+++ b/old-configure.in
@@ -475,20 +475,21 @@ case "$target" in
             MSVC_C_RUNTIME_DLL=vcruntime140.dll
             MSVC_CXX_RUNTIME_DLL=msvcp140.dll
 
             MOZ_CHECK_HEADER(dia2.h, MSVC_HAS_DIA_SDK=1)
             if test -n "$MSVC_HAS_DIA_SDK"; then
                 AC_DEFINE(MSVC_HAS_DIA_SDK)
             fi
 
-            # -Wv:18 disables all warnings introduced after VS2013
-            # See http://blogs.msdn.com/b/vcblog/archive/2014/11/12/improvements-to-warnings-in-the-c-compiler.aspx
-            CFLAGS="$CFLAGS -Wv:18"
-            CXXFLAGS="$CXXFLAGS -Wv:18"
+            # C5026: move constructor was implicitly defined as deleted
+            CXXFLAGS="$CXXFLAGS -wd5026"
+
+            # C5027: move assignment operator was implicitly defined as deleted
+            CXXFLAGS="$CXXFLAGS -wd5027"
 
             # -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146)
             CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-"
 
             # Disable C++11 thread-safe statics due to crashes on XP (bug 1204752)
             # See https://connect.microsoft.com/VisualStudio/feedback/details/1789709/visual-c-2015-runtime-broken-on-windows-server-2003-c-11-magic-statics
             CXXFLAGS="$CXXFLAGS -Zc:threadSafeInit-"