This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
variable argument list in irix
- To: gcc at gcc dot gnu dot org
- Subject: variable argument list in irix
- From: Michael McQuinn <mmcquinn at dolphtech dot com>
- Date: Thu, 01 Nov 2001 15:04:34 -0500
trying to port an application form SunOS
to IRIX6.5. i installed the freeware software
that came with the system which include
gcc 3.0. i have been having trouble compiling
some of the software that contains variable
argument lists. i wrote some sample code
to try to debug the problem.
i keep getting the following errors:
testVarargs.c: In function `fl':
testVarargs.c:10: parse error before "char"
testVarargs.c:10: parse error before "char"
testVarargs.c:10: parse error before "char"
testVarargs.c:10: parse error before "char"
testVarargs.c:10: parse error before "char"
testVarargs.c:10: parse error before ')' token
the following is the sample code that i wrote and
trying to compile:
#include <stdarg.h>
void fl(int nptrs, ...)
{
va_list ap;
char *file;
int argno = 0;
va_start(ap, nptrs);
file = va_arg(ap, char *);
va_end(ap);
}
any ideas? i am sure that it is a compile option
thing but i can't seem to identify the proper
option to use.
mike
--
**********************************
Michael McQuinn
Dolphin Technology Inc.
1300B Floyd Ave.
Rome, NY 13440
Email: mmcquinn@dolphtech.com
Phone: 315.334.4892 ext. 232