This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: va_list: ppc
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: va_list: ppc
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Sat, 11 Sep 1999 00:00:01 +0200
- Cc: gcc-patches at gcc dot gnu dot org
- References: <4.2.0.58.19990806124221.03c16920@mail.lauterbach.com><4.2.0.58.19990806114008.00affee0@mail.lauterbach.com><99080100440600.04154@ns1102.munich.netsurf.de><4.2.0.58.19990729181805.00ca4680@mail.lauterbach.com><99080100440600.04154@ns1102.munich.netsurf.de><19990802134158.A18393@cygnus.com><4.2.0.58.19990806114008.00affee0@mail.lauterbach.com><19990806025504.A12146@cygnus.com><4.2.0.58.19990806124221.03c16920@mail.lauterbach.com>
At 23:14 10.09.99 , Richard Henderson wrote:
>On Fri, Aug 06, 1999 at 12:47:49PM +0200, Franz Sirl wrote:
> > varargs3.c: In function `vvafunc':
> > varargs3.c:10: first argument to `__builtin_va_arg' not of type `va_list'
> > varargs3.c:12: first argument to `__builtin_va_arg' not of type `va_list'
>
>I've committed the following to deal with this.
>
>And apparently I never got around to committing the rs6000.c
>thinko change earlier in this thread. *blush*
Well, you'll hate me, but... va-arg-9.c does abort with your changes
applied :-(.
Additionally, if you modify va-arg-9.c to va-arg-10.c like this:
--- va-arg-9.c Fri Sep 10 16:41:03 1999
+++ va-arg-10.c Fri Sep 10 16:40:01 1999
@@ -3,6 +3,10 @@
#include <stdarg.h>
+#ifndef va_copy
+#define va_copy __va_copy
+#endif
+
extern __SIZE_TYPE__ strlen (const char *);
int
@@ -18,10 +22,19 @@
void
fap (int i, char* format, va_list ap)
{
+ va_list apc;
+ char *formatc;
+
+ va_copy (apc, ap);
+ formatc = format;
+
if (strlen (format) != 16 - i)
abort ();
while (*format)
if (*format++ != to_hex (va_arg (ap, int)))
+ abort ();
+ while (*formatc)
+ if (*formatc++ != to_hex (va_arg (apc, int)))
abort ();
}
you'll get:
[fsirl@chewbacca:~/bugs]$ ~/obj/gccm//gcc/xgcc -B ~/obj/gccm//gcc/ -O2
va-arg-10.c
va-arg-10.c: In function `fap':
va-arg-10.c:28: Internal compiler error in `emit_block_move', at expr.c:1566
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
And, what still keeps me from bootstrapping:
In file included from ../../../../cvsx/gccm/libio/builtinbuf.h:32,
from ../../../../cvsx/gccm/libio/builtinbuf.cc:29:
../../../../cvsx/gccm/libio/streambuf.h:403: Internal compiler error.
../../../../cvsx/gccm/libio/streambuf.h:403: Please submit a full bug report.
../../../../cvsx/gccm/libio/streambuf.h:403: See
<URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
Ducking, Franz.