* Possible typo/redundancy in mmap(2) SYNOPSIS
@ 2026-04-12 14:11 佐々木龍路
2026-04-12 14:19 ` Alejandro Colomar
0 siblings, 1 reply; 2+ messages in thread
From: 佐々木龍路 @ 2026-04-12 14:11 UTC (permalink / raw)
To: linux-man
1. Where: mmap(2) SYNOPSIS section.
2. Issue: There is a semicolon after length and it appears twice,
which looks like the function has an extra argument.
3.Actual display: void *mmap(size_t length;void addr[length],size_t length,...);
4. Why it's confusing: From a syscall ABI perspective, rdi should be
addr, not length. This notation might confuse users about the actual
number of arguments.
man 2.13.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Possible typo/redundancy in mmap(2) SYNOPSIS
2026-04-12 14:11 Possible typo/redundancy in mmap(2) SYNOPSIS 佐々木龍路
@ 2026-04-12 14:19 ` Alejandro Colomar
0 siblings, 0 replies; 2+ messages in thread
From: Alejandro Colomar @ 2026-04-12 14:19 UTC (permalink / raw)
To: 佐々木龍路; +Cc: linux-man
[-- Attachment #1: Type: text/plain, Size: 731 bytes --]
Hi,
On 2026-04-12T23:11:47+0900, 佐々木龍路 wrote:
> 1. Where: mmap(2) SYNOPSIS section.
> 2. Issue: There is a semicolon after length and it appears twice,
> which looks like the function has an extra argument.
This is correct. That's a forward declaration of a function parameter.
They're documented here:
<https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html>
Have a lovely day!
Alex
> 3.Actual display: void *mmap(size_t length;void addr[length],size_t length,...);
> 4. Why it's confusing: From a syscall ABI perspective, rdi should be
> addr, not length. This notation might confuse users about the actual
> number of arguments.
> man 2.13.1
>
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-12 14:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-12 14:11 Possible typo/redundancy in mmap(2) SYNOPSIS 佐々木龍路
2026-04-12 14:19 ` Alejandro Colomar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox