RFR: 8336081: Fix -Wzero-as-null-pointer-constant warnings in JVMTypedFlagLimit ctors
Julian Waters
jwaters at openjdk.org
Thu Jul 11 05:21:55 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
Marked as reviewed by jwaters (Committer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/20112#pullrequestreview-2170929127
More information about the hotspot-runtime-dev
mailing list