GCC GNU compiler adds C++ 17 support

GCC 7x release series brings diagnostics enhancements and improved compilation and runtime performance

With the 7.1 version of the GCC (GNU Compiler Collection), released this week, the platform gets early support for the C++ 17 standard and diagnostics enhancements.

Version 7.1 has a C++ front end with experimental support for all of the the C++ 17 draft specification. The -std=c++1z and -std=gnu++1z options and the libstdc++ are supported, and the library has most C++17 draft library features implemented. The earlier GCC 6.1 release abided by the C++ 14 standard.

The GCC 7 series differs from previous releases by using LRA (Local Register Allocator) by default for new targets and deprecating Cilk+ extensions to the C and C++ languages. Also, some behaviors have been relaxed in order to improve compilation or runtime performance. However, some changes could "cause grief" when porting to GCC 7, according to release notes, which cite preprocessor and C issues, as well as C++ language issues, such as stricter rules for templates. "GCC 7 no longer accepts various ill-formed constructs involving the use of templates," the notes say.

GCC 7.1 also boosts emitted diagnostics, including improved locations, and optimizer improvements appear in all of intra- and interprocedural optimizations, link time optimizations, and various target back ends, such as additions of store merging pass, code-hoisting optimization, loop splitting, and shrink-wrapping improvements. Additionally, GCC's address sanitizer now can report uses of variables after they leave their scope. GCC can be configured for the OpenMP API offloading to Nvidia PTX GPGPUs, but some code that compiled with older GCC versions might need adjustments. The collection includes front ends for C, C++, Objective-C, Fortran, Ada, and Go.

Join the newsletter!

Error: Please check your email address.

More about Nvidia

Show Comments

Market Place