RFR: 8345273: Fix -Wzero-as-null-pointer-constant warnings in s390 code

Julian Waters jwaters at openjdk.org
Tue Dec 10 13:30:42 UTC 2024


On Wed, 4 Dec 2024 13:03:23 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> > hi @kimbarrett,
> > I tried to build it on s390x with these changes:
> > ```diff
> > diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4
> > index 57654514eb6..ce3077e7d38 100644
> > --- a/make/autoconf/flags-cflags.m4
> > +++ b/make/autoconf/flags-cflags.m4
> > ```
> 
> [snip]
> 
> > is that correct way to test it ?
> 
> That's too general, affecting the entire JDK. The rule we're trying to enforce (don't use literal 0 as a null pointer constant) is specific to HotSpot.
> 
> For testing, I've been adding the warning to the list here:
> 
> https://github.com/openjdk/jdk/blob/e13206d3a16a67a604076faecded88cbed85db1a/make/autoconf/flags-cflags.m4#L785
> 
> I've not verified with the build team that this is the right place ultimately. And I suspect it's not, since your log listed warnings in adlc. I'm not seeing any warnings there, even though (looking at the code) there clearly should be.

Do we also want ADLC to have nulls cleaned up? I thought it was just HotSpot that the cleanups were aimed at, not including the tools used while building it

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

PR Comment: https://git.openjdk.org/jdk/pull/22469#issuecomment-2531639314


More information about the hotspot-dev mailing list