RFR: 8335294: Fix simple -Wzero-as-null-pointer-constant warnings in gc code

Julian Waters jwaters at openjdk.org
Fri Jun 28 12:43:21 UTC 2024


On Fri, 28 Jun 2024 12:06:50 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> Looks good. Does -Wzero-as-null-constant prevent any new NULL from creeping in also?

My guess is that it only warns for a raw 0 being used as a null pointer, but not NULL itself. It would seem odd to have an error in gcc against using a feature from the C Standard Library, after all

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

PR Comment: https://git.openjdk.org/jdk/pull/19934#issuecomment-2196819387


More information about the hotspot-dev mailing list