RFR: 8336081: Fix -Wzero-as-null-pointer-constant warnings in JVMTypedFlagLimit ctors
David Holmes
dholmes at openjdk.org
Thu Jul 11 03:02:54 UTC 2024
On Wed, 10 Jul 2024 12:29:21 GMT, Kim Barrett <kbarrett 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.
-------------
Marked as reviewed by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20112#pullrequestreview-2170800814
More information about the hotspot-runtime-dev
mailing list