After a year of intense development, the release of the new version of «GCC 15.1» was announced, which is positioned as the first stable version within the new 15.x branch of this popular open source compiler suite.
This release not only officially launches the new GCC 15 series, but also marks the beginning of preparations for GCC 16 development, as the 16.0 branch has been forked in parallel and will lay the groundwork for the next major release, GCC 16.1.
GCC 15.1 Main New Features
One of the most notable changes in this new version is that GCC 15.1 adopts the C23 standard as default for compiling C code, using the -std=gnu23 option. This update replaces the previous standard used by default, C17 (-std=gnu17), and introduces several new features of the new standard. Among them is the constant nullptr, the type _BitInt(n), and the keywords bool, true, and false, which could cause conflicts with existing identifiers in legacy code.
Another new feature that GCC 15.1 incorporates is the #embed directive to embed binary data, and attributes such as unsequenced and reproducible, which provide greater control over the order of execution and the determination of consistent results. In addition, elements of the future C2Y standard have been implemented, such as variables declared within if conditions, value ranges in case statements, imaginary suffixes i and j, and support for the ++ and — operators applied to complex numbers.
Improvements in C++ and the future C++26
In the case of the C++ language, the new version of GCC 15.1 implements features that are being discussed for the C++26 standard, as new features are introduced such as the "friend" operator, the use of constexpr with variants of the new operator, and improvements in the syntax for structured links and attributes such as musttail for guaranteed tail recursion.
C++23 support is also expanded with new rules for using export, improvements to the handling of temporary objects, and an experimental implementation of the std and std.compat modules in libstdc++. Additionally, security has been strengthened for union initialization and code compilation has been improved thanks to a more efficient template hashing system.
New warnings and improvements in static analysis
The system Static analysis received a visual redesign which highlights problems through symbols, Tips for migrating to C23, and a new libgdiagnostics library This allows diagnostic logic to be reused in other projects. Support for generating reports in SARIF format is also introduced, facilitating integration with modern code analysis tools.
A las Existing warnings are added to new ones, as -Wanalyzer-undefined-behavior-ptrdiff to detect subtractions between unrelated pointers, –Wtrailing-whitespace and -Wleading-whitespace to indicate unnecessary whitespace, and –Wheader-guard to detect errors in header inclusion protections.
Optimizations and support
Among the notable optimizations, An incremental compilation mode for LTO is included (Link-Time Optimization), designed to speed up recompilations when changes are minimal. Also loop vectorization is improved, even in cases where the size of the arrays is not known at compile time, and increases the speed of compiling very large files.
On the support side, ARMv64 extensions have been added to AArch8, support for new CPUs like Apple M3, Cortex-X925 and NVIDIA Grace, and the MinGW platform is extended. Code generation for AMD Radeon GPUs is strengthened with Experimental support for new GFX9, GFX10.3, and GFX11 seriesFor the x86 architecture, support for AVX10.2 and new AMX instructions is enabled, and support for Xeon Phi Knights is discontinued.
Furthermore, GCC 15.1 introduces a compiler for COBOL (gcobol), with support for x86-64 and AArch64 architectures, and an updated D implementation (version 2.111.0). Support for unsigned integers in Fortran is added, and adoption of OpenMP 5.0 to 6.0 is advanced, including interoperability improvements and unified memory usage on GPUs.