title: control may reach end of non-void function xcode
body: <p>I have a third party library code segment which has the following structure:</p>
  
  <pre><code>class A;
  
  A func()
  {
     if(...)
     {
         return A(...);
     }
     else if(...)
     {
         return A(...);
     }
     else
     {
         LOG(...);
     }
  
  }
  </code></pre>
  
  <p>And it gives the error "control may reach end of non-void function" in Xcode. </p>
  
  <p>The same segment does compile in VS2012 without any problem. Xcode c++ compiler dialect and standard library is set to C++89 and libstdc++. I know that this is an expected behaviour but doesn't vs2012 compiler behave in accordance with the standards?</p>