This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to check the source code of stdarg?
- From: Ian Lance Taylor <iant at google dot com>
- To: Parmenides <mobile dot parmenides at gmail dot com>
- Cc: Gcc mailing list <gcc-help at gcc dot gnu dot org>
- Date: Wed, 02 Nov 2011 11:15:53 -0700
- Subject: Re: How to check the source code of stdarg?
- References: <CAOXENUgr6x1AxknG-ineBnYRwPUyk4xoFii9Q_7EU--v8LmM2g@mail.gmail.com>
Parmenides <mobile.parmenides@gmail.com> writes:
> The gcc implements the stdarg.h to support variable parameters
> functions. I wonder how it work. So, I find the stdarg.h at
>
>
> /usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stdarg.h
>
> Open it , I found some definitions as follows:
>
> #define va_start(v,l) __builtin_va_start(v,l)
> #define va_end(v) __builtin_va_end(v)
> #define va_arg(v,l) __builtin_va_arg(v,l)
>
> Every macro has its __builtin_... version. I try to look for these
> '__builtin_...' in gcc source code, but has not found. So, I want to
> know how to check their source code.
For va_start and va_end, see gcc/builtins.c. Look for BUILT_IN_VA_START
and BUILT_IN_VA_END. For va_arg, look in c-*.[ch] and c-family/* and
cp/* for RID_VA_ARG.
Ian