RFR: 8357579: Compilation error: first argument in call to 'memset' is a pointer to non-trivially copyable type
Jan Kratochvil
jkratochvil at openjdk.org
Wed Jul 2 16:34:16 UTC 2025
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.
-------------
Commit messages:
- 8357579: Compilation error: first argument in call to 'memset' is a pointer to non-trivially copyable type
Changes: https://git.openjdk.org/jdk/pull/26098/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26098&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8357579
Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/26098.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26098/head:pull/26098
PR: https://git.openjdk.org/jdk/pull/26098
More information about the hotspot-dev
mailing list