WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
185947
WebKit (JavaScriptCore) compilation error with Clang ≥ 6
https://bugs.webkit.org/show_bug.cgi?id=185947
Summary
WebKit (JavaScriptCore) compilation error with Clang ≥ 6
Ting-Wei Lan
Reported
2018-05-24 07:26:08 PDT
Here are the error messages when compiling WebKitGTK+ 2.21.2 with Clang 6. The current WebKit trunk also has the same problem. In file included from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource26.cpp:6: /home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp:109:12: error: functional-style cast from 'CodeLocationLabel<JSInternalPtrTag>' to 'CodeLocationJump<JSInternalPtrTag>' uses deleted function return CodeLocationJump<JSInternalPtrTag>(m_callReturnLocationOrPatchableJump); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h:336:5: note: candidate function [with T = JSC::CodeLocationJump<26432>, $1 = void] has been explicitly deleted operator T() = delete; ^ /home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:118:14: note: candidate constructor explicit CodeLocationJump(MacroAssemblerCodePtr<tag> location) ^ /home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:115:7: note: candidate is the implicit move constructor class CodeLocationJump : public CodeLocationCommon<tag> { ^ /home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:115:7: note: candidate is the implicit copy constructor /home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:120:14: note: candidate constructor explicit CodeLocationJump(void* location) ^ In file included from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource26.cpp:6: /home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp:115:12: error: functional-style cast from 'CodeLocationLabel<JSInternalPtrTag>' to 'CodeLocationDataLabelPtr<JSInternalPtrTag>' uses deleted function return CodeLocationDataLabelPtr<JSInternalPtrTag>(m_hotPathBeginOrSlowPathStart); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h:336:5: note: candidate function [with T = JSC::CodeLocationDataLabelPtr<26432>, $1 = void] has been explicitly deleted operator T() = delete; ^ /home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:177:14: note: candidate constructor explicit CodeLocationDataLabelPtr(MacroAssemblerCodePtr<tag> location) ^ /home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:174:7: note: candidate is the implicit move constructor class CodeLocationDataLabelPtr : public CodeLocationCommon<tag> { ^ /home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:174:7: note: candidate is the implicit copy constructor /home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:179:14: note: candidate constructor explicit CodeLocationDataLabelPtr(void* location) ^ 2 errors generated. I also tested a few other Clang versions, and the results are: Clang 4 fails to compile with different error messages. I guess it is probably too old for C++17. Clang 5 works fine. Clang 6 fails to compile with the above error messages. Clang 7 git snapshot (commit 53dc71d2945a91fde75ec241f48776fc739d2f75, date 2018-05-06) also fails to compile with the same messages as Clang 6.
Attachments
proposed patch.
(1.53 KB, patch)
2018-06-21 17:08 PDT
,
Mark Lam
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Alberto Lopez Perez
Comment 1
2018-05-24 09:17:47 PDT
*** This bug has been marked as a duplicate of
bug 185198
***
David Kilzer (:ddkilzer)
Comment 2
2018-06-07 09:50:25 PDT
Reopening to fix the warnings from using the C++17 compiler in Clang 6.0. We will have to fix these eventually, so we might as well do it now that we know about it in case they point to real issues.
David Kilzer (:ddkilzer)
Comment 3
2018-06-07 09:57:08 PDT
(In reply to David Kilzer (:ddkilzer) from
comment #2
)
> Reopening to fix the warnings from using the C++17 compiler in Clang 6.0. > > We will have to fix these eventually, so we might as well do it now that we > know about it in case they point to real issues.
If
Bug 185198
is going to be used to fix the Clang 6.0+ warnings, then feel free to dupe this back to
Bug 185198
.
Michael Catanzaro
Comment 4
2018-06-07 10:36:17 PDT
Well, really only the error is reported here, it might be better to create a new bug for solving the warnings.
Michael Catanzaro
Comment 5
2018-06-07 10:36:48 PDT
(In reply to Michael Catanzaro from
comment #4
)
> Well, really only the error is reported here, it might be better to create a > new bug for solving the warnings.
(No warnings have been reported on Bugzilla thus far, to my knowledge.)
Mark Lam
Comment 6
2018-06-21 17:03:37 PDT
<
rdar://problem/40131933
>
Mark Lam
Comment 7
2018-06-21 17:08:58 PDT
Created
attachment 343292
[details]
proposed patch.
Mark Lam
Comment 8
2018-06-21 17:11:29 PDT
Thanks. Will land once the EWS bots are green.
WebKit Commit Bot
Comment 9
2018-06-21 20:01:58 PDT
Comment on
attachment 343292
[details]
proposed patch. Clearing flags on attachment: 343292 Committed
r233070
: <
https://trac.webkit.org/changeset/233070
>
WebKit Commit Bot
Comment 10
2018-06-21 20:02:00 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug