Think In Geek

In geek we trust

August 16th, 2015

A simple plugin for GCC – Part 2

In the last post we set up everything in order to write a GCC plugin. Before we can go on we need to understand a bit how GCC compiles your files.

A simple plugin for GCC – Part 1

GCC’s C and C++ compilers provide several extensions to address several programming needs not covered in the standards. One of these is the warn_unused_result attribute. This attribute warns us that we are discarding the result of a function. Unfortunately, for C++ it does not always work as expected.