The forward declaration of a parameter is a GCC extension, so GCC accepts it.
The declaration of an array of void is an error or deliberate misuse of C in the documentation. A declaration of a parameter as an array is automatically adjusted to be a pointer, so the documentation author likely thought void buf[count] would express a declaration of buf to have type void *, along with a suggestion that it points to the first of at least count elements (of some type known to the caller). However, the C standard has a constraint (in C 2024 6.7.7.3) that the element type of an array in a declaration must be complete (its size must be known to the compiler at that moment), and void is not a compete type. So a compiler will detect and report this constraint violation before the adjustment would be made.
A correct declaration for Unix systems, from The Open Group Base Specifications, would be:
ssize_t read(int fildes, void *buf, size_t nbyte);
void buf[count]when that is not a proper declaration because it violates the C standard’s constraint that an array element type must be a complete type. (Even though the declaration would be adjusted tovoid *, the constraint applies first.)mmapmanual page on Ubuntu. Likewise, and "array of void" as first argument (void addr[.length]). That seems quite generalized:memcpy,memcmp(no forward this times. But still "array of void"),qsort, ... Maybe some new habit in the man-project?size_t count;part of the function syntax — it is a GNU (GCC) extension.man mmapin a shell, not looking a website. So, it's a local file...)