diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/gcc~13/variadic-pointer-args.html | |
new repository
Diffstat (limited to 'devdocs/gcc~13/variadic-pointer-args.html')
| -rw-r--r-- | devdocs/gcc~13/variadic-pointer-args.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/devdocs/gcc~13/variadic-pointer-args.html b/devdocs/gcc~13/variadic-pointer-args.html new file mode 100644 index 00000000..d60ca096 --- /dev/null +++ b/devdocs/gcc~13/variadic-pointer-args.html @@ -0,0 +1,6 @@ +<div class="section-level-extent" id="Variadic-Pointer-Args"> <div class="nav-panel"> <p> Next: <a href="pointers-to-arrays" accesskey="n" rel="next">Pointers to Arrays with Qualifiers Work as Expected</a>, Previous: <a href="pointer-arith" accesskey="p" rel="prev">Arithmetic on <code class="code">void</code>- and Function-Pointers</a>, Up: <a href="c-extensions" accesskey="u" rel="up">Extensions to the C Language Family</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div> <h1 class="section" id="Pointer-Arguments-in-Variadic-Functions"><span>6.25 Pointer Arguments in Variadic Functions<a class="copiable-link" href="#Pointer-Arguments-in-Variadic-Functions"> ¶</a></span></h1> <p>Standard C requires that pointer types used with <code class="code">va_arg</code> in functions with variable argument lists either must be compatible with that of the actual argument, or that one type must be a pointer to <code class="code">void</code> and the other a pointer to a character type. GNU C implements the POSIX XSI extension that additionally permits the use of <code class="code">va_arg</code> with a pointer type to receive arguments of any other pointer type. </p> <p>In particular, in GNU C ‘<samp class="samp">va_arg (ap, void *)</samp>’ can safely be used to consume an argument of any pointer type. </p> </div><div class="_attribution"> + <p class="_attribution-p"> + © Free Software Foundation<br>Licensed under the GNU Free Documentation License, Version 1.3.<br> + <a href="https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Variadic-Pointer-Args.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Variadic-Pointer-Args.html</a> + </p> +</div> |
