R
Ryan Liu
All,
Now I meet a problem, when I use va_start in GCC 3.3.1.
The following is the problem description:
Source Code:
void
Message (severity, message, va_alist)
int severity;
MSG *message;
va_dcl
{
va_list args;
va_start(args);
/* Print the error message in standard format */
(void) vprmsg ( severity, message -> msg_format, args);
va_end(args);
return;
} /* end function Message
Error message:
+
/opt/exp/gnu/bin/gcc -O -I../../../tl/hdr -I../../../tl/pagfilegen/hdr -I- -
o pagutil.o -c pagutil.c
pagutil.c: In function `Message':
pagutil.c:937: error: parse error before "va_dcl"
pagutil.c:941:22: macro "va_start" requires 2 arguments, but only 1 given
pagutil.c:941: error: `va_start' undeclared (first use in this function)
pagutil.c:941: error: (Each undeclared identifier is reported only once
pagutil.c:941: error: for each function it appears in.)
pagutil.c:954:8: macro names must be identifiers
make: *** exit code 1 making pagutil.o
I don't know how to do it. Would you mind giving some suggestion?
Thank you very much in advance.
Ryan
Now I meet a problem, when I use va_start in GCC 3.3.1.
The following is the problem description:
Source Code:
void
Message (severity, message, va_alist)
int severity;
MSG *message;
va_dcl
{
va_list args;
va_start(args);
/* Print the error message in standard format */
(void) vprmsg ( severity, message -> msg_format, args);
va_end(args);
return;
} /* end function Message
Error message:
+
/opt/exp/gnu/bin/gcc -O -I../../../tl/hdr -I../../../tl/pagfilegen/hdr -I- -
o pagutil.o -c pagutil.c
pagutil.c: In function `Message':
pagutil.c:937: error: parse error before "va_dcl"
pagutil.c:941:22: macro "va_start" requires 2 arguments, but only 1 given
pagutil.c:941: error: `va_start' undeclared (first use in this function)
pagutil.c:941: error: (Each undeclared identifier is reported only once
pagutil.c:941: error: for each function it appears in.)
pagutil.c:954:8: macro names must be identifiers
make: *** exit code 1 making pagutil.o
I don't know how to do it. Would you mind giving some suggestion?
Thank you very much in advance.
Ryan