RFR: 8338330: Fix -Wzero-as-null-pointer-constant warnings from THROW_XXX_0
Aleksey Shipilev
shade at openjdk.org
Wed Aug 14 12:55:50 UTC 2024
On Tue, 13 Aug 2024 22:19:45 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this change to add THROW_ARG_NULL and THROW_HANDLE_NULL macros,
> and use them instead of the corresponding THROW_XXX_0 macros in contexts where
> a pointer value is needed. This removes some -Wzero-as-null-pointer-constant
> warnings.
>
> There aren't many uses of either (only one of the HANDLE variant). An
> alternative would have been to change the callers to use the unsuffixed
> variant with a nullptr value argument. Adding the macros is consistent with
> other THROW variants, and seems a little bit more readable.
>
> Testing: mach5 tier1
Marked as reviewed by shade (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/20574#pullrequestreview-2238075033
More information about the hotspot-dev
mailing list