title: Is it legal to use the #line directive in a macro argument?
body: <p>I noticed that this program compiles with gcc:</p>
  
  <pre><code>#define X(A) A
  
  int x = X(
  #line 3 "test1.c"
          0
          );
  </code></pre>
  
  <p>However, Visual Studio fails to compile it:</p>
  
  <pre><code>main.cpp
  main.cpp(6): error C2121: '#': invalid character: possibly the result of a macro expansion
  main.cpp(6): error C2065: 'line': undeclared identifier
  main.cpp(6): error C2143: syntax error: missing ';' before 'constant'
  main.cpp(6): error C2059: syntax error: 'constant'
  </code></pre>
  
  <p>I wonder: is the program even legal, or is it silently relying on undefined (or implementation defined) behaviour which happens to make gcc accept the code?</p>