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

Kim Barrett kbarrett at openjdk.org
Thu Aug 15 17:45:53 UTC 2024


On Tue, 13 Aug 2024 22:44:54 GMT, Dean Long <dlong 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 dlong (Reviewer).

Thanks for reviews @dean-long , @dholmes-ora , and @shipilev

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

PR Comment: https://git.openjdk.org/jdk/pull/20574#issuecomment-2291837493


More information about the hotspot-dev mailing list