va_arg *, and why not.
Richard Henderson
rth@cygnus.com
Mon Jul 17 16:43:00 GMT 2000
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~
More information about the Gcc-bugs
mailing list