title: Preprocessor macros as parameters to other macros
body: <p>The following C++ code compiles and works as the programmer intended on GCC (4.0.4)</p>
  
  <pre><code>#define FOO(x,y,z) ((x)*(y)*(z))
  #define BAR(x) FOO(x,1)
  #define BAZ 3,7
  
  int main()
  {
      return BAR(BAZ); /* interpreted as return ((3)*(7)*(1)); */
  }
  </code></pre>
  
  <p>However, the macros cause an error on Microsoft Visual C++ Express 2010:</p>
  
  <blockquote>
    <p>main.cpp(7): warning C4003: not enough actual parameters for macro 'FOO'<br>
        main.cpp(7): error C2059: syntax error : ')'</p>
  </blockquote>
  
  <p>The issue seems to be that the Microsoft compiler, while handling the BAR macro internally, does not expand the BAZ macro to parameters that could be used as two separate parameters to macro FOO.</p>
  
  <p>According to the standard, which compiler handles the situation correctly?</p>