title: Why does auto a=1; compile in C?
body: <p>The code:</p>
  
  <pre><code>int main(void)
  {
      auto a=1;
      return 0;
  }
  </code></pre>
  
  <p>gets compiled without errors by the MS Visual Studio 2012 compiler, when the file has the .c extension. I have always thought that when you use the .c extension, compilation should be according to the C syntax, and not C++. Moreover, as far as I know auto without a type is allowed <strong>only</strong> in C++ since C++11, where it means that the type is deduced from the initializer.</p>
  
  <p>Does that mean that my compiler isn't sticking to C, or is the code actually correct in C-language?</p>