On 2026-05-29T00:10:23+0200, Alejandro Colomar wrote: > Hi Mark, > > On 2026-05-28T14:43:21-0700, Mark Harris wrote: > > > > 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. > > I considered doing that some time ago. I am worried about something: it > might "work" if you're unlucky. > > Let's say a relatively new programmer sees this and thinks it's valid C. > And let's say it tries it in their own code, which may have a variable > in scope (most likely, a global one) named 'count'. > > extern int count; > > ssize_t read(int fd, void buf[count], size_t count); > > That's going to compile, but it's not what you'd expect. Oh well, this one won't compile, because of void. But it would work for other arrays, such as arrays of char. > > That's why I originally used [.count] notation. That one if free from > this problem. However, GCC maintainers convinced me of using some > syntax that is valid C (at least in the GNU dialect of it, which is the > majoritary one anyway). > > > Have a lovely night! > Alex > > -- > --