title: What runs before main()?
body: <p>After testing on msvc8, I found:</p>
  
  <ol>
  <li>Parse GetCommandLine() to argc and argv</li>
  <li>Standard C Library initialization</li>
  <li>C++ Constructor of global variables</li>
  </ol>
  
  <p>These three things are called before entering main().</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Will this execution order be different when I porting my program to different compiler (gcc or armcc), or different platform?</li>
  <li>What stuff does Standard C Library initialization do? So far I know setlocale() is a must.</li>
  <li>Is it safe to call standard C functions inside C++ constructor of global variables?</li>
  </ol>