Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

1
  • +1 for "undefined behavior." I've been bitten by that one. Wrote some code that depended on int + int to overflow exactly as if it compiled down to a hardware ADD instruction. It worked just fine when compiled with an older version of GCC, but not when compiled with the newer compiler. Apparently the nice people at GCC decided that since the result of an integer overflow is undefined, their optimizer could operate under the assumption that it never happens. It optimized an important branch right out of the code. Commented Jun 27, 2016 at 17:11