<story><title>Introducing a new, advanced Visual C++ code optimizer</title><url>https://blogs.msdn.microsoft.com/vcblog/2016/05/04/new-code-optimizer/</url></story><parent_chain></parent_chain><comment><author>kibwen</author><text>Undefined behavior notice:&lt;p&gt;&lt;pre&gt;&lt;code&gt;  &amp;gt; Historically, Visual C++ did not take advantage of the 
  &amp;gt; fact that the C and C++ standards consider the result 
  &amp;gt; of overflowing signed operations undefined. Other 
  &amp;gt; compilers are very aggressive in this regard, which 
  &amp;gt; motivated the decision to implement some patterns which 
  &amp;gt; take advantage of undefined integer overflow behavior. 
  &amp;gt; We implemented the ones we thought were safe and didn’t 
  &amp;gt; impose any unnecessary security risks in generated code.

  &amp;gt; A new undocumented compiler flag has been added to 
  &amp;gt; disable these optimizations, in case an application 
  &amp;gt; that is not standard-conformant fails: 
  &amp;gt; -d2SSAOptimizerUndefinedIntOverflow-. Due to security 
  &amp;gt; concerns, we have seen cases where these patterns 
  &amp;gt; should not be optimized, even though following the C 
  &amp;gt; and C++ standards allows us to [...]
&lt;/code&gt;&lt;/pre&gt;
It sounds like they&amp;#x27;re not doing anything that GCC&amp;#x2F;Clang aren&amp;#x27;t already, but if you&amp;#x27;ve only ever compiled with MSVC then be careful not to overlook this.</text></comment>
<story><title>Introducing a new, advanced Visual C++ code optimizer</title><url>https://blogs.msdn.microsoft.com/vcblog/2016/05/04/new-code-optimizer/</url></story><parent_chain></parent_chain><comment><author>mrich</author><text>Thumbs up to Microsoft for investing that much into their C&amp;#x2F;C++ toolchain.</text></comment>