From: Alejandro Colomar <colomar.6.4.3@gmail.com>
To: mtk.manpages@gmail.com
Cc: Alejandro Colomar <colomar.6.4.3@gmail.com>,
linux-man@vger.kernel.org, gcc@gcc.gnu.org,
libc-alpha@sourceware.org
Subject: [PATCH v2 1/2] system_data_types.7: Add 'void *'
Date: Thu, 1 Oct 2020 17:49:46 +0200 [thread overview]
Message-ID: <20201001154946.104626-2-colomar.6.4.3@gmail.com> (raw)
In-Reply-To: <41affebd-3354-9420-0048-bffd14535e95@gmail.com>
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
man7/system_data_types.7 | 47 ++++++++++++++++++++++++++++++++++++++--
1 file changed, 45 insertions(+), 2 deletions(-)
diff --git a/man7/system_data_types.7 b/man7/system_data_types.7
index e42cf2557..e545aa1a0 100644
--- a/man7/system_data_types.7
+++ b/man7/system_data_types.7
@@ -679,7 +679,6 @@ See also the
.I uintptr_t
and
.I void *
-.\" TODO: Document void *
types in this page.
.RE
.\"------------------------------------- lconv ------------------------/
@@ -1781,7 +1780,6 @@ See also the
.I intptr_t
and
.I void *
-.\" TODO: Document void *
types in this page.
.RE
.\"------------------------------------- va_list ----------------------/
@@ -1815,6 +1813,51 @@ See also:
.BR va_copy (3),
.BR va_end (3)
.RE
+.\"------------------------------------- void * -----------------------/
+.TP
+.I void *
+.RS
+According to the C language standard,
+a pointer to any object type may be converted to a pointer to
+.I void
+and back.
+POSIX further requires that any pointer,
+including pointers to functions,
+may be converted to a pointer to
+.I void
+and back.
+.PP
+Conversions from and to any other pointer type are done implicitly,
+not requiring casts at all.
+.PP
+A value of this type can't be dereferenced,
+as it would give a value of type
+.I void
+which is not possible.
+.PP
+The conversion specifier for
+.I void *
+for the
+.BR printf (3)
+and the
+.BR scanf (3)
+families of functions is
+.BR p ;
+resulting commonly in
+.B %p
+for printing
+.I void *
+values.
+.PP
+Conforming to:
+C99 and later; POSIX.1-2001 and later.
+.PP
+See also the
+.I intptr_t
+and
+.I uintptr_t
+types in this page.
+.RE
.\"--------------------------------------------------------------------/
.SH NOTES
The structures described in this manual page shall contain,
--
2.28.0
next prev parent reply other threads:[~2020-10-01 15:50 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 15:06 [PATCH 0/2] Document void * Alejandro Colomar
2020-10-01 15:06 ` [PATCH 1/2] system_data_types.7: Add 'void *' Alejandro Colomar
2020-10-01 15:06 ` [PATCH 2/2] void-*.3: New link to system_data_types(7) Alejandro Colomar
2020-10-01 15:34 ` [PATCH 0/2] Document void * Michael Kerrisk (man-pages)
2020-10-01 15:40 ` Alejandro Colomar
2020-10-01 15:49 ` [PATCH v2 0/2] Document 'void *' Alejandro Colomar
2020-10-01 15:49 ` Alejandro Colomar [this message]
2020-10-01 16:38 ` [PATCH v2 1/2] system_data_types.7: Add " Michael Kerrisk (man-pages)
2020-10-01 16:55 ` Alejandro Colomar
2020-10-02 11:54 ` Michael Kerrisk (man-pages)
2020-10-08 13:52 ` Vincent Lefevre
2020-10-12 9:36 ` Michael Kerrisk (man-pages)
2020-10-01 17:32 ` Paul Eggert
2020-10-02 8:24 ` Alejandro Colomar
2020-10-02 8:48 ` Alejandro Colomar
2020-10-02 11:44 ` Michael Kerrisk (man-pages)
2020-10-02 9:10 ` David Laight
2020-10-02 17:00 ` Paul Eggert
2020-10-02 10:49 ` Jonathan Wakely
2020-10-02 11:31 ` Michael Kerrisk (man-pages)
2020-10-02 13:06 ` Jonathan Wakely
2020-10-02 13:20 ` Alejandro Colomar
2020-10-02 13:27 ` Jonathan Wakely
2020-10-02 13:51 ` Alejandro Colomar
2020-10-03 8:00 ` Navigational corrections (was: Re: [PATCH v2 1/2] system_data_types.7: Add 'void *') Michael Kerrisk (man-pages)
2020-10-03 9:16 ` Navigational corrections Alejandro Colomar
2020-10-03 11:39 ` Michael Kerrisk (man-pages)
2020-10-05 22:08 ` Alejandro Colomar
2020-10-07 6:53 ` Michael Kerrisk (man-pages)
2020-10-01 15:49 ` [PATCH v2 2/2] void.3: New link to system_data_types(7) Alejandro Colomar
2020-10-02 13:19 ` [PATCH 0/2] Document void * Jonathan Wakely
2020-10-03 11:44 ` Michael Kerrisk (man-pages)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201001154946.104626-2-colomar.6.4.3@gmail.com \
--to=colomar.6.4.3@gmail.com \
--cc=gcc@gcc.gnu.org \
--cc=libc-alpha@sourceware.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.