title: problem with va_arg()
body: <p>I want to wirte a function with variable arguments in this way:</p>
  
  <pre><code>static void configElement(U32 localFaultId,
                            char* name,
                            U32  report,
                            U32  localId,
                            U32  detectTime,
                            U32  ceaseTime,...)
  {
    U32 i = 0;
    U32 tmpNo = 0;
    va_list ap;
  
    if (nofFaults &gt;= MAX_NOF_LOCAL_FAULTS)
    {
      //something here
      return;
    }
    else
    {
  
      faultList[nofFaults].ceaseTime  = ceaseTime;
  
      va_start(ap, ceaseTime);
      tmpNo = va_arg(ap, U32);
      while ((tmpNo!= END_MARK) &amp;&amp; (i &lt; MAX_NOF_DEPEND))
      {
        faultList[nofFaults].dependList[i++].faultNo = tmpNo;
      }
  
  
      faultList[nofFaults].dependList[i].faultNo = END_MARK;
      /* Finish by increment nofFaults parameter */
      va_end(ap);
      nofFaults++;
    }
  }
  </code></pre>
  
  <p>However, I got the error msg when compiling this code:</p>
  
  <pre><code>fault_manager.cc:3344: error: expected primary-expression before ',' token
  fault_manager.cc:3387: error: expected primary-expression before 'U32'
  fault_manager.cc:3387: error: expected `)' before 'U32'
  fault_manager.cc:3387: error: expected `)' before ';' token
  fault_manager.cc:3387: error: expected `)' before ';' token
  </code></pre>
  
  <p>I have no idea what is going wrong here. My platform is Windows, and I'm using cygwin+Eclipse(CDT). The version of gcc is 4.1.1.</p>
  
  <p>Any idea will be appreciated much!</p>