RFR: 8357579: Compilation error: first argument in call to 'memset' is a pointer to non-trivially copyable type [v13]
Jan Kratochvil
jkratochvil at openjdk.org
Mon Nov 17 21:22:09 UTC 2025
On Tue, 11 Nov 2025 06:32:09 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add Ioi Lam's comment
>
> src/hotspot/share/oops/resolvedFieldEntry.cpp line 29:
>
>> 27: #include "oops/resolvedFieldEntry.hpp"
>> 28:
>> 29: STATIC_ASSERT(std::is_trivially_copyable_v<ResolvedFieldEntry> == true);
>
> Style nit: `STATIC_ASSERT` shouldn't be used anymore. C++17 gives us 1-arg `static_assert`.
> Also, explicit comparison to `true` is weird.
This is a copy-paste from @iklam's: https://github.com/openjdk/jdk/pull/28172/files
Last `STATIC_ASSERT` was checked in less than 2 months ago: https://github.com/openjdk/jdk/pull/27152/files#diff-d8b70800fb68e0478dd0936c7f4a08b1bb59ce7a276ad1140355933c246372caR285
It should be rather rejected by CI (but yes, I could also do that).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26098#discussion_r2535542261
More information about the hotspot-dev
mailing list