Integrated: 8338330: Fix -Wzero-as-null-pointer-constant warnings from THROW_XXX_0

Kim Barrett kbarrett at openjdk.org
Thu Aug 15 17:45:54 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

This pull request has now been integrated.

Changeset: 96550827
Author:    Kim Barrett <kbarrett at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/965508270ecd092019f7bea3a1605c5d9f19d81e
Stats:     14 lines in 3 files changed: 3 ins; 0 del; 11 mod

8338330: Fix -Wzero-as-null-pointer-constant warnings from THROW_XXX_0

Reviewed-by: dlong, dholmes, shade

-------------

PR: https://git.openjdk.org/jdk/pull/20574


More information about the hotspot-dev mailing list