This is the mail archive of the gcc-patches@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]

Re: va_list: ppc


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.


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