Re: Mangled function prototypes (phantom arguments)

Mark Harris <[email protected]> Thu, 28 May 2026 14:43:21 -0700
Newsgroups org.kernel.vger.linux-man
Message-ID <CAMdZqKER+2XNhYt6VzVUijgMPYw1_fsn3Hh-+uzLN+joqzPp0A@mail.gmail.com>
Alejandro Colomar wrote:
>
> Hi Carlos,
>
> On 2026-05-28T14:39:15-0400, Carlos O'Donell wrote:
> > On 5/28/26 9:06 AM, Michael Kerrisk (man7.org) wrote:
> > > I don't think the Linux system call and C library manual pages are a
> > > good place to promote this obscure GNU feature. It is confusing
> > > people, including me. (I came to making this report because several
> > > people have reported this "bug" on various pages rendered at
> > > man7.org.)
> > >
> > > Please consider reverting these changes. These markings use
> > > little-understood, nonportable syntax. The manual page synopses should
> > > be in standard, portable C that is *easy* to understand.
> >
> > I agree with Michael.
> >
> > I think these changes should be reverted, but it's a question of
> > goals and values for the project, and the purpose of the SYNOPSIS.
> >
> > My view was always that they were the simplest expression of the
> > interface that the widest possible audience could understand, and
> > that seems to align with Michael's view.
>
> That doesn't provide much value, IMHO.  My opinion of the SYNOPSIS is
> that it's a quick reminder of how a function should be used.

I suggest a compromise.  Keep the array sizes, which are the part that
you claim adds value, and drop the forward declarations, which are the
part that confuses people.  So for example:

ssize_t read(int fd, void buf[count], size_t count);

Yes, count is used before its definition, but the goal is not to write
a valid function declaration; the existing one being invalid is
evidence of that.  It is difficult to imagine that anyone would have
trouble finding the definition of count without a forward declaration,
unless they are a compiler in which case they would also be tripped up
by the array-of-void.

 - Mark