Integrated: 8357579: Compilation error: first argument in call to 'memset' is a pointer to non-trivially copyable type
Jan Kratochvil
jkratochvil at openjdk.org
Tue Nov 18 21:54:45 UTC 2025
On Wed, 2 Jul 2025 16:29:27 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:
> With clang-20 using --with-toolchain-type=clang resolveFieldEntry.cpp and resolveMethodEntry.cpp break the build with similar warnings like:
>
> 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*)
>
> The patch follows the suggested fix.
This pull request has now been integrated.
Changeset: 66fb0152
Author: Jan Kratochvil <jkratochvil at openjdk.org>
Committer: Ioi Lam <iklam at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/66fb015267058f9b5e6788eaeaa758be56ba553e
Stats: 129 lines in 4 files changed: 40 ins; 77 del; 12 mod
8357579: Compilation error: first argument in call to 'memset' is a pointer to non-trivially copyable type
Co-authored-by: Ioi Lam <iklam at openjdk.org>
Reviewed-by: iklam, asmehra
-------------
PR: https://git.openjdk.org/jdk/pull/26098
More information about the hotspot-dev
mailing list