Just forwarding a conversation to the list
On 10/21/21 9:27 AM, Jₑₙₛ Gustedt wrote:
Hello Alejandro,
On Wed, 20 Oct 2021 22:22:40 +0200, Alejandro Colomar wrote:
As N2417 (part of C2x) suggests. This syntax is very informative,
and also, if used by library implementers, can improve static
analysis.
Since it is backwards compatible with pointer syntax, we can do this.
I understand the intent, but these `_r` interfaces finally went into
the standard without array notation. AFAIR one of the arguments was
that the headers should be usable from C++.
So I am not sure if it is consensus to have the documentation have a
different form of the interfaces than the standard(s). I don't know if
you'd also add the attributes that glibc uses to the `printf`
interfaces, for example.
I am not saying that you shouldn't, in the contrary it is probably a
good idea to list all those semantic restrictions in the documented
interface for which me have syntax. I just want to make sure that
adding such semantic hints to the documentation is consensus and
sufficiently well discussed.
Thanks
Jₑₙₛ
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/