Archive for 'gcc'

GCC is Scary

Markus | Tuesday, May 23rd 2017, 19:58

-- Debugging an application which only works in the debug build

Figure 1. The error message I was confronted with

Recently, I had an interesting bug in one of my C applications where the application would work in the debug build but not in the release build (-O3 etc.). It turned out to be a really stupid mistake of mine where I went 'How could that ever work?!' after finding it out. However, this opened my eyes to how strong gcc's optimization feature really is.

In this article, I will explain the mistake I made, how I went about solving it and what I learned about gcc in the process.

→ Click here to continue reading ←

Tags: gcc software