RESOLVED CONFIGURATION CHANGED 195548
MS Visual C++ source incompatibility with C++20
https://bugs.webkit.org/show_bug.cgi?id=195548
Summary MS Visual C++ source incompatibility with C++20
QuellaZhang
Reported 2019-03-11 03:10:00 PDT
Created attachment 364242 [details] p1008r1.pdf Hi all, A paper(see attachment) voted into the C++20 working draft changes the definition of aggregate such that classes with any user-declared ctors are no longer aggregates. The MSVC team builds WebKit regularly to detect regressions, and found this failure under our build configuration with the /std:c++latest switch. Not sure if you are interented in upstreaming it if C++20 compatibility is on the library's radar. I still reported this issue. If not, we will try "/std:c++17". Repro steps: 1. git clone https://github.com/WebKit/webkit d:\WebKit\src 2. open a VS 2017 x86 command prompt as admin and browse to D:\Webkit 3. extra WebKitLibrary\win to D:\WebKit\src\WebKitLibraries\win 4. set path=C:\gnuwin32\bin;%path% 5. set _CL_=/std:c++latest 6. cmake -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_VERSION=10.0.17134.0 -DCMAKE_BUILD_TYPE=Release -DRUBY_LIBRARY=C:\Ruby25-x64\lib -DPORT="AppleWin" ..\src 7. msbuild /p:Configuration=Release;Platform=Win32 WebKit.sln /t:Rebuild Failures: D:\WebKit\build_x86\DerivedSources\ForwardingHeaders\pal/spi/cf/CFNetworkSPI.h(26): warning C4068: unknown pragma D:\WebKit\src\Source\WebCore\html/canvas/CanvasStyle.cpp(93): error C2440: 'initializing': cannot convert from 'initializer list' to 'WebCore::CanvasStyle::CMYKAColor' D:\WebKit\src\Source\WebCore\html/canvas/CanvasStyle.cpp(93): note: No constructor could take the source type, or constructor overload resolution was ambiguous D:\WebKit\src\Source\WebCore\svg/SVGComponentTransferFunctionElement.cpp(113): error C2440: 'return': cannot convert from 'initializer list' to 'WebCore::ComponentTransferFunction' D:\WebKit\src\Source\WebCore\svg/SVGComponentTransferFunctionElement.cpp(121): note: No constructor could take the source type, or constructor overload resolution was ambiguous
Attachments
p1008r1.pdf (245.71 KB, application/pdf)
2019-03-11 03:10 PDT, QuellaZhang
no flags
Fujii Hironori
Comment 1 2019-03-11 22:17:00 PDT
WebKit is using and supporting only C++14 at the moment. It seems this is a trivial fix and can be compatible with C++14. I think it is acceptable if you submit a proposed patch if you want to keep C++20 compil-ability.
QuellaZhang
Comment 2 2019-03-19 01:48:18 PDT
Sorry for the late. We have applied patches for WebKit to support /std:c++latest. Once WebKit is clean in our testing, I will add a comment on this issue.
QuellaZhang
Comment 3 2019-03-24 23:06:12 PDT
Unfortunately, there is still error C2440 in the later build, not sure if there will be more. Since C++20 raises at least 3 errors C2440, internal discussion, we will go back to using C++17. Please close this issue, thank you.
Fujii Hironori
Comment 4 2021-01-18 12:19:02 PST
WebKit is using and supporting only C++17 at the moment. https://webkit.org/languages/ https://trac.webkit.org/wiki/WebKitGTK/GCCRequirement It seems this is a trivial fix and can be compatible with C++17. I think it is acceptable if you submit a proposed patch and if you want to keep WebKit to be compiled in C++20.
David Kilzer (:ddkilzer)
Comment 5 2022-01-17 10:17:02 PST
Cc Lauro FYI since he just landed a fix for Bug 235023.
Fujii Hironori
Comment 6 2022-02-03 11:49:43 PST
WebKit has migrated to C++20. I don't see these errors. Closed. Bug 233963 – Start using C++20 Bug 233448 – [CMake][MSVC] Compile with /permissive-
Radar WebKit Bug Importer
Comment 7 2022-02-04 12:54:17 PST
Note You need to log in before you can comment on or make changes to this bug.