RFR: 8258010: Debug build failure with clang-10 due to -Wdeprecated-copy and -Wimplicit-int-float-conversion
Hao Sun
github.com+16932759+shqking at openjdk.java.net
Fri Dec 25 06:02:55 UTC 2020
On Thu, 24 Dec 2020 20:42:01 GMT, Xin Liu <xliu at openjdk.org> wrote:
>> src/hotspot/share/opto/node.hpp line 1458:
>>
>>> 1456: // initialize to garbage
>>> 1457:
>>> 1458: DUIterator_Last (const DUIterator_Last& that) : DUIterator_Fast(that) {}
>>
>> Since DUIterator_Last is just delegating both the copy constructor and
>> assignment operator to the base class, their copy constructor and
>> assignment operator would be better as the default (either implicit or
>> explicit using `=default`) rather than explicit code.
>
> Agree. c2 actually never uses the assignment operator of DUIterator_Last. It needs the copy constructor in this line.
> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/node.hpp#L1499
>
> you can delete the following code or leave it =default.
> - void operator=(const DUIterator_Last& that)
> - { DUIterator_Fast::operator=(that); }
Thanks for your comments.
Will remove the assignment operator of DUIterator_Last.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1874
More information about the build-dev
mailing list