Bug 231716

Summary: Compilation error: In file included from ./b3/B3StackmapGenerationParams.h:31: ./b3/B3ValueRep.h:119:5: error: definition of implicit copy assignment operator for 'ValueRep' is deprecated because it has a user-declared copy constructor [-Werror,-Wdeprecat
Product: WebKit Reporter: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Component: JavaScriptCoreAssignee: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, msaboff, saam, thorton, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Jean-Yves Avenard [:jya] 2021-10-13 20:28:27 PDT
When compiling I get:

In file included from ./b3/B3StackmapGenerationParams.h:31:
./b3/B3ValueRep.h:119:5: error: definition of implicit copy assignment operator for 'ValueRep' is deprecated because it has a user-declared copy constructor [-Werror,-Wdeprecated-copy]
    ValueRep(const ValueRep&) = default;
/b3/B3StackmapValue.cpp:77:19: note: in implicit copy assignment operator for 'JSC::B3::ValueRep' first required here
    m_reps[index] = rep;

Per C++11 and later:
“The generation of the implicitly-defined copy assignment operator is deprecated if T has a user-declared destructor or user-declared copy constructor. (since C++11)”

so it's missing a copy assignment operator definition.
Comment 1 Radar WebKit Bug Importer 2021-10-13 20:28:58 PDT
<rdar://problem/84230556>
Comment 2 Jean-Yves Avenard [:jya] 2021-10-13 20:45:48 PDT
Created attachment 441180 [details]
Patch
Comment 3 Yusuke Suzuki 2021-10-13 21:22:52 PDT
Ah, I already landed unreviewed build fix https://github.com/WebKit/WebKit/commit/9068b467eb20d0e553678c13b8eeed8c8d5b7d93 :)
Comment 4 Jean-Yves Avenard [:jya] 2021-10-13 21:35:03 PDT
(In reply to Yusuke Suzuki from comment #3)
> Ah, I already landed unreviewed build fix
> https://github.com/WebKit/WebKit/commit/
> 9068b467eb20d0e553678c13b8eeed8c8d5b7d93 :)

that will fix it too.

that copy constructor wasn't used. I hesitated between the two fixes
Comment 5 Jean-Yves Avenard [:jya] 2021-10-13 21:36:08 PDT
been fixed already