This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: va_arg *, and why not.
- To: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Subject: Re: va_arg *, and why not.
- From: Richard Henderson <rth at cygnus dot com>
- Date: Mon, 17 Jul 2000 16:43:33 -0700
- Cc: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, gdr at codesourcery dot com, mark at codesourcery dot com, gcc-bugs at gcc dot gnu dot org, geoffk at cygnus dot com
- References: <200007171414.KAA05378@caip.rutgers.edu> <4.3.2.7.2.20000717164258.0344eee0@mail.lauterbach.com>
On Mon, Jul 17, 2000 at 04:53:06PM +0200, Franz Sirl wrote:
> dnl Does this platform require array notation to assign to a va_list?
> dnl If cross-compiling, we assume va_list is "normal". If this breaks
> dnl you, set ac_cv_valistisarray=true and maybe define HAVE_VA_LIST_AS_ARRAY
> dnl also just to be sure.
> AC_MSG_CHECKING(whether va_list assignments need array notation)
> AC_CACHE_VAL(ac_cv_valistisarray,
> [AC_TRY_RUN([#include <stdlib.h>
> #include <stdarg.h>
> void foo(int i, ...) {
> va_list ap1, ap2;
> va_start(ap1, i);
> ap2 = ap1;
Seems a bit silly to use a run test instead of a compile test.
If va_list is an array, we'll get a compile error right here.
Fixing that would solve the silliness with the cross-compile default.
r~