[Webkit-unassigned] [Bug 167643] Consider enabling -Wno-expansion-to-defined for gcc 7

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 9 06:11:43 PDT 2017


Michael Catanzaro <mcatanzaro at igalia.com> changed:

           What    |Removed                     |Added
                 CC|                            |darin at apple.com

--- Comment #1 from Michael Catanzaro <mcatanzaro at igalia.com> ---
So we have to decide whether or not we care that our USE, PLATFORM, CPU, and ENABLE macros trigger undefined behavior. This is probably the most pervasive reliance on undefined behavior I've ever seen. On the other hand, we know it works fine on all major platforms, and I don't see any way to fix this. So I'm fine with adding -Wno-expansion-to-defined, but I'd like more opinions.

Anyway, it looks like you came up with this patch, we've been carrying this in Fedora for several months to get WebKit to build with GCC 7:

diff -up webkitgtk-2.15.90/Source/cmake/OptionsCommon.cmake.gcc7 webkitgtk-2.15.90/Source/cmake/OptionsCommon.cmake
--- webkitgtk-2.15.90/Source/cmake/OptionsCommon.cmake.gcc7     2017-02-21 09:57:13.168916004 +0100
+++ webkitgtk-2.15.90/Source/cmake/OptionsCommon.cmake  2017-02-21 09:58:12.811563156 +0100
@@ -41,6 +41,8 @@ if (COMPILER_IS_GCC_OR_CLANG)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-exceptions -fno-strict-aliasing")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-strict-aliasing -fno-rtti")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-expansion-to-defined")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-expansion-to-defined")
 endif ()


You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170509/5cfa3f4c/attachment.html>

More information about the webkit-unassigned mailing list