1 .\" Copyright (c) 2020-2022 by Alejandro Colomar <colomar.6.4.3@gmail.com>
2 .\" and Copyright (c) 2020 by Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
7 .TH VOID 3type (date) "Linux man-pages (unreleased)"
15 A pointer to any object type may be converted to a pointer to
18 POSIX further requires that any pointer,
19 including pointers to functions,
20 may be converted to a pointer to
24 Conversions from and to any other pointer type are done implicitly,
25 not requiring casts at all.
26 Note that this feature prevents any kind of type checking:
27 the programmer should be careful not to convert a
29 value to a type incompatible to that of the underlying data,
30 because that would result in undefined behavior.
32 This type is useful in function parameters and return value
33 to allow passing values of any type.
34 The function will typically use some mechanism to know
35 the real type of the data being passed via a pointer to
38 A value of this type can't be dereferenced,
39 as it would give a value of type
41 which is not possible.
42 Likewise, pointer arithmetic is not possible with this type.
43 However, in GNU C, pointer arithmetic is allowed
44 as an extension to the standard;
45 this is done by treating the size of a
47 or of a function as 1.
48 A consequence of this is that
52 and on function types, and returns 1.
53 .SS Use with printf(3) and scanf(3)
54 The conversion specifier for
60 families of functions is
63 The POSIX requirement about compatibility between
65 and function pointers was added in
66 POSIX.1-2008 Technical Corrigendum 1 (2013).
69 POSIX.1-2001 and later.