diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-24 04:52:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-24 04:52:22 +0000 |
commit | 3d08cd331c1adcf0d917392f7e527b3f00511748 (patch) | |
tree | 312f0d1e1632f48862f044b8bb87e602dcffb5f9 /man3type/void.3type | |
parent | Adding debian version 6.7-2. (diff) | |
download | manpages-3d08cd331c1adcf0d917392f7e527b3f00511748.tar.xz manpages-3d08cd331c1adcf0d917392f7e527b3f00511748.zip |
Merging upstream version 6.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man3type/void.3type')
-rw-r--r-- | man3type/void.3type | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/man3type/void.3type b/man3type/void.3type deleted file mode 100644 index 4174f5f..0000000 --- a/man3type/void.3type +++ /dev/null @@ -1,76 +0,0 @@ -.\" Copyright (c) 2020-2022 by Alejandro Colomar <alx@kernel.org> -.\" and Copyright (c) 2020 by Michael Kerrisk <mtk.manpages@gmail.com> -.\" -.\" SPDX-License-Identifier: Linux-man-pages-copyleft -.\" -.\" -.TH void 3type 2023-10-31 "Linux man-pages 6.7" -.SH NAME -void \- abstract type -.SH SYNOPSIS -.nf -.B void * -.fi -.SH DESCRIPTION -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. -.P -Conversions from and to any other pointer type are done implicitly, -not requiring casts at all. -Note that this feature prevents any kind of type checking: -the programmer should be careful not to convert a -.I void * -value to a type incompatible to that of the underlying data, -because that would result in undefined behavior. -.P -This type is useful in function parameters and return value -to allow passing values of any type. -The function will typically use some mechanism to know -the real type of the data being passed via a pointer to -.IR void . -.P -A value of this type can't be dereferenced, -as it would give a value of type -.IR void , -which is not possible. -Likewise, pointer arithmetic is not possible with this type. -However, in GNU C, pointer arithmetic is allowed -as an extension to the standard; -this is done by treating the size of a -.I void -or of a function as 1. -A consequence of this is that -.I sizeof -is also allowed on -.I void -and on function types, and returns 1. -.SS Use with printf(3) and scanf(3) -The conversion specifier for -.I void * -for the -.BR printf (3) -and the -.BR scanf (3) -families of functions is -.BR p . -.SH VERSIONS -The POSIX requirement about compatibility between -.I void * -and function pointers was added in -POSIX.1-2008 Technical Corrigendum 1 (2013). -.SH STANDARDS -C11, POSIX.1-2008. -.SH HISTORY -C89, POSIX.1-2001. -.SH SEE ALSO -.BR malloc (3), -.BR memcmp (3), -.BR memcpy (3), -.BR memset (3), -.BR intptr_t (3type) |