Just forwarding a conversation to the list
On 10/21/21 10:27 AM, Alejandro Colomar (man-pages) wrote:
Hi Jens,
On 10/21/21 10:17 AM, Alejandro Colomar (man-pages) wrote:
Ideally, the standard and the man-pages would have the same
prototypes. However, since the standard is not (and cannot be)
perfect, when it has some limitations that it cannot overcome which we
can, I'll be happy to differ from it. nonnull IMO is very useful in
the SYNOPSIS, so I'd like to have it (and I'd also like the standard
to have it, but that's likely to take a decade, if it happens at
all). Also, the man-pages already use array notation in some specific
cases (see pipe(2)), and they are mostly targeted at C programmers, so
I think we can safely assume that a C++ reader will know the
limitation of its language, and be able to translate C to C++ easily.
If any glibc programmer has any concerns regarding that, this is the
moment for giving a different opinion :).
I rethinked it a bit after seeing pipe(2) again. I never understood why
'static' should be needed at all in an array parameter. The standard
could have also accepted [26] as requiring at least 26 elements in the
array, without requiring the use of static. There may be reasons for
that that I ignore, of course; maybe backwards compatibility.... But
since the man-pages can present the same information without the static
keyword, I'll edit my patches to just use [restrict 26], instead of
[static restrict 26], which is more compact.
BTW, I just noticed that these emails were offlist. If you want to keep
them offlist, I'l do so, but we typically CC the list to have open
discussions. If you give me permission, I'll forward these emails to
the mailing lists.
Cheers,
Alex
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/