Upcoming features in GCC 6

The GCC project has traditionally made major releases yearly in the March/April timeframe.  March is rapidly approaching and the GCC project’s engineers are busy polishing things up for the GCC 6 release.  I’m going to take a short break from my own release efforts to briefly talk about some of the new features.

Warnings GCC strives to implement warnings which help developers catch errors at compile time rather than allow potentially dangerous code to be silently accepted and ultimately deployed.   For GCC 6, the major warning additions are:

Misleading indentation: The goal of the misleading indentation warning is to detect code where the block structure likely does not match how a human would read the code.  The most obvious example is the the “Apple SSL bug” from 2014 where mis-indented code made it look like a GOTO was guarded by a prior IF conditional, when in fact it was not guarded at all.  This will be covered in more detail in a blog post from David Malcolm.

Tautological comparisons: Code which compares an object to itself and which always evaluates to the same result often represents a typo/bug in the source code.  GCC 6 will now warn for such comparisons.

Continue reading “Upcoming features in GCC 6”


Join the Red Hat Developer Program (it’s free) and get access to related cheat sheets, books, and product downloads.

 

Share

GCC 5 in Fedora

gnu logoFedora 22 will ship with GCC 5, which brings a whole host of enhancements, among which is a new default C++ ABI. In this article, we’ll cover how that ABI transition will work in Fedora.

Background – what’s an ABI, why is it changing, and what does this mean for developers?

Put simply, binary compatibility means applications that are compiled on a combination of an operating system and a particular hardware architecture will load and run similarly across different instances of the operating environment. Application binaries consist of executable files and Dynamic Shared Objects (DSOs – the formal name for shared libraries), and the level of compatibility is defined by a specific application binary interface (ABI).

Continue reading “GCC 5 in Fedora”


Join the Red Hat Developer Program (it’s free) and get access to related cheat sheets, books, and product downloads.

 

Share

Red Hat Enterprise Linux 7 GCC Optimizations – partial inlining indepth

In this prior post we mentioned several new optimization improvements in GCC for Red Hat Enterprise Linux 7. It’s time to dig a little deeper. In this post we will focus on partial inlining/function outlining which are part of the Inter-Procedural Analysis (IPA) framework.

gnu logo

Function inlining is a well known technique to improve application performance by expanding the body of a called function into one or more of its call site(s). Function inlining decreases function call overhead, may improve icache behaviour, expose previously hidden redundancies, etc. However, the increase in total code size may be detrimental and, as a result, heuristics which drive inlining are very sensitive to code growth. Function outlining/partial inlining are variants of function inlining to allow for inlining with less code growth.

Continue reading “Red Hat Enterprise Linux 7 GCC Optimizations – partial inlining indepth”


Join the Red Hat Developer Program (it’s free) and get access to related cheat sheets, books, and product downloads.

 

Take advantage of your Red Hat Developers membership and download RHEL today at no cost.

Share

Improvements in memstomp

memstomp is an interposition library to detect cases where applications may exhibit undefined behaviour when calling routines within the C library (glibc).

The first version of memstomp was focused on detecting cases where source and destination memory regions passed to C library routines such as memcpy overlapped in ways not allowed by the ISO C standard.  Matt Newsome’s blog post shows how to utilize memstomp to find that class of bugs.

Continue reading “Improvements in memstomp”

Share

What’s new in GCC for Red Hat Enterprise Linux 7

With the recent release of Red Hat Enterprise Linux 7, we have some great new features to pass along. In this post we walk through GCC 4.8 and see what is new for developers.

Continue reading “What’s new in GCC for Red Hat Enterprise Linux 7”


Join the Red Hat Developer Program (it’s free) and get access to related cheat sheets, books, and product downloads.

 

Take advantage of your Red Hat Developers membership and download RHEL today at no cost.

Share