Bug 928808: Suppress clang warnings (in newer clang versions) about inline 'new' and 'delete'. r=glandium
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 12 Feb 2014 10:55:25 -0800
changeset 185723 bc69628e2ad1b32e198876bf53a42493c0275889
parent 185722 f978835321f178bfaaaeb3a6fbdc6a7b3df6a284
child 185724 c80de8d196af3d691fcc0ae79b2961b4e501651c
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs928808
milestone30.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 928808: Suppress clang warnings (in newer clang versions) about inline 'new' and 'delete'. r=glandium
configure.in
--- a/configure.in
+++ b/configure.in
@@ -1450,18 +1450,22 @@ if test "$GNU_CXX"; then
     MOZ_CXX_SUPPORTS_WARNING(-W, error=return-type, ac_cxx_has_werror_return_type)
     MOZ_CXX_SUPPORTS_WARNING(-W, error=int-to-pointer-cast, ac_cxx_has_werror_int_to_pointer_cast)
     MOZ_CXX_SUPPORTS_WARNING(-W, type-limits, ac_cxx_has_wtype_limits)
     MOZ_CXX_SUPPORTS_WARNING(-W, empty-body, ac_cxx_has_wempty_body)
     MOZ_CXX_SUPPORTS_WARNING(-W, sign-compare, ac_cxx_has_sign_compare)
 
     # Turn off the following warnings that -Wall turns on:
     # -Wno-invalid-offsetof - we use offsetof on non-POD types frequently
+    # -Wno-inline-new-delete - we inline 'new' and 'delete' in mozalloc
+    #   for performance reasons, and because GCC and clang accept it (though
+    #   clang warns about it).
     #
     MOZ_CXX_SUPPORTS_WARNING(-Wno-, invalid-offsetof, ac_cxx_has_wno_invalid_offsetof)
+    MOZ_CXX_SUPPORTS_WARNING(-Wno-, inline-new-delete, ac_cxx_has_wno_inline_new_delete)
 
     if test -z "$INTEL_CXX" -a -z "$CLANG_CXX"; then
        # Don't use -Wcast-align with ICC or clang
        case "$CPU_ARCH" in
            # And don't use it on hppa, ia64, sparc, arm, since it's noisy there
            hppa | ia64 | sparc | arm)
            ;;
            *)