Bug 1461304 - Windows bustage eg: /js/src/wasm/WasmBinaryToAST.cpp when Gecko 62 merges to Beta on 2018-06-14. r=froydnj.
authorJulian Seward <jseward@acm.org>
Sun, 27 May 2018 09:39:06 +0200
changeset 476791 2435b35bcd6863fadd0007fd73f83079d351743a
parent 476790 bf36035bed13ab8fa1777955a299837d3e10d398
child 476792 6b9076ac236cb0f9f301bc601eac03f9ec4205df
child 476801 4408bb821f5b389585b859ec403b948bb8ec153a
push id1757
push userffxbld-merge
push dateFri, 24 Aug 2018 17:02:43 +0000
treeherdermozilla-release@736023aebdb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1461304
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1461304 - Windows bustage eg: /js/src/wasm/WasmBinaryToAST.cpp when Gecko 62 merges to Beta on 2018-06-14. r=froydnj. Some configurations of SpiderMonkey wind up producing C++ switch statements of the form switch (..) { default: break; } We hoped that they would simply be optimised out without comment. But MSVC warns about the lack of non-default cases, which then are escalated into errors, causing the build to fail. This commit simply disables that warning feature when building with MSVC.
js/src/old-configure.in
old-configure.in
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -707,16 +707,19 @@ case "$target" in
         # and requires workarounds for perfectly valid code.  Also, GCC/clang
         # don't warn about it by default. So for consistency/sanity, we turn
         # it off on MSVC, too.
         # MSVC warning C4267 warns for narrowing type conversions from size_t
         # to 32-bit integer types on 64-bit platforms.  Since this is virtually
         # the same thing as C4244, we disable C4267, too.
         CFLAGS="$CFLAGS -wd4244 -wd4267"
         CXXFLAGS="$CXXFLAGS -wd4244 -wd4267 -wd4251"
+        # Silence "warning C4065: switch statement contains 'default' but no
+        # 'case' labels".  See bug 1461304.
+        CXXFLAGS="$CXXFLAGS -wd4065"
         if test -n "$CLANG_CL"; then
             # XXX We should combine some of these with our generic GCC-style
             # warning checks.
             #
             # Suppress the clang-cl warning for the inline 'new' and 'delete' in mozalloc
             CXXFLAGS="$CXXFLAGS -Wno-inline-new-delete"
             # We use offsetof on non-POD objects all the time.
             # We also suppress this warning on other platforms.
--- a/old-configure.in
+++ b/old-configure.in
@@ -938,16 +938,19 @@ case "$target" in
         # MSVC warning C4800 warns when a value is implicitly cast to bool,
         # because this also forces narrowing to a single byte, which can be a
         # perf hit.  But this matters so little in practice (and often we want
         # that behavior) that it's better to turn it off.
         # MSVC warning C4595 warns non-member operator new or delete functions
         # may not be declared inline, as of VS2015 Update 2.
         CFLAGS="$CFLAGS -wd4244 -wd4267"
         CXXFLAGS="$CXXFLAGS -wd4251 -wd4244 -wd4267 -wd4800 -wd4595"
+        # Silence "warning C4065: switch statement contains 'default' but no
+        # 'case' labels".  See bug 1461304.
+        CXXFLAGS="$CXXFLAGS -wd4065"
         if test -n "$CLANG_CL"; then
             # XXX We should combine some of these with our generic GCC-style
             # warning checks.
             #
             # Suppress the clang-cl warning for the inline 'new' and 'delete' in mozalloc
             CXXFLAGS="$CXXFLAGS -Wno-inline-new-delete"
             # We use offsetof on non-POD objects all the time.
             # We also suppress this warning on other platforms.