Bug 1266809 - Suppress MSVC warning C4595; r?ted draft
authorGregory Szorc <gps@mozilla.com>
Fri, 22 Apr 2016 10:43:20 -0700
changeset 355480 4fdd6d4ea6d5893a2833da45015d52ddc831ec3d
parent 355439 b3112d5811f9c568309e655f78522762898774e2
child 355485 51b9c8ba360e5b0bf9248f1213acd3c7a6506208
push id16298
push usergszorc@mozilla.com
push dateFri, 22 Apr 2016 17:44:42 +0000
reviewersted
bugs1266809, 1261719
milestone48.0a1
Bug 1266809 - Suppress MSVC warning C4595; r?ted C4595 is "'operator new': non-member operator new or delete functions may not be declared inline". This warning is already suppressed for newer versions of clang and is already suppressed in old-configure.in (see 542411a64ac4 and bug 1261719). MozReview-Commit-ID: 32kFKht8edU
js/src/old-configure.in
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -203,18 +203,20 @@ 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.
         # _CRT_SECURE_NO_WARNINGS disables warnings about using MSVC-specific
         # secure CRT functions.
         # MSVC warning C4819 warns some UTF-8 characters (e.g. copyright sign)
         # on non-Western system locales even if it is in a comment.
+        # MSVC warning wd4595 warns non-member operator new or delete functions
+        # may not be declared inline, as of VS2015 Update 2.
         CFLAGS="$CFLAGS -wd4819"
-        CXXFLAGS="$CXXFLAGS -wd4345 -wd4351 -wd4800 -wd4819 -D_CRT_SECURE_NO_WARNINGS"
+        CXXFLAGS="$CXXFLAGS -wd4345 -wd4351 -wd4800 -wd4819 -wd4595 -D_CRT_SECURE_NO_WARNINGS"
         AC_LANG_SAVE
         AC_LANG_C
         AC_TRY_COMPILE([#include <stdio.h>],
             [ printf("Hello World\n"); ],,
             AC_MSG_ERROR([\$(CC) test failed.  You must have MS VC++ in your path to build.]) )
 
         AC_LANG_CPLUSPLUS
         AC_TRY_COMPILE([#include <new.h>],