This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/80409] Document that va_arg(ap, void*) can be used to consume any pointer argument


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80409

--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Wed, 12 Apr 2017, pascal_cuoq at hotmail dot com wrote:

> Since the open-source world divides the C compilation platform described by the
> C standard into C compilers (Clang, GCC) and standard libraries (Glibc, musl,
> ...), with the implementation of varargs on the compiler side and the
> implementation of scanf on the standard library side, it would make sense to
> document that on target platforms where the representation of pointers is
> uniform, the compilers allow va_arg(ap, void*) to consume any pointer argument.

Note that this is documented in POSIX (XSI-shaded, in the specification of 
stdarg.h).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]