title: C preprocessor expansion order
body: <p>I'm trying to do something using C preprocessor. I have this macros:</p>
  
  <pre><code>#define _MAX(x, y) (((x)) &gt; ((y))) ? (x) : (y))
  
  #define MAX1 _MAX(1,
  #define MAX2 _MAX(2,0))
  
  #define RIGHT _MAX(1,_MAX(2,0))
  #define WRONG MAX1 MAX2
  </code></pre>
  
  <p>In this case, <code>RIGHT</code> gives me the right expression but <code>WRONG</code>, even though it's the same, expands the macro to blank. </p>
  
  <p>It seems to me that's because after expanding <code>MAX1</code> to <code>_MAX(1,</code> it detects there is a <code>_MAX</code> macro to expand and tries to do it without expanding the <code>MAX2</code>, which haves the other half of the statement.</p>
  
  <p>If I'm right, is there any way that I can delay the <code>_MAX</code> macro expansion until <code>MAX2</code> it's expanded?</p>