GCC 4.8 Completes Move to C++

| by Jeff Martin Follow 6 Followers on Mar 28, 2013. Estimated reading time: 1 minute |

A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.

The latest version of the GNU Compiler Collection (GCC) has been released which marks completion of its conversion to C++. This process been a multi-year project, with the GCC team stating that this move was needed to retain and attract new project members through a maintainable code base. C++ was chosen in part as it is a standards-based language that according to the project "supports cleaner code, makes it easier to write and enforce cleaner interfaces... and is not a panacea but it is an improvement [over the C-based legacy code].” The end-result for most developers is only that those interested in compiling 4.8 from source must use a compiler that understands C++ 2003.  Typical users will simply benefit from a compiler suite that is designed to be more efficient and easier to update.

New Compiler Features

General compiler improvements include a "new general optimization level [that] has been introduced. It addresses the need for fast compilation and a superior debugging experience while providing a reasonable level of runtime performance.” Additionally, 4.8 includes the AddressSanitizer for memory error detection and the ThreadSanitizer which allows instructions [to] be instrumented to detect data races. (The ThreadSanitizer is currently exclusively available on x86-64 GNU/Linux.)

Notable new compiler targets include 64-bit ARM (AArch64), and 32-bit ARMv8 architecture.

Language Specific Improvements

Completing the switch to C++ is not the only notable accomplishment of this release. Several areas of the compiler received improvements. GCC now supports the preliminary version of Go 1.1 for GNU/Linux and Solaris on multiple architectures. Fortran and C also received several updates worth investigating if developing in those languages.

C++ users will find improved C++11 support:

  • thread_local keyword
  • attribute syntax
  • alignment specifier
  • inheriting constructors
  • forward_list meets the allocator-aware container requirements

C++11 support in GCC 4.8 compares very favorably to the Clang 3.2, and both of these compilers have pulled ahead of the latest support in Visual Studio 2012's November CTP. Planning for future C++ changes has begun with the addition of the option -std=c++1y for experimentation with features proposed for the next major revision of the standard, expected around 2017.

The C++ runtime standard library (libstdc++) has greater support for C++11, improvements in random number generation (including hardware support on new X86 processors), and new random number distributions.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread


Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you