tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Problem in va_start() with DIGITAL C++ V6.0-010 on DIGITAL UNIX V4.0
@ 2000-05-02 13:44 manjunath.ps
  0 siblings, 0 replies; only message in thread
From: manjunath.ps @ 2000-05-02 13:44 UTC (permalink / raw)
  To: tru64-unix-managers




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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-05-02 13:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-05-02 13:44 Problem in va_start() with DIGITAL C++ V6.0-010 on DIGITAL UNIX V4.0 manjunath.ps

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox