This page is a "brief" summary of some of the huge number of improvements in GCC 13. You may also want to check out our Porting to GCC 13 page and the full GCC documentation.
m32c-rtemsconfigurations has been removed.
*-*-solaris2.11.3) has been declared obsolete. The next release of GCC will have corresponding code permanently removed. Details can be found in the announcement.
-gxcoffoptions) has been removed. (This means the dbx debugger is no longer supported, either.)
-gz=zlib-gnuwas removed and the option is ignored right now.
-Warray-bounds=2will no longer issue warnings for out of bounds accesses to trailing struct members of one-element array type anymore. Instead it diagnoses accesses to trailing arrays according to
-fanalyzeris still only suitable for analyzing C code. In particular, using it on C++ is unlikely to give meaningful output.
-mcpu=iwmmxt, has been deprecated and will be removed in a future release. This includes support for the iWMMXt built-in functions.
std::cin, etc. is now done inside the standard library, instead of in every source file that includes the
<iostream>header. This change improves the start-up performance of C++ programs, but it means that code compiled with GCC 13.1 will crash if the correct version of
libstdc++.sois not used at runtime. See the documentation about using the right
libstdc++.soat runtime. Future GCC releases will mitigate the problem so that the program cannot be run at all with an older
requireshandling has been improved and all clauses are now accepted. If a requirement cannot be fulfilled for an accessible device, this device is excluded from the list of available devices. This may imply that the only device left is the host (the initial device). In particular,
unified_shared_memoryare unsupported by all non-host devices.
omp_all_memoryreserved locator, the
inoutsetmodifier to the
nowaitclause for the
taskwaitdirective and the
omp_get_mapped_ptrAPI routines. The
begin/end declare targetsyntax in C/C++ and device-specific ICV settings with environment variables are now supported.
allocateclauses on the
scopeconstruct; the OpenMP 5.2 syntax of the
linearclause; new enum/constants
omp_invalid_device; and optionally omitting the map-type in
target enter/exit data. The
enterclause (as alias for
to) has been added to the
declare targetdirective. Also added have been the
omp_in_explicit_taskroutine and the
doacrossclause as alias for
_ALLsuffix to the device-scope environment variables added in Technical Report (TR11) is already handled.
detect_stack_use_after_return=1on GNU/Linux targets. For compatibility, it can be disabled with
-gz=zstdhas been added.
--jobserver-style=fifo) by default.
-funsafe-math-optimizationswill no longer add startup code to alter the floating-point environment when producing a shared object with
-fanalyzer), but it can also be used to capture other GCC warnings and errors in a machine-readable format. Specifically, the
-fdiagnostics-format=option has been extended to support these new values:
-fdiagnostics-format=json-stderr, a synonym for the existing
json-prefixed variants refer to GCC's own JSON diagnostic format.
SPARK_Mode=>Autois now accepted. Contract analysis has been further improved.
intarguments that are file descriptors:
-fanalyzerto detect misuses of file descriptors.
-fstrict-flex-arraysto control which array members are treated as flexible arrays.
constexprspecifier for object definitions
typeof(previously supported as an extension) and
__STDC_VERSION_*_H__header version macros
scanfformat checking with
%wfNformat length modifiers
-std=c++17, where it defaults to
-fexcess-precision=standard, while in GNU standard modes like
-std=gnu++20it defaults to
-fexcess-precision=fast. The option mainly affects IA-32/x86-64 using x87 math and in some cases on Motorola 68000, where
doubleexpressions are evaluated in
long doubleprecision and S/390, System z, IBM z Systems where
floatexpressions are evaluated in
doubleprecision. Also, on several architectures where
std::bfloat16_ttypes are supported those are evaluated in
-fexcess-precision=fastrestores previous behavior.
char8_tCompatibility and Portability Fix (PR106656)
-Wredundant-movewarnings have been extended to warn in more contexts.
-nostdlib++option has been added, to enable linking with
g++without implicitly linking in the C++ standard library.
std::chrono::utc_clockand other clocks, time zones, and
std::formatsupport in the
<experimental/scope>header from v3 of the Library Fundamentals Technical Specification.
<experimental/synchronized_value>header from v2 of the Concurrency Technical Specification.
std::tupleis now available for freestanding compilation. The freestanding subset contains all the components made freestanding by P1642, but libstdc++ adds more components to the freestanding subset, such as
std::string_view. Additionally, libstdc++ now respects the
-ffreestandingcompiler option and so it is not necessary to build a separate freestanding installation of libstdc++. Compiling with
-ffreestandingwill restrict the available features to the freestanding subset, even if libstdc++ was built as a full, hosted implementation.
<* noreturn *>attribute is supported with the
-mtuneoptions (GCC identifiers in parentheses).
armv9.3-aarguments to the
FEAT_LRCPCfeature is now supported by generating the
LDAPRinstructions for C and C++ atomic loads with an acquire memory model. This is enabled when compiling with the
-marchor a CPU target that supports this feature.
FEAT_CSSCfeature from the 2022 Arm Architecture extensions is supported through the
+csscextension option. When enabled, scalar operations like integer minimum, maximum, absolute value, count trailing zeroes (
__builtin_ctz), population count (
__builtin_popcount) can be implemented in a single instruction.
FEAT_LSE2feature is now supported through
libatomicand provides lockless 16-byte atomics on systems that implement it.
gfx90a) has been added.
-mtuneoptions (GCC identifiers in parentheses).
__bf16type is supported on x86 systems with SSE2 and above enabled.
__bf16type for AVX512BF16 intrinsics. Previously we use __bfloat16 which is typedef of short. Now we introduced real
__bf16type to x86 psABI. Users need to adjust their AVX512BF16-related source code when upgrading GCC12 to GCC13.
-march=raptorlake. Raptor Lake is based on Alder Lake.
-march=meteorlake. Meteor Lake is based on Alder Lake.
-march=sierraforest. The switch enables the AVX-IFMA, AVX-VNNI-INT8, AVX-NE-CONVERT and CMPccXADD ISA extensions.
-march=grandridge. The switch enables the AVX-IFMA, AVX-VNNI-INT8, AVX-NE-CONVERT, CMPccXADD and RAO-INT ISA extensions.
-march=emeraldrapids. Emerald Rapids is based on Sapphire Rapids.
-march=graniterapids. The switch enables the AMX-FP16, PREFETCHI ISA extensions.
-march=graniterapids-d. The switch enables the AMX-FP16, PREFETCHI and AMX-COMPLEX ISA extensions.
-march=znver4. The switch makes GCC consider using 512 bit vectors when auto-vectorizing.
-mexplicit-relocsdecides whether to use the assembler relocation operator when dealing with symbolic addresses. It is enabled by default if a compatible assembler (binutils 2.40 or later) is present at GCC build time.
-mdirect-extern-accesscan be used to prevent accessing external symbols through GOT.
modelhas been added.
copysignmathematical builtins (and their float variants) are now implemented as inline LoongArch intrinsics.
ldexpmathematical builtins (and their float variants) are now implemented as inline LoongArch intrinsics when using
lfloormathematical builtins (and their float variants) are now implemented as inline LoongArch intrinsics when using
libvtvnow supports LoongArch.
libitmnow supports LoongArch.
-marchoption can be now changed when building GCC using the
--with-arch=configure option. GCC's target libraries are then build both with
sm_30and the specified target architecture. If not specified, GCC defaults to
-mcpuoption (GCC identifiers in parentheses).
accepton a socket before calling
-Wanalyzer-fd-type-mismatch(e.g. using a stream socket operation on a datagram socket)
along with special-casing handling of the behavior of
-Wanalyzer-va-list-leakfor complaining about missing
-Wanalyzer-va-list-use-after-va-endfor complaining about
va_copyused on a
va_endcalled on it
-Wanalyzer-va-arg-type-mismatchfor type-checking of
va_argusage in interprocedural execution paths against the types of the parameters that were actually passed to the variadic call
-Wanalyzer-va-list-exhaustedfor complaining in interprocedural execution paths if
va_argis used too many times on a
This is the list of problem reports (PRs) from GCC's bug tracking system that are known to be fixed in the 13.1 release. This list might not be complete (that is, it is possible that some PRs that have been fixed are not listed here).
This is the list of problem reports (PRs) from GCC's bug tracking system that are known to be fixed in the 13.2 release. This list might not be complete (that is, it is possible that some PRs that have been fixed are not listed here).
Copyright (C) Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
These pages are maintained by the GCC team. Last modified 2023-08-03.