title: Unmatched parenthesis: missing ')' in #if directive
body: <p>I wrote this simple program</p>
  
  <pre><code>#include &lt;time.h&gt;
  int main()
  {   
  #if ((clock_t)1000)
      int x = 10;
  #endif
      return 0;
  }
  </code></pre>
  
  <p>On compilation, I see the following error:</p>
  
  <blockquote>
    <p>Error C1012   unmatched parenthesis: missing ')'</p>
  </blockquote>
  
  <p>Why am I getting this error?</p>
  
  <p>Changing the line from:</p>
  
  <p><code>#if ((clock_t)1000)</code></p>
  
  <p>to:</p>
  
  <pre><code>#if (clock_t)1000
  </code></pre>
  
  <p>resolves the compilation error. </p>
  
  <p>But I can't do that, since ((clock_t)1000) is defined as a macro using the #define directive in the limits.h header file as : </p>
  
  <pre><code>#define CLOCKS_PER_SEC  ((clock_t)1000)
  </code></pre>
  
  <p>and I need to use that directly.</p>
  
  <hr>
  
  <p>EDIT: </p>
  
  <p>Please pardon me for framing the question in such an unclear way. 
  Reframing my question now:</p>
  
  <p>I have the following code: </p>
  
  <pre><code>#include &lt;time.h&gt;
  #define DUMMY_CLOCKS_PER_SEC ((clock_t)1000)
  int main()
  {   
  #if CLOCKS_PER_SEC != DUMMY_CLOCKS_PER_SEC
      #error "out of sync"
  #endif
      return 0;
  }
  </code></pre>
  
  <p>But this gives the compilation error: </p>
  
  <blockquote>
    <p>Error C1012   unmatched parenthesis: missing ')'</p>
  </blockquote>