Integrated: 8336081: Fix -Wzero-as-null-pointer-constant warnings in JVMTypedFlagLimit ctors
Kim Barrett
kbarrett at openjdk.org
Fri Jul 12 09:33: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
This pull request has now been integrated.
Changeset: 7a620329
Author: Kim Barrett <kbarrett at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/7a6203296416268f1c3f269d0db2b0c817642a34
Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
8336081: Fix -Wzero-as-null-pointer-constant warnings in JVMTypedFlagLimit ctors
Reviewed-by: dholmes, jwaters
-------------
PR: https://git.openjdk.org/jdk/pull/20112
More information about the hotspot-runtime-dev
mailing list