Whenever a story about UB comes up on hacker news, the comments usually fill with both the predictable &quot;Don&#x27;t use C&quot; comments and also a lot of ill-informed ranting about how stupid all this UB is.<p>For the first group of commenters, please don&#x27;t bother posting again, just search HN and you can find a lifetime&#x27;s supply of C love&#x2F;hate arguments.<p>For the second group of people, I&#x27;d recommend reading two fantastic guides to UB:<p><a href="http:&#x2F;&#x2F;blog.regehr.org&#x2F;archives&#x2F;213" rel="nofollow">http:&#x2F;&#x2F;blog.regehr.org&#x2F;archives&#x2F;213</a><p><a href="http:&#x2F;&#x2F;blog.llvm.org&#x2F;2011&#x2F;05&#x2F;what-every-c-programmer-should-know.html" rel="nofollow">http:&#x2F;&#x2F;blog.llvm.org&#x2F;2011&#x2F;05&#x2F;what-every-c-programmer-should-...</a><p>These should be enough to explain why UB is trickier than you think...