Come to think of it this (size_t) -3 issue with mbrtoc32 is probably
worth documenting. I installed the attached to give it a shot.From e046d5458353f112e78893ca03d855c8a9aa2e39 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Mon, 3 Jul 2023 10:24:05 -0700
Subject: [PATCH] mbrtoc32: document (size_t) -3 issue
* doc/posix-functions/mbrtoc32.texi (mbrtoc32):
Say (size_t) -3 might not be worth bothering about.
---
ChangeLog | 6 ++++++
doc/posix-functions/mbrtoc32.texi | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 7cd5aac216..7d44959df2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-07-03 Paul Eggert <egg...@cs.ucla.edu>
+
+ mbrtoc32: document (size_t) -3 issue
+ * doc/posix-functions/mbrtoc32.texi (mbrtoc32):
+ Say (size_t) -3 might not be worth bothering about.
+
2023-07-02 Bruno Haible <br...@clisp.org>
mbsrtoc32s: Accommodate a difference between mbrtowc and mbrtoc32.
diff --git a/doc/posix-functions/mbrtoc32.texi b/doc/posix-functions/mbrtoc32.texi
index db7d6a0821..93a7aa64ff 100644
--- a/doc/posix-functions/mbrtoc32.texi
+++ b/doc/posix-functions/mbrtoc32.texi
@@ -38,6 +38,12 @@ Solaris 11.4, mingw, MSVC 14.
Portability problems not fixed by Gnulib:
@itemize
@item
+Although ISO C says this function can return @code{(size_t) -3},
+no known implementation behaves that way,
+and if it were to happen it would break common uses.
+If dealing with @code{(size_t) -3} would complicate your code significantly,
+it is probably better not to bother.
+@item
This function is only defined as an inline function on some platforms:
Haiku 2020.
@end itemize
--
2.39.2