When building HotSpot, enable -Wzero-as-null-pointer-constant to enforce the HotSpot Style Guide's admonishment against such usage.
This is aspirational for now, as there are currently several thousand warnings generated by that option. Many are from a small number of widely included header files, but even after that there are quite a few. Some are not trivial to fix (not simply changing a "0" to "nullptr", for example). So some significant work on HotSpot will be required before this option can be enabled.
This is aspirational for now, as there are currently several thousand warnings generated by that option. Many are from a small number of widely included header files, but even after that there are quite a few. Some are not trivial to fix (not simply changing a "0" to "nullptr", for example). So some significant work on HotSpot will be required before this option can be enabled.
- duplicates
-
JDK-8332189 Enable -Wzero-as-null-pointer-constant for gcc
- Open
- relates to
-
JDK-8327173 HotSpot Style Guide needs update regarding nullptr vs NULL
- Resolved