RFR: 8336081: Fix -Wzero-as-null-pointer-constant warnings in JVMTypedFlagLimit ctors
Kim Barrett
kbarrett at openjdk.org
Fri Jul 12 09:33:54 UTC 2024
On Thu, 11 Jul 2024 03:00:26 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Please review this change to member initializers in the JVMTypedFlagLimit<T>
>> class template. It has two members of type T, which were being initialized
>> with a literal value of 0, triggering -Wzero-as-null-pointer-constant when T
>> is a pointer type and that warning is enabled.
>>
>> We instead value initialize these members. For scalar types this performs
>> zero-initialization, without triggering -Wzero-as-null-pointer-constant if
>> it's a pointer type.
>>
>> Testing: mach5 tier1
>
> Okay.
Thanks for reviews @dholmes-ora and @TheShermanTanker
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20112#issuecomment-2225187611
More information about the hotspot-runtime-dev
mailing list