<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>compiler-optimizations on Mature Pessimizations - A programming blog by Theodoros Chatzigiannakis</title>
    <link>https://blog.tchatzigiannakis.com/tags/compiler-optimizations/</link>
    <description>Recent content in compiler-optimizations on Mature Pessimizations - A programming blog by Theodoros Chatzigiannakis</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 04 Sep 2017 20:00:00 +0300</lastBuildDate>
    
	<atom:link href="https://blog.tchatzigiannakis.com/tags/compiler-optimizations/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Undefined behavior can literally erase your hard disk</title>
      <link>https://blog.tchatzigiannakis.com/undefined-behavior-can-literally-erase-your-hard-disk/</link>
      <pubDate>Mon, 04 Sep 2017 20:00:00 +0300</pubDate>
      
      <guid>https://blog.tchatzigiannakis.com/undefined-behavior-can-literally-erase-your-hard-disk/</guid>
      <description>&lt;p&gt;It is no secret that C and C++ are chock-full of pitfalls of undefined behavior. The C++ standard describes it as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;behavior for which this International Standard imposes no requirements&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Modern compilers, with optimizations on, often assume that undefined behavior is never invoked in the program and try to make sense of the code under that assumption. When a program actually does invoke undefined behavior, this conflicts with the assumption under which the compiler generated code, often resulting in strange, or even outright paradoxical results. (I like to call those cases &amp;ldquo;paranormal behavior&amp;rdquo;, but it still hasn&amp;rsquo;t caught on.)&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>