title: Why is compiler not flagging this as an Error instead of warning?
body: <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  class test{
  public:
      test() { cout&lt;&lt;"CTOR"&lt;&lt;endl; }
      ~test() { cout&lt;&lt;"DTOR"&lt;&lt;endl; }
  };
  
  int main()
  {
   test testObj();
   cout&lt;&lt;"HERE"&lt;&lt;endl;
  
  } 
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>HERE
  </code></pre>
  
  <p>Compiler skips the line "test testObj(); " and compiles the rest with warning and when run will generate the output. The warning is "prototyped function not called (was a variable definition intended?) in VC++ 2008. Why does it not throw an error?</p>