pro64-support
[Top] [All Lists]

C++ variable argument problem with sgiCC

To: pro64-support@xxxxxxxxxxx
Subject: C++ variable argument problem with sgiCC
From: gjertsen@xxxxxxxxxx
Date: Fri, 15 Sep 2000 10:43:39 -0400
Sender: owner-pro64-support@xxxxxxxxxxx

I am getting an internal compiler error when using variable arguments in
C++ (stuff in stdarg.h) with sgiCC. I've tried to generate the cpp
output to get a better idea of what is going on, but it doesn't look like
/usr/lib/gcc-lib/ia64-sgi-linux/sgicc-1.0/cpp is provided.

Note that the same fragment of code is OK when I compile it with sgicc
(and this also works OK with g++).

The full details follow below. If there is a simple workaround I can do,
then let me know.

In addition, is there an archive web site that you keep with all of the
postings to this list. I would actually prefer that to email and it would
allow people to check and see if their problem was already solved.

Thanks,

--Rob

***** MACHINE SETUP *****
[gjertsen@clue5 dirlinux]$ sgiCC -v
SGIcc Compilers: Version 0.01.0-10
[gjertsen@clue5 dirlinux]$ uname -a
Linux clue5 2.4.0test7-000823-43 #1 Wed Sep 13 16:48:51 CDT 2000 ia64
unknown

***** SOURCE CODE *****
[gjertsen@clue5 dirlinux]$ more bobo.C
#include <stdio.h>
#include <stdarg.h>

int ktrace(const char *fmt, ...)
{
  va_list vargs;

  va_start(vargs, fmt);

  return 1;
}

***** INTERNAL COMPILER ERROR *****
[gjertsen@clue5 dirlinux]$ sgiCC -c bobo.C
bobo.C: In function `int ktrace (const char *, ...)':
bobo.C:8: could not convert `&vargs' to `void *&'
<internal>:8: in passing argument 1 of `__builtin_stdarg_start (void
*&, ...)'



<Prev in Thread] Current Thread [Next in Thread>