From 4e3033f2122d773c173b0bb50120099589adcf3c Mon Sep 17 00:00:00 2001
From: Kim Barrett
Date: Wed, 11 Feb 2026 00:59:20 +0000
Subject: [PATCH] 8332189: Enable -Wzero-as-null-pointer-constant for gcc/clang
Reviewed-by: azafari, dholmes, erikj
---
doc/hotspot-style.html | 5 ++--
doc/hotspot-style.md | 3 +--
make/autoconf/flags-cflags.m4 | 47 +++++++++++++++++++----------------
3 files changed, 28 insertions(+), 27 deletions(-)
diff --git a/doc/hotspot-style.html b/doc/hotspot-style.html
index 362245cd00a..c7126622c7d 100644
--- a/doc/hotspot-style.html
+++ b/doc/hotspot-style.html
@@ -965,9 +965,8 @@ rather than NULL. See the paper for reasons to avoid
NULL.
Don't use (constant expression or literal) 0 for pointers. Note that
C++14 removed non-literal 0 constants from null pointer
-constants, though some compilers continue to treat them as such.
-For historical reasons there may be lingering uses of 0 as a
-pointer.
+constants, though some compilers continue to treat them as
+such.
<atomic>
Do not use facilities provided by the <atomic>
header (