The GNU Compiler Collection (GCC) is now fully implemented in C++ following the release of GCC 4.8.0. The new version also adds performance improvements and new tools.
The work on moving to C++ has been going on for some years. The team behind GCC give the following reasons for the switch on the GCC wiki:
- C++ is a standardized, well known, popular language.
- C++ is nearly a superset of C90 used in GCC.
- The C subset of C++ is just as efficient as C.
- C++ supports cleaner code in several significant cases.
- C++ makes it easier to write and enforce cleaner interfaces.
- C++ never requires uglier code.
- C++ is not a panacea but it is an improvement.
Alongside the move to C++, the new version has a new general optimisation level, -Og, that according to the changes log addresses the need for fast compilation and a superior debugging experience while providing a reasonable level of runtime performance.
The memory error detector AddressSanitizer has been added to the new version, along with the ThreadSanitizer tool. This is a data race detector that is based on Valgrind under Linux and Mac, and PIN on Windows.