RFR: 8357579: Compilation error: first argument in call to 'memset' is a pointer to non-trivially copyable type [v2]
David Holmes
dholmes at openjdk.org
Thu Jul 3 04:34:39 UTC 2025
On Wed, 2 Jul 2025 16:54:55 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:
>> src/hotspot/share/oops/resolvedFieldEntry.cpp:49:10: error: first argument in call to 'memset' is a pointer to non-trivially copyable type 'ResolvedFieldEntry' [-Werror,-Wnontrivial-memcall]
>> 49 | memset(this, 0, sizeof(*this));
>> | ^
>> src/hotspot/share/oops/resolvedFieldEntry.cpp:49:10: note: explicitly cast the pointer to silence this warning
>> 49 | memset(this, 0, sizeof(*this));
>> | ^
>> | (void*)
>> 1 error generated.
>> src/hotspot/share/oops/resolvedMethodEntry.cpp:43:12: error: first argument in call to 'memset' is a pointer to non-trivially copyable type 'ResolvedMethodEntry' [-Werror,-Wnontrivial-memcall]
>> 43 | memset(this, 0, sizeof(*this));
>> | ^
>> src/hotspot/share/oops/resolvedMethodEntry.cpp:43:12: note: explicitly cast the pointer to silence this warning
>> 43 | memset(this, 0, sizeof(*this));
>> | ^
>> | (void*)
>> src/hotspot/share/oops/resolvedMethodEntry.cpp:48:12: error: first argument in call to 'memset' is a pointer to non-trivially copyable type 'ResolvedMethodEntry' [-Werror,-Wnontrivial-memcall]
>> 48 | memset(this, 0, sizeof(*this));
>> | ^
>> src/hotspot/share/oops/resolvedMethodEntry.cpp:48:12: note: explicitly cast the pointer to silence this warning
>> 48 | memset(this, 0, sizeof(*this));
>> | ^
>> | (void*)
>> 2 errors generated.
>
> Jan Kratochvil has updated the pull request incrementally with two additional commits since the last revision:
>
> - Revert "8361288: Fix build of JTReg: wget exited with exit code 4"
>
> This reverts commit 6e6b8f6a26f8e555f1e70544546b92bbafcae6cc.
> - 8361288: Fix build of JTReg: wget exited with exit code 4
@jankratochvil please provide a PR description that actually describes the code changes in the PR, not just the errors that motivated the PR to be created. Thanks.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26098#issuecomment-3030656108
More information about the hotspot-dev
mailing list