Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News GCC 6.1 Brings New C++17 Features, Full Support for OpenMP, Improves OpenACC

GCC 6.1 Brings New C++17 Features, Full Support for OpenMP, Improves OpenACC

This item in japanese

Version 6.1 is the first major GCC release after more than one year. It contains substantial new functionality, says GCC maintainer Jakub Jelinek, including new C++17 features, full support for OpenMP, and improved support for OpenACC.

Among the most important changes introduced in GCC 6.1:

  • The C++ compiler now defaults to -std=gnu++14 instead of std=gnu++98.
  • Improvements to diagnostics, including improved locations, location ranges, suggestions for misspelled identifiers, fix-it hints and new warnings.
  • Improvements to the optimizers. This affects intra-procedural optimizations, inter-procedural optimizations, link time optimizations and various target backends.
  • The C++ compiler has been extended to support new features that are expected in C++17, such as fold expressions, u8 character literals, and nested namespace definition. Additionally, it also includes support for C++ concepts, a feature that has not yet been officially included in C++17, and C++ transactional memory. Similarly, the C++ standard library has been extended to include support for C++17 features such as std::uncaught_exception, std::invoke, std::shared_mutex, etc.
  • Full support for the Open Multi-Processing (OpenMP) 4.5 specification, an API designed for multi-platform shared memory multiprocessing.
  • Improved support for the OpenACC 2.0a specification, a programming standard developed by Cray, CAPS, Nvidia, and PGI and aimed to simplify parallel programming of heterogeneous CPU/GPU systems.

To make it easier for developers to port existing code to GCC 6.1, the GCC team has also published a guide that details major issues that may arise and provide solutions for them. This includes, e.g.:

  • Choosing the right -std option to work with the desired standard version;
  • Caveats when using features that imply different behaviour across different standard versions, such as destructors’ noexcept exception-specification, or are altogether ruled out, such as using false where a pointer is required, etc.

The latest GCC release can be downloaded from any mirror in the GNU mirror list and can be found in the gcc/gcc-6.1.0/ subdirectory.

Rate this Article