From: Betty <bli@zeh.com>
To: help-gcc@gnu.org
Subject: gcc does not work with va_arg on irix 6.5
Date: Fri, 31 Dec 1999 22:24:00 -0000 [thread overview]
Message-ID: <83rdov$6ir$1@nnrp1.deja.com> (raw)
Message-ID: <19991231222400.3jwm-t1iKvC7jEML0P0eg6elj9VkIfSJk7erQuavcGY@z> (raw)
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.
next reply other threads:[~1999-12-31 22:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-22 13:33 Betty [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='83rdov$6ir$1@nnrp1.deja.com' \
--to=bli@zeh.com \
--cc=help-gcc@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).