On 2025-11-05 10:34, Bruno Haible via Gnulib discussion list wrote:
N3322 was adopted retroactively

Thanks, I didn't know that. I installed the attach doc fix to mention this, plus a related update for Clang.
From 47f0d3ce9354afed95c595dc11a4957bc8fd64f9 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email protected]>
Date: Wed, 5 Nov 2025 13:32:48 -0800
Subject: [PATCH] doc: NULL + 0 updates for C23 and Clang 20

---
 doc/gnulib-intro.texi  | 11 ++++++-----
 doc/gnulib-readme.texi |  9 +++++----
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/doc/gnulib-intro.texi b/doc/gnulib-intro.texi
index 8c4e803d0d..d07dbcacae 100644
--- a/doc/gnulib-intro.texi
+++ b/doc/gnulib-intro.texi
@@ -306,12 +306,13 @@ all practical POSIX or C platforms.
 
 @itemize @bullet
 @item
-Clang's @option{-fsanitize=undefined} option causes the program to
-crash if it adds zero to a null pointer -- behavior that is undefined
-in strict C, but which yields a null pointer on all practical porting
-targets and which the Gnulib portability guidelines allow.
+In Clang 19 and earlier, the @option{-fsanitize=undefined} option
+causes the program to crash if it adds zero to a null pointer --
+behavior that is undefined in strict C17 and earlier, but which yields
+a null pointer in C23 and later and on all practical porting targets,
+and which the Gnulib portability guidelines allow.
 
-If you use Clang with @option{-fsanitize=undefined}, you can work
+If you use Clang 19 or earlier with @option{-fsanitize=undefined}, you can work
 around the problem by also using @samp{-fno-sanitize=pointer-overflow},
 although this may also disable some unrelated and useful pointer checks.
 Perhaps someday the Clang developers will fix the infelicity.
diff --git a/doc/gnulib-readme.texi b/doc/gnulib-readme.texi
index 9066949645..37a740a007 100644
--- a/doc/gnulib-readme.texi
+++ b/doc/gnulib-readme.texi
@@ -318,8 +318,8 @@ general Gnulib portability guidelines.
 Currently Gnulib assumes at least a freestanding C99 compiler,
 possibly operating with a C library that predates C99; with time this
 assumption will likely be strengthened to later versions of the C
-standard.  Old platforms currently supported include AIX 6.1, HP-UX
-11i v1 and Solaris 10, though these platforms are rarely tested.
+standard.  Old platforms currently supported include AIX 7.3
+and Solaris 10, though these platforms are rarely tested.
 Gnulib itself is so old that it contains many fixes for obsolete
 platforms, fixes that may be removed in the future.
 
@@ -564,9 +564,10 @@ Adding zero to a null pointer does not change the pointer.
 For example, @code{0 + (char *) NULL == (char *) NULL}.
 Similarly, subtracting zero does not change a null pointer,
 and subtracting two null pointers results in zero.
-A future C standard is planned to require this behavior; see
+C23 was the first C standard to require this behavior; see
 ``@url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3322.pdf,
-Allow zero length operations on null pointers}'', WG14 N3322 (2024-08-28).
+Allow zero length operations on null pointers}'', WG14 N3322 (2024-08-28);
+which was adopted retroactively for C23.
 @end itemize
 @end itemize
 
-- 
2.51.0

Reply via email to