title: How can a program with a global variable called main instead of a main function work?
body: <p>Consider following program:</p>
  
  <pre><code>#include &lt;iostream&gt;
  int main = ( std::cout &lt;&lt; "C++ is excellent!\n", 195 ); 
  </code></pre>
  
  <p>Using g++ 4.8.1 (mingw64) on Windows 7 OS, the program compiles and runs fine, printing:</p>
  
  <blockquote>
    <p>C++ is excellent!</p>
  </blockquote>
  
  <p>to the console. <code>main</code> appears to be a global variable rather than a function; how can this program execute without the function <code>main()</code>? Does this code conform to the C++ standard? Is the behavior of the program is well defined? I have also used the <strong><code>-pedantic-errors</code></strong> option but the program still compiles and runs. </p>