RFR: 8365661: oops/resolvedMethodEntry.hpp could use default copy constructor

Francesco Andreuzzi duke at openjdk.org
Mon Aug 18 09:46:17 UTC 2025


On Mon, 18 Aug 2025 08:30:27 GMT, Francesco Andreuzzi <duke at openjdk.org> wrote:

> We may replace the non-default copy constructor and assignment with the default ones. It seems that all we have to do is a member-wise shallow copy. This would also make the class `TriviallyCopiable`.
> 
> This change fixes a build failure I'm getting with clang20: [`memset(this, 0, sizeof(*this))`](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/oops/resolvedMethodEntry.cpp#L43) is not acceptable unless the class is trivially copyable (`-Wtrivial-copy`).
> 
> Testing:
> - [x] tier1 fast-debug
> - [x] tier2 fast-debug

Test failure seems unrelated: https://github.com/fandreuz/jdk/actions/runs/17035211708/job/48288257455#step:10:1581

-------------

PR Comment: https://git.openjdk.org/jdk/pull/26818#issuecomment-3195934929


More information about the hotspot-dev mailing list