Consider enabling -Wno-expansion-to-defined for gcc 7
authorannulen@yandex.ru <annulen@yandex.ru@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Sep 2017 21:23:10 +0000 (21:23 +0000)
committerannulen@yandex.ru <annulen@yandex.ru@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Sep 2017 21:23:10 +0000 (21:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=167643

Reviewed by Michael Catanzaro.

Don't disable -Wexpansion-to-defined for Clang.
As suggested by Nico Weber, this warning produces false positives with
GCC only.

* Source/cmake/WebKitCompilerFlags.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222112 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/cmake/WebKitCompilerFlags.cmake

index f7369c2..f99085b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2017-09-15  Konstantin Tokarev  <annulen@yandex.ru>
+
+        Consider enabling -Wno-expansion-to-defined for gcc 7
+        https://bugs.webkit.org/show_bug.cgi?id=167643
+
+        Reviewed by Michael Catanzaro.
+
+        Don't disable -Wexpansion-to-defined for Clang.
+        As suggested by Nico Weber, this warning produces false positives with
+        GCC only.
+
+        * Source/cmake/WebKitCompilerFlags.cmake:
+
 2017-09-14  Yousuke Kimoto  <yousuke.kimoto@sony.com>
 
         [WinCairo] Add an option to build WebKitLegacy or WebKit
index d99bc1f..509694b 100644 (file)
@@ -125,12 +125,16 @@ if (COMPILER_IS_GCC_OR_CLANG)
     # Warnings to be disabled
     # FIXME: We should probably not be disabling -Wno-maybe-uninitialized?
     WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Qunused-arguments
-                                         -Wno-expansion-to-defined
                                          -Wno-maybe-uninitialized
                                          -Wno-noexcept-type
                                          -Wno-parentheses-equality)
 endif ()
 
+# -Wexpansion-to-defined produces false positives with GCC but not Clang
+# https://bugs.webkit.org/show_bug.cgi?id=167643#c13
+if (CMAKE_COMPILER_IS_GNUCXX)
+    WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-expansion-to-defined)
+endif ()
 
 # Ninja tricks compilers into turning off color support.
 if (CMAKE_GENERATOR STREQUAL "Ninja")