After a year of development published release of a free set of compilers GCC 14.1, the first major release in the new GCC 14.x branch. In accordance with new scheme release numbers, version 14.0 was used in the development process, and shortly before the release of GCC 14.1, the GCC 15.0 branch had already branched off, on the basis of which the next significant release, GCC 15.1, would be formed.
Basic changes:
- Significantly expanded capabilities for static analysis of code in the C language, available through the “-fanalyzer” option (static analysis for the C++ language has not yet been brought to the proper form). The analysis of operations with strings and the check for the presence of a string terminating null character have been strengthened. Added new warning “-Wanalyzer-infinite-loop” to detect infinite loops. Added a series of “-Wanalyzer-tainted-*” warnings to identify problems with input validation. The “-Wanalyzer-out-of-bounds” warning has been enhanced to detect buffer overflows, for example, the ability to display a chart visualizing the state leading to the overflow has been added.
- Added a new build option “–enable-host-pie” for building compiler executable files in PIE (Position Independent Executable) mode, as well as an option “–enable-host-bind-now” for binding with the “-Wl,-” options z,now”.
- Added new option “-fhardened“, including flags to enhance security (-D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -ftrivial-auto-var-init=zero -fPIE -pie -Wl, -z,relro,-z,now -fstack-protector-strong -fstack-clash -protection -fcf-protection=full).
- Added option “-fharden-control-flow-redundancy” to append code to the end of functions to detect some form of undefined behavior that could potentially disrupt control flow by using exploits that modify memory-stored function pointers and transfer control to the middle of functions.
- Added new types attribute “hardbool“, which allows you to override the values associated with the true and false flags to make certain types of attacks more difficult.
- Added new types attribute strub to control the reset of stack frames with data of functions and variables after a function exits or an exception is thrown.
- Added option -finline-stringops to enable inline expansion of the memcmp, memcpy, memmove and memset functions, even when it is not needed for optimization.
- Added a new function attribute null_terminated_string_arg(PARAM_IDX) to mark parameters that should be treated as null-terminated strings.
- The vectorizer supports vectorization of loops containing “break” expressions.
- Added initial support for pre-release specification OpenMP 6.0 (Open Multi-Processing) and continued implementation of standards OpenMP 5.0, 5.1 and 5.2defining APIs and methods for applying parallel programming methods on multi-core and hybrid (CPU+GPU/DSP) systems with shared memory and vectorization units (SIMD).
- Improved implementation of parallel programming specifications OpenACC 2.7 and 3.2defining tools for offloading operations on GPUs and specialized processors, such as NVIDIA PTX.
- For C, C++ and Objective-C, support for the “__has_feature” and “__has_extension” extensions used in Clang has been implemented.
- Features defined in the future C-standard have been implemented C23, such as the types “_BitInt(N)” and “unsigned _BitInt(N))”. Structures, unions, and enumerations are allowed to be defined more than once in the same scope, visible with the same content and repeating tag. Added support for stdckdint.h header file. The flags “-std=c23”, “-std=gnu23” and “-Wc11-c23-compat” are provided to enable support for C23 elements.
- For the C language, the expression “#pragma GCC novector” has been added, disabling vectorization of annotated loops.
- Added features related to the standard C++23. Added support for the “Deducing this“, which allows you to use parameters with the “this” attribute in the template and makes it possible to find out from a class function the category of the expression (for example, whether it is a constant) for which this function is called. A requirement has been implemented, according to which all functions calling functions with the consteval attribute also become consteval, i.e. they are executed during compilation. Some requirements for “constexpr” are relaxed.
- Added features related to the future C++2c (C++26) standard. For example, provided the ability to use string literals in a context in which they are not used to initialize a character array and do not end up in the resulting code, but are used only at compile time for diagnostic messages and preprocessing. Added opportunity using multiple placeholder variables with the name “_” in one scope. Translated Deprecated: performing implicit conversions of enumerated values in arithmetic calculations.
- libstdc++ has improved support for C++20, C++23 and C++26 standards.
- In the Fortran compiler, work has begun on supporting the Fortran 2023 standard (-std=f2023).
- Deprecated support for a GCC extension that allows a flexible array element (an array of indeterminate size, such as “int b()”) to be specified other than at the end of a structure (Flexible Array Members). An array of indefinite size can then only be used at the end of the structure.
- The backend for the AArch64 architecture supports CPU Ampere-1B (ampere1b), Arm Cortex-A520 (cortex-a520), Arm Cortex-A720 (cortex-a720), Arm Cortex-X4 (cortex-x4) and Microsoft Cobalt-100 ( cobalt-100). New generic CPU identifiers, generic-armv8-a and generic-armv9-a, have been added for use in the “-mcpu=” and “-mtune=” options. Added support for Arm SME and SME2 (Streaming Matrix Extensions). Implemented AArch64 architecture-specific optimizations.
- In the backend for the ARM architecture, support for Cortex-M52 CPUs has been added (cortex-m52 in the “-mcpu=” and “-mtune=” options).
- The code generation backend for AMD Radeon GPUs (GCN) supports AMD Radeon gfx90c (GCN5), gfx1030, gfx1036 (RDNA2), gfx1100 and gfx1103 (RDNA3) GPUs. Improved performance for AMD MI100 and MI200 series devices. By default, the gfx900 (Vega) device architecture is activated.
- Support for the Intel AVX10.1, Intel APX (partial), Intel AVX-VNNI-INT16, Intel SHA512, Intel SM3, Intel SM4, Intel USER_MSR instruction set architecture extensions has been added to the x86 architecture backend.
Added support for AMD CPUs based on the Zen 5 core (-march=znver5), as well as Intel Clearwater Forest (-march=clearwaterforest), Arrow Lake (-march=arrowlake), Arrow Lake S (-march=arrowlake-s) processors, Lunar Lake (-march=lunarlake) and Panther Lake (-march=pantherlake). Added option “-m(no-)evex512” to control the use of 512-bit vectors (enabled by default when supporting AVX512F. Intel Xeon Phi CPU support has been deprecated.
- Backend capabilities for LoongArch, AVR and RISC-V platforms have been expanded.
- The capabilities of diagnostic output in the SARIF format, based on JSON, have been expanded. The SARIF format can be used to obtain static analysis results (GCC -fanalyzer), as well as to obtain warning and error information.
- Support for ia64 and nios2 target architectures used in processors has been deprecated and will be removed in the next GCC release Intel Itanium And Nios II.
Thanks for reading: