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

variable argument list in irix




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




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