public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc does not work with va_arg on irix 6.5
@ 1999-12-22 13:33 Betty
  1999-12-22 14:19 ` Patrick Therien
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Betty @ 1999-12-22 13:33 UTC (permalink / raw)
  To: help-gcc

Hello,everyone,

I have the following C code:

/*file va-arg.c*/
#include <stdarg.h>

void f1(int n, ...)
{
    va_list ap;
    int  i;
    char a;

    va_start(ap,n );

    a=va_arg(ap,char);
    i=va_arg(ap,int);

    va_end(ap);
}

int main()
{
   char a='a';
   int i=1;

   f1(2, a,i);

   return 0;
}

When I compile it on irix 6.5 using gcc 2.8.1 or gcc 2.95.2, it gives
me the followings errors:

va-arg.c: In function `f1':
va-arg.c:11: parse error before `char'
va-arg.c:11: parse error before `char'
va-arg.c:11: parse error before `char'
va-arg.c:11: parse error before `char'
va-arg.c:11: parse error before `char'
va-arg.c:11: parse error before `)'
va-arg.c:12: parse error before `int'
va-arg.c:12: parse error before `int'
va-arg.c:12: parse error before `int'
va-arg.c:12: parse error before `int'
va-arg.c:12: parse error before `int'
va-arg.c:12: parse error before `)'

Any idea how to make va_arg work on irix 6.5 with gcc?

Thank you for your help.

Betty


Sent via Deja.com http://www.deja.com/
Before you buy.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-12-31 22:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-22 13:33 gcc does not work with va_arg on irix 6.5 Betty
1999-12-22 14:19 ` Patrick Therien
1999-12-31 22:24   ` Patrick Therien
1999-12-23 14:59 ` Betty
1999-12-31 22:24   ` Betty
1999-12-31 22:24 ` Betty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).