title: using enum values in preprocessor directive
body: <p>I have the following code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  enum {A, B};
  
  #define C A
  
  int main() {
  #if C == B
    printf("%d==%d\n", C, B);
  #else
    printf("%d!=%d\n", C, B);
  #endif
  }
  </code></pre>
  
  <p>which, surprinsingly, gives the output:</p>
  
  <pre><code>0==1
  </code></pre>
  
  <p>Now, I understand that the code is wrong, because enum values are unknown to the preprocessor. What I don't understand is why no error is generated... A and B should be undefined at preprocessing time, how is that the preprocessor gives no error?</p>