Bug 231716 - 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
Summary: Compilation error: In file included from ./b3/B3StackmapGenerationParams.h:31...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jean-Yves Avenard [:jya]
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-13 20:28 PDT by Jean-Yves Avenard [:jya]
Modified: 2021-10-14 01:25 PDT (History)
9 users (show)

See Also:


Attachments
Patch (1.80 KB, patch)
2021-10-13 20:45 PDT, Jean-Yves Avenard [:jya]
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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