Hi,
I am facing some problem using DIGITAL C++ V6.0-010 on DIGITAL UNIX
V4.0 (Rev. 1229).
When I pass a enum type formal parameter to va_start() as shown in the
following test code I am getting the error.
---------------------------------------------------------------------------
-
# cat enum.cpp
#include <iostream.h>
#include <stdarg.h>
enum X { t=0, y=1,};
void f(enum X arg1, ...)
{
va_list aleem;
va_start(aleem, arg1);
}
int main()
{
enum X p = t;
f(p, 1, 2, 3);
return 0;
}
#
# cxx enum.cpp
cxx: Error: enum.cpp, line 9: The second argument to the va_start() call is
not
the last formal parameter to
this function
va_start(aleem, arg1);
--------^
1 error detected in the compilation of "enum.cpp".
#
------------------------------------------------------------------------
--
Can you please tell me why this error is coming? I feel this is a bug
in cxx compiler.
And Please suggest some solution to solve this problem.
Thanks in advance,
best regards,
Manjunath P S
Received on Tue May 02 2000 - 13:28:44 NZST