RFR: 8345273: Fix -Wzero-as-null-pointer-constant warnings in s390 code
Kim Barrett
kbarrett at openjdk.org
Tue Dec 10 15:26:38 UTC 2024
On Tue, 10 Dec 2024 13:27:49 GMT, Julian Waters <jwaters at openjdk.org> wrote:
> > 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
That depends on whether one thinks the HotSpot Style Guide should apply to
adlc. I think it should (though I know there are violations, such as C++
Standard Library usage, that perhaps should be documented). But I'm probably
not the right person to make that call. I'll try to remember to discuss with
@vnkozlov.
I think avoiding literal 0 as a null pointer constant is generally good for
readability. Avoidance of NULL in adlc (which is not addressed here)
simplifies the proposed prevention mechanism (JDK-8343802). Otherwise we would
need to exclude the adlc source directory from the scan, and probably ensure
the adlc-generated code didn't include it either.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22469#issuecomment-2532028845
More information about the hotspot-dev
mailing list