GCC 16.1 Released as First GCC 16 Series Release with C++20 Default

GCC 16.1 arrives as the first GCC 16 release, switching the default C++ dialect from GNU C++17 to GNU C++20.

The GCC developers have released GCC 16.1, the first stable release in the GCC 16 series, as part of the GNU Compiler Collection. This release introduces a new default behavior for C++ builds, additional language support, enhanced diagnostics, and improved target support for recent hardware.

The most important change is that GCC’s C++ frontend now defaults to GNU C++20 rather than GNU C++17. Projects depending on an older C++ standard may need to specify the -std= option in their build flags or update their source code for GCC 16. C++20 library support is now stable, but C++20 modules remain experimental and still require -fmodules.

On top of that, GCC 16.1 introduces experimental support for several C++26 features, including reflection, contracts, expansion statements, constexpr exceptions, and related standard library additions such as std::simd, std::inplace_vector, std::optional<T&>, std::copyable_function, and std::function_ref.

Additionally, a new experimental Algol 68 compiler frontend, ga68, has been added. According to the GCC project, this frontend targets the language as described in the Revised Report, including approved errata, and implements select GNU extensions and a POSIX prelude.

Diagnostics have been updated with GCC 16 can now generate diagnostics in experimental HTML format, and SARIF output includes new control-flow information. The older JSON diagnostics format has been removed, and users are directed to use SARIF for machine-readable diagnostics.

This release also expands C23 _BitInt support to additional targets, including RISC-V, Arm, S/390, and LoongArch. The C frontend now supports counted-by attribution for pointer fields, and the Fortran coarray implementation adds shared-memory multithreading support on single-node systems.

GCC 16.1 includes optimization improvements such as enhanced vectorization, support for vectorizing uncounted loops, and improved handling of reductions and early exits. Link-Time Optimization now better handles top-level assembly statements using -flto-toplevel-asm-heuristics. Speculative devirtualization has been extended as well to support general indirect function calls and multiple speculative targets.

Hardware support has also been updated. On x86, GCC 16 adds support for AMD Zen 6 with -march=znver6, Intel Wildcat Lake with -march=wildcatlake, and Intel Nova Lake with -march=novalake. AMD GPU offloading now includes experimental MI300 support, and LoongArch and IBM Z receive further compiler enhancements.

As with previous major GCC releases, some code that compiled with earlier versions may require changes to compile with GCC 16.1. For more details, see the announcement or check out the release notes.

GCC 16.1 is now available from the GNU project’s release servers in the gcc-16.1.0 directory.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Leave a Reply

Your email address will not be published. Required fields are marked *