[Webkit-unassigned] [Bug 185198] [GTK] REGRESSION(r231170) Build broken with Clang (5.0)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 2 10:22:54 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=185198

--- Comment #2 from Carlos Alberto Lopez Perez <clopez at igalia.com> ---
It looks the failure started to happen when we passed the flag "-std=c++17" to the build.

Trying to build r231169 with this simple patch

--- a/Source/cmake/WebKitCompilerFlags.cmake
+++ b/Source/cmake/WebKitCompilerFlags.cmake
@@ -102,7 +102,7 @@ if (COMPILER_IS_GCC_OR_CLANG)
                                              -Wno-unknown-argument)
     else ()
         WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-fno-exceptions)
-        WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=c++14
+        WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=c++17
                                        -fno-rtti)

         if (WIN32)


Makes it already fail (even when no c++17 feature is still used as that was introduced in r231170).

Looking at what gcc and clang define with -std=c++14 vs -std=c++17 I see some differences.

$ touch x.cpp

$ g++-6 -std=c++14 -dM -E x.cpp |nc termbin.com 9999
http://termbin.com/sx9x

$ g++-6 -std=c++17 -dM -E x.cpp |nc termbin.com 9999
http://termbin.com/8ff5

$ clang++-5.0 -std=c++14 -dM -E x.cpp |nc termbin.com 9999
http://termbin.com/6k6p

$ clang++-5.0 -std=c++17 -dM -E x.cpp |nc termbin.com 9999
http://termbin.com/y4jy


 One that rings a bell is For example clang-5.0 with -std=c++17 sets "#define __cplusplus 201703L" meanwhile GCC 6.3 with  -std=c++17 sets "#define __cplusplus 201500L".

-- 
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/20180502/f067cbe2/attachment.html>


More information about the webkit-unassigned mailing list