This file contains information about GCC releases which has been generated
automatically from the online release notes.  It covers releases of GCC
(and the former EGCS project) since EGCS 1.0, on the line of development
that led to GCC 3. For information on GCC 2.8.1 and older releases of GCC 2,
see ONEWS.

======================================================================
http://gcc.gnu.org/gcc-13/index.html
                             GCC 13 Release Series

   April 26, 2023

   The GCC developers are pleased to announce the release of GCC 13.1.

   This release is a major release, containing new features (as well as
   many other improvements) relative to GCC 12.x.

Release History

   GCC 13.1
          April 26, 2023 ([1]changes, [2]documentation)

References and Acknowledgements

   GCC used to stand for the GNU C Compiler, but since the compiler
   supports several other languages aside from C, it now stands for the
   GNU Compiler Collection.

   A list of [3]successful builds is updated as new information becomes
   available.

   The GCC developers would like to thank the numerous people that have
   contributed new features, improvements, bug fixes, and other changes as
   well as test results to GCC. This [4]amazing group of volunteers is
   what makes GCC successful.

   For additional information about GCC please refer to the [5]GCC project
   web site or contact the [6]GCC development mailing list.

   To obtain GCC please use [7]our mirror sites or [8]our version control
   system.


    For questions related to the use of GCC, please consult these web
    pages and the [9]GCC manuals. If that fails, the
    [10]gcc-help@gcc.gnu.org mailing list might help. Comments on these
    web pages and the development of GCC are welcome on our developer
    list at [11]gcc@gcc.gnu.org. All of [12]our lists have public
    archives.

   Copyright (C) [13]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 [14]maintained by the GCC team. Last modified
   2023-04-26.

References

   1. http://gcc.gnu.org/gcc-13/changes.html
   2. http://gcc.gnu.org/onlinedocs/13.1.0/
   3. http://gcc.gnu.org/gcc-13/buildstat.html
   4. http://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Contributors.html
   5. http://gcc.gnu.org/index.html
   6. mailto:gcc@gcc.gnu.org
   7. http://gcc.gnu.org/mirrors.html
   8. http://gcc.gnu.org/git.html
   9. https://gcc.gnu.org/onlinedocs/
  10. mailto:gcc-help@gcc.gnu.org
  11. mailto:gcc@gcc.gnu.org
  12. https://gcc.gnu.org/lists.html
  13. https://www.fsf.org/
  14. https://gcc.gnu.org/about.html
======================================================================
http://gcc.gnu.org/gcc-13/changes.html
                             GCC 13 Release Series
                        Changes, New Features, and Fixes

   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 [1]Porting
   to GCC 13 page and the [2]full GCC documentation.

Caveats

     * OpenMP offloading to Intel MIC has been removed.
     * The support for the cr16-elf, tilegx*-linux, tilepro*-linux,
       hppa[12]*-*-hpux10*, hppa[12]*-*-hpux11* and m32c-rtems
       configurations has been removed.
     * Support for Solaris 11.3 (*-*-solaris2.11.3) has been declared
       obsolete. The next release of GCC will have corresponding code
       permanently removed. Details can be found in the [3]announcement.
     * Support for emitting the STABS debugging format (including the
       -gstabs and -gxcoff options) has been removed. (This means the dbx
       debugger is no longer supported, either.)
     * Legacy debug info compression option -gz=zlib-gnu was removed and
       the option is ignored right now.
     * [4]-Warray-bounds=2 will 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 -fstrict-flex-arrays.
     * [5]-fanalyzer is still only suitable for analyzing C code. In
       particular, using it on C++ is unlikely to give meaningful output.
     * In the arm port, support for the iWMMXt extensions, enabled through
       -mcpu=iwmmxt, has been deprecated and will be removed in a future
       release. This includes support for the [6]iWMMXt built-in
       functions.

General Improvements

     * [7]OpenMP
          + Reverse offload is now supported with AMD GCN and nvptx
            devices. Additionally, the requires handling 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_address and unified_shared_memory are
            unsupported by all non-host devices.
          + OpenMP 5.0: Fortran now supports some non-rectangular loop
            nests; for C/C++, the support was added in GCC 11.
          + The following OpenMP 5.1 features have been added: the
            omp_all_memory reserved locator, the inoutset modifier to the
            depend clause, the nowait clause for the taskwait directive
            and the omp_target_is_accessible, omp_target_memcpy_async,
            omp_target_memcpy_rect_async and omp_get_mapped_ptr API
            routines. The assume and assumes directives, the begin/end
            declare target syntax in C/C++ and device-specific ICV
            settings with environment variables are now supported.
          + Initial support for OpenMP 5.2 features has been added:
            firstprivate and allocate clauses on the scope construct; the
            OpenMP 5.2 syntax of the linear clause; new enum/constants
            omp_initial_device and omp_invalid_device; and optionally
            omitting the map-type in target enter/exit data. The enter
            clause (as alias for to) has been added to the declare target
            directive. Also added have been the omp_in_explicit_task
            routine and the doacross clause as alias for depend with
            source/sink modifier.
          + The _ALL suffix to the device-scope environment variables
            added in Technical Report (TR11) is already handled.
          + For user defined allocators requesting high bandwidth or large
            capacity memspaces or interleaved partitioning, the [8]memkind
            library is used, if available at run time.
     * AddressSanitizer defaults to detect_stack_use_after_return=1 on
       GNU/Linux targets. For compatibility, it can be disabled with env
       ASAN_OPTIONS=detect_stack_use_after_return=0.
     * New debug info compression option value -gz=zstd has been added.
     * Link-time optimization improvements:
          + LTO supports the newly added jobserver of GNU make jobserver
            that uses named pipes (--jobserver-style=fifo) by default.
          + If make's jobserver is active, parallel LTO WPA streaming
            communicates with it and thus avoids system overcommitting.
     * -Ofast, -ffast-math and -funsafe-math-optimizations will no longer
       add startup code to alter the floating-point environment when
       producing a shared object with -shared.
     * GCC can now emit its diagnostics using [9]SARIF. This is a
       JSON-based format suited for capturing the results of static
       analysis tools (like GCC's [10]-fanalyzer), but it can also be used
       to capture other GCC warnings and errors in a machine-readable
       format. Specifically, the [11]-fdiagnostics-format= option has been
       extended to support these new values:
          + -fdiagnostics-format=sarif-stderr
          + -fdiagnostics-format=sarif-file
          + -fdiagnostics-format=json-stderr, a synonym for the existing
            -fdiagnostics-format=json
          + -fdiagnostics-format=json-file
       where the json-prefixed variants refer to GCC's own JSON diagnostic
       format.

New Languages and Language specific improvements

  Ada

     * Traceback support added in RTEMS for the PPC ELF and ARM
       architectures.
     * Support for versions older than VxWorks 7 has been removed.
     * General improvements to the contracts in the standard libraries.
     * Addition of GNAT.Binary_Search.
     * Further additions and fixes for the Ada 2022 specification.
     * The Pragma SPARK_Mode=>Auto is now accepted. Contract analysis has
       been further improved.
     * Documentation improvements.

  C family

     * New warnings:
          + [12]-Wxor-used-as-pow warns about uses of ^, the exclusive or
            operator, where it appears the user meant exponentiation
            ([13]PR90885)
     * Three new function attributes for documenting int arguments that
       are file descriptors:
          + [14]__attribute__((fd_arg(N)))
          + [15]__attribute__((fd_arg_read(N)))
          + [16]__attribute__((fd_arg_write(N)))
       These are used by [17]-fanalyzer to detect misuses of file
       descriptors.
     * A new statement attribute for C++23 [18]P1774R8 Portable
       assumptions support also in C or older C++:
       [19]__attribute__((assume(EXPR)));
     * GCC can now control when to treat the trailing array of a structure
       as a flexible array member for the purpose of accessing the
       elements of such an array. By default, all trailing arrays in
       aggregates are treated as flexible array members. Use the new
       command-line option [20]-fstrict-flex-arrays to control which array
       members are treated as flexible arrays.

  C

     * Several C23 features have been implemented:
          + [21]N3042, Introduce the nullptr constant
          + [22]N2963, Enhanced Enumerations (fixed underlying types)
          + [23]N2975, Relax requirements for variadic parameter lists
          + [24]N3007, Type inference for object definitions (auto)
          + [25]N3018, The constexpr specifier for object definitions
          + [26]N3038, Introduce storage-class specifiers for compound
            literals
          + typeof (previously supported as an extension) and
            typeof_unqual
          + New keywords alignas, alignof, bool, false, static_assert,
            thread_local, true
          + [27]N2764, The noreturn attribute
          + Support for empty initializer braces
          + __STDC_VERSION_*_H__ header version macros
          + Removal of ATOMIC_VAR_INIT
          + unreachable macro in <stddef.h>
          + Removal of trigraphs
          + Removal of unprototyped functions
          + printf and scanf format checking with [28]-Wformat for %wN and
            %wfN format length modifiers
          + [29]N2836, Identifier Syntax using Unicode Standard Annex 31
     * In addition to those C23 features, existing features adopted in C23
       have been adjusted to follow C23 requirements and are not diagnosed
       with -std=c2x -Wpedantic.
     * New warnings:
          + [30]-Wenum-int-mismatch warns about mismatches between an
            enumerated type and an integer type ([31]PR105131)

  C++

     * Excess precision support (which has been available in C since GCC
       4.5) has been implemented for C++ as well. It is enabled by default
       in strict standard modes like -std=c++17, where it defaults to
       -fexcess-precision=standard, while in GNU standard modes like
       -std=gnu++20 it defaults to -fexcess-precision=fast. The option
       mainly affects IA-32/x86-64 using x87 math and in some cases on
       Motorola 68000, where float and double expressions are evaluated in
       long double precision and S/390, System z, IBM z Systems where
       float expressions are evaluated in double precision. Also, on
       several architectures where std::float16_t or std::bfloat16_t types
       are supported those are evaluated in float precision.
       -fexcess-precision=fast restores previous behavior.
     * Several C++23 features have been implemented:
          + [32]P2324R1, Labels at the end of compound statements
            ([33]PR103539)
          + [34]P2255R2, A type trait to detect reference binding to
            temporary ([35]PR104477)
          + [36]P2327R1, De-deprecating volatile compound operations
          + [37]P2437R1, Support for #warning ([38]PR106646)
          + [39]P2290R3, Delimited escape sequences ([40]PR106645)
          + [41]P2071R2, Named universal character escapes ([42]PR106648)
          + [43]P2513R3, char8_t Compatibility and Portability Fix
            ([44]PR106656)
          + [45]P1169R4, static operator() ([46]PR106651)
          + [47]P2266R3, Simpler implicit move ([48]PR101165)
          + [49]P2468R2, The Equality Operator You Are Looking For
            ([50]PR106644)
          + [51]P2362R3, Remove non-encodable
            wide character literals and multicharacter wide character lite
            rals ([52]PR106647)
          + [53]P2448R2, Relaxing some constexpr restrictions
            ([54]PR106649)
          + [55]P1467R9, Extended floating-point types and standard names
            ([56]PR106652)
          + [57]P1774R8, Portable assumptions ([58]PR106654)
          + [59]P2295R6, Support for
            UTF-8 as a portable source file encoding ([60]PR106655)
          + [61]P2589R1, static operator[] ([62]PR107684)
     * New warnings:
          + [63]-Wself-move warns when a value is moved to itself with
            std::move ([64]PR81159)
          + [65]-Wdangling-reference warns when a reference is bound to a
            temporary whose lifetime has ended ([66]PR106393)
     * The [67]-Wpessimizing-move and [68]-Wredundant-move warnings have
       been extended to warn in more contexts.
     * The [69]-nostdlib++ option has been added, to enable linking with
       g++ without implicitly linking in the C++ standard library.

    Runtime Library (libstdc++)

     * Improved experimental support for C++20, including:
          + <format> header and std::format.
          + std::chrono::utc_clock and other clocks, time zones, and
            std::format support in the <chrono> header.
     * Improved experimental support for C++23, including:
          + Additions to the <ranges> header: views::zip,
            views::zip_transform, views::adjacent,
            views::adjacent_transform views::pairwise, views::slide,
            views::chunk, views::chunk_by, views::repeat, views::chunk_by,
            views::cartesian_product, views::as_rvalue.
          + Monadic operations for std::expected.
          + Constexpr std::bitset, std::to_chars and std::from_chars.
          + Library support for extended floating-point types.
     * Support for the <experimental/scope> header from v3 of the Library
       Fundamentals Technical Specification.
     * Support for the <experimental/synchronized_value> header from v2 of
       the Concurrency Technical Specification.

  Fortran

     * Finalization is now fully supported.

  Go

     * GCC 13, like GCC 12, provides a complete implementation of the Go
       1.18 user packages.
     * Although Go 1.18 includes support for generic programming, that
       support is not yet available in GCC.

  Modula-2

     * Support for the language Modula-2 has been added. This includes
       support for the ISO/IEC 10514-1, PIM2, PIM3, PIM4 dialects together
       with a complete set of ISO/IEC 10514-1 and PIM libraries.
     * The <* noreturn *> attribute is supported with the -Wreturn-type
       [70]option.

New Targets and Target Specific Improvements

  AArch64

     * The AArch64 target now supports Decimal Floating-point in the BID
       format through the libbid library.
     * A number of new CPUs are supported through the -mcpu and -mtune
       options (GCC identifiers in parentheses).
          + Ampere-1A (ampere1a).
          + Arm Cortex-A715 (cortex-a715).
          + Arm Cortex-X1C (cortex-x1c).
          + Arm Cortex-X3 (cortex-x3).
          + Arm Neoverse V2 (neoverse-v2).
     * Support has been added for the armv9.1-a, armv9.2-a and armv9.3-a
       arguments to the -march= option.
     * The FEAT_LRCPC feature is now supported by generating the LDAPR
       instructions for C and C++ atomic loads with an acquire memory
       model. This is enabled when compiling with the +rcpc extension to
       -march or a CPU target that supports this feature.
     * The FEAT_CSSC feature from the 2022 Arm Architecture extensions is
       supported through the +cssc extension 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.
     * The FEAT_LSE2 feature is now supported through libatomic and
       provides lockless 16-byte atomics on systems that implement it.

  AMD Radeon (GCN)

     * Support for the Instinct MI200 series devices ([71] gfx90a) has
       been added.
     * SIMD vectorization support has been improved; this and
       stack-handling changes [72]require newlib 4.3.0 (or newer).

  arm

     * A number of new CPUs are supported through the -mcpu and -mtune
       options (GCC identifiers in parentheses).
          + STAR-MC1 (star-mc1).
          + Arm Cortex-X1C (cortex-x1c).
          + Arm Cortex-M85 (cortex-m85).
     * Support has been added for the M-profile PACBTI extension that can
       help harden the generated code against return-oriented and
       jump-oriented attacks. It can be enabled through the
       -mbranch-protection= option.

  IA-32/x86-64

     * For both C and C++ the __bf16 type is supported on x86 systems with
       SSE2 and above enabled.
     * Use real __bf16 type for AVX512BF16 intrinsics. Previously we use
       __bfloat16 which is typedef of short. Now we introduced real __bf16
       type to x86 psABI. Users need to adjust their AVX512BF16-related
       source code when upgrading GCC12 to GCC13.
     * New ISA extension support for Intel AVX-IFMA was added. AVX-IFMA
       intrinsics are available via the -mavxifma compiler switch.
     * New ISA extension support for Intel AVX-VNNI-INT8 was added.
       AVX-VNNI-INT8 intrinsics are available via the -mavxvnniint8
       compiler switch.
     * New ISA extension support for Intel AVX-NE-CONVERT was added.
       AVX-NE-CONVERT intrinsics are available via the -mavxneconvert
       compiler switch.
     * New ISA extension support for Intel CMPccXADD was added. CMPccXADD
       intrinsics are available via the -mcmpccxadd compiler switch.
     * New ISA extension support for Intel AMX-FP16 was added. AMX-FP16
       intrinsics are available via the -mamx-fp16 compiler switch.
     * New ISA extension support for Intel PREFETCHI was added. PREFETCHI
       intrinsics are available via the -mprefetchi compiler switch.
     * New ISA extension support for Intel RAO-INT was added. RAO-INT
       intrinsics are available via the -mraoint compiler switch.
     * New ISA extension support for Intel AMX-COMPLEX was added.
       AMX-COMPLEX intrinsics are available via the -mamx-complex compiler
       switch.
     * GCC now supports the Intel CPU named Raptor Lake through
       -march=raptorlake. Raptor Lake is based on Alder Lake.
     * GCC now supports the Intel CPU named Meteor Lake through
       -march=meteorlake. Meteor Lake is based on Alder Lake.
     * GCC now supports the Intel CPU named Sierra Forest through
       -march=sierraforest. The switch enables the AVX-IFMA,
       AVX-VNNI-INT8, AVX-NE-CONVERT and CMPccXADD ISA extensions.
     * GCC now supports the Intel CPU named Grand Ridge through
       -march=grandridge. The switch enables the AVX-IFMA, AVX-VNNI-INT8,
       AVX-NE-CONVERT, CMPccXADD and RAO-INT ISA extensions.
     * GCC now supports the Intel CPU named Emerald Rapids through
       -march=emeraldrapids. Emerald Rapids is based on Sapphire Rapids.
     * GCC now supports the Intel CPU named Granite Rapids through
       -march=graniterapids. The switch enables the AMX-FP16, PREFETCHI
       and AMX-COMPLEX ISA extensions.
     * GCC now supports AMD CPUs based on the znver4 core via
       -march=znver4. The switch makes GCC consider using 512 bit vectors
       when auto-vectorizing.

  LoongArch

     * New features
          + The new command-line option -mexplicit-relocs decides 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.
          + The new command-line option -mdirect-extern-access can be used
            to prevent accessing external symbols through GOT.
          + The new variable attribute [73]model has been added.
     * Built-in functions
          + The rint and copysign mathematical builtins (and their float
            variants) are now implemented as inline LoongArch intrinsics.
          + The lrint, logb, scalbln, scalbn and ldexp mathematical
            builtins (and their float variants) are now implemented as
            inline LoongArch intrinsics when using -fno-math-errno.
          + The lceil and lfloor mathematical builtins (and their float
            variants) are now implemented as inline LoongArch intrinsics
            when using -ffp-int-builtin-inexact.
     * Subprojects Support
          + libvtv now supports LoongArch.
          + libitm now supports LoongArch.
          + Address sanitizers other than HWASan and TSan are now
            supported on LoongArch.

  NVPTX

     * The default value for the [74]-march option can be now changed when
       [75]building GCC using the [76]--with-arch= configure option. GCC's
       target libraries are then build both with sm_30 and the specified
       target architecture. If not specified, GCC defaults to sm_30.

  RISC-V

     * Support for vector intrinsics as specified in [77]version 0.11 of
       the RISC-V vector intrinsic specification, thanks Ju-Zhe Zhong from
       [78]RiVAI for contributing most of implementation.
     * Support for the following standard extensions has been added:
          + Zawrs
          + Zbkb
          + Zbkc
          + Zbkx
          + Zdinx
          + Zfinx
          + Zfh
          + Zfhmin
          + Zhinx
          + Zhinxmin
          + Zicbom
          + Zicbop
          + Zicboz
          + Zknd
          + Zkne
          + Zksed
          + Zksh
          + Zmmul
     * Support for the following vendor extensions has been added:
          + XTheadBa
          + XTheadBb
          + XTheadBs
          + XTheadCmo
          + XTheadCondMov
          + XTheadFMemIdx
          + XTheadFmv
          + XTheadInt
          + XTheadMac
          + XTheadMemIdx
          + XTheadMemPair
          + XTheadSync
     * The following new CPUs are supported through the -mcpu option (GCC
       identifiers in parentheses).
          + T-Head's XuanTie C906 (thead-c906).
     * Improves the multi-lib selection mechanism for the bare-metal
       toolchain (riscv*-elf*). GCC will now automatically select the
       best-fit multi-lib candidate instead of requiring all possible
       reuse rules to be listed at build time.

Operating Systems

Improvements to Static Analyzer

     * The analyzer has gained 20 new warnings:
          + [79]-Wanalyzer-allocation-size
          + [80]-Wanalyzer-deref-before-check
          + [81]-Wanalyzer-exposure-through-uninit-copy
          + Seven new warnings relating to misuse of file descriptors:
               o [82]-Wanalyzer-fd-access-mode-mismatch
               o [83]-Wanalyzer-fd-double-close
               o [84]-Wanalyzer-fd-leak
               o [85]-Wanalyzer-fd-phase-mismatch (e.g. calling accept on
                 a socket before calling listen on it)
               o [86]-Wanalyzer-fd-type-mismatch (e.g. using a stream
                 socket operation on a datagram socket)
               o [87]-Wanalyzer-fd-use-after-close
               o [88]-Wanalyzer-fd-use-without-check
            along with special-casing handling of the behavior of open,
            close, creat, dup, dup2, dup3, pipe, pipe2, read, and write.
          + [89]-Wanalyzer-imprecise-fp-arithmetic
          + [90]-Wanalyzer-infinite-recursion
          + [91]-Wanalyzer-jump-through-null
          + [92]-Wanalyzer-out-of-bounds
          + [93]-Wanalyzer-putenv-of-auto-var
          + [94]-Wanalyzer-tainted-assertion
          + Four new warnings for misuses of <stdarg.h>:
               o [95]-Wanalyzer-va-list-leak for complaining about missing
                 va_end after a va_start or va_copy
               o [96]-Wanalyzer-va-list-use-after-va-end for complaining
                 about va_arg or va_copy used on a va_list that's had
                 va_end called on it
               o [97]-Wanalyzer-va-arg-type-mismatch for type-checking of
                 va_arg usage in interprocedural execution paths against
                 the types of the parameters that were actually passed to
                 the variadic call
               o [98]-Wanalyzer-va-list-exhausted for complaining in
                 interprocedural execution paths if va_arg is used too
                 many times on a va_list
       along with numerous other improvements.

Improvements for plugin authors

     * GCC diagnostics can now be [99]associated with rules such as from
       coding standards documents, or specifications. Such rules have a
       code name and can have a URL, which GCC can print in text form or
       capture in its [100]SARIF output when emitting diagnostics.

Other significant improvements

GCC 13.1

   This is the [101]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).


    For questions related to the use of GCC, please consult these web
    pages and the [102]GCC manuals. If that fails, the
    [103]gcc-help@gcc.gnu.org mailing list might help. Comments on these
    web pages and the development of GCC are welcome on our developer
    list at [104]gcc@gcc.gnu.org. All of [105]our lists have public
    archives.

   Copyright (C) [106]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 [107]maintained by the GCC team. Last modified
   2023-04-26.

References

   1. http://gcc.gnu.org/gcc-13/porting_to.html
   2. http://gcc.gnu.org/onlinedocs/index.html#current
   3. https://gcc.gnu.org/pipermail/gcc/2022-December/240322.html
   4. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Warning-Options.html#index-Warray-bounds
   5. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html
   6. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/ARM-iWMMXt-Built-in-Functions.html
   7. https://gcc.gnu.org/projects/gomp/
   8. http://memkind.github.io/memkind/
   9. https://sarifweb.azurewebsites.net/
  10. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html
  11. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format
  12. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Warning-Options.html#index-Wxor-used-as-pow
  13. https://gcc.gnu.org/PR90885
  14. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Common-Function-Attributes.html#index-fd_005farg-function-attribute
  15. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Common-Function-Attributes.html#index-fd_005farg_005fread-function-attribute
  16. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Common-Function-Attributes.html#index-fd_005farg_005fwrite-function-attribute
  17. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html
  18. https://wg21.link/p1774r8
  19. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Statement-Attributes.html#index-assume-statement-attribute
  20. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Warning-Options.html#index-Wstrict-flex-arrays
  21. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3042.htm
  22. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2963.htm
  23. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2975.pdf
  24. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3007.htm
  25. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3018.htm
  26. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3038.htm
  27. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2764.pdf
  28. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Warning-Options.html#index-Wformat
  29. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2836.pdf
  30. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Warning-Options.html#index-Wenum-int-mismatch
  31. https://gcc.gnu.org/PR105131
  32. https://wg21.link/p2324
  33. https://gcc.gnu.org/PR103539
  34. https://wg21.link/p2255
  35. https://gcc.gnu.org/PR104477
  36. https://wg21.link/p2327
  37. https://wg21.link/p2437
  38. https://gcc.gnu.org/PR106646
  39. https://wg21.link/p2290
  40. https://gcc.gnu.org/PR106645
  41. https://wg21.link/p2071
  42. https://gcc.gnu.org/PR106648
  43. https://wg21.link/p2513
  44. https://gcc.gnu.org/PR106656
  45. https://wg21.link/p1169r4
  46. https://gcc.gnu.org/PR106651
  47. https://wg21.link/p2266r3
  48. https://gcc.gnu.org/PR101165
  49. https://wg21.link/p2468r2
  50. https://gcc.gnu.org/PR106644
  51. https://wg21.link/p2362r3
  52. https://gcc.gnu.org/PR106647
  53. https://wg21.link/p2448r2
  54. https://gcc.gnu.org/PR106649
  55. https://wg21.link/p1467r9
  56. https://gcc.gnu.org/PR106652
  57. https://wg21.link/p1774r8
  58. https://gcc.gnu.org/PR106654
  59. https://wg21.link/p2295r6
  60. https://gcc.gnu.org/PR106655
  61. https://wg21.link/p2589r1
  62. https://gcc.gnu.org/PR107684
  63. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Warning-Options.html#index-Wself-move
  64. https://gcc.gnu.org/PR81159
  65. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wdangling-reference
  66. https://gcc.gnu.org/PR106393
  67. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wpessimizing-move
  68. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wredundant-move
  69. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Link_Options.html#index-nostdlib_002b_002b
  70. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gm2/Compiler-options.html
  71. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/AMD-GCN-Options.html
  72. https://gcc.gnu.org/install/specific.html#amdgcn-x-amdhsa
  73. https://gcc.gnu.org/onlinedocs/gcc/LoongArch-Variable-Attributes.html#LoongArch-Variable-Attributes
  74. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Nvidia-PTX-Options.html
  75. https://gcc.gnu.org/install/
  76. https://gcc.gnu.org/install/specific.html#nvptx-x-none
  77. https://github.com/riscv-non-isa/rvv-intrinsic-doc/tree/v0.11.x
  78. https://rivai-ic.com.cn/
  79. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-allocation-size
  80. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-deref-before-check
  81. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-exposure-through-uninit-copy
  82. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-access-mode-mismatch
  83. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-double-close
  84. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-leak
  85. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-phase-mismatch
  86. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-type-mismatch
  87. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-use-after-close
  88. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-use-without-check
  89. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-imprecise-fp-arithmetic
  90. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-infinite-recursion
  91. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-jump-through-null
  92. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-out-of-bounds
  93. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-putenv-of-auto-var
  94. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-assertion
  95. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-va-list-leak
  96. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-va-list-use-after-va-end
  97. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-va-arg-type-mismatch
  98. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-va-list-exhausted
  99. https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=0b14f590e3e9d95b8211b77d992589d5ab4c25f0
 100. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format
 101. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=13.0
 102. https://gcc.gnu.org/onlinedocs/
 103. mailto:gcc-help@gcc.gnu.org
 104. mailto:gcc@gcc.gnu.org
 105. https://gcc.gnu.org/lists.html
 106. https://www.fsf.org/
 107. https://gcc.gnu.org/about.html
======================================================================
http://gcc.gnu.org/gcc-12/index.html
                             GCC 12 Release Series

   Aug 19, 2022

   The GCC developers are pleased to announce the release of GCC 12.2.

   This release is a bug-fix release, containing fixes for regressions in
   GCC 12.1 relative to previous releases of GCC.

Release History

   GCC 12.2
          Aug 19, 2022 ([1]changes, [2]documentation)

   GCC 12.1
          May 6, 2022 ([3]changes, [4]documentation)

References and Acknowledgements

   GCC used to stand for the GNU C Compiler, but since the compiler
   supports several other languages aside from C, it now stands for the
   GNU Compiler Collection.

   A list of [5]successful builds is updated as new information becomes
   available.

   The GCC developers would like to thank the numerous people that have
   contributed new features, improvements, bug fixes, and other changes as
   well as test results to GCC. This [6]amazing group of volunteers is
   what makes GCC successful.

   For additional information about GCC please refer to the [7]GCC project
   web site or contact the [8]GCC development mailing list.

   To obtain GCC please use [9]our mirror sites or [10]our version control
   system.


    For questions related to the use of GCC, please consult these web
    pages and the [11]GCC manuals. If that fails, the
    [12]gcc-help@gcc.gnu.org mailing list might help. Comments on these
    web pages and the development of GCC are welcome on our developer
    list at [13]gcc@gcc.gnu.org. All of [14]our lists have public
    archives.

   Copyright (C) [15]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 [16]maintained by the GCC team. Last modified
   2022-10-26.

References

   1. http://gcc.gnu.org/gcc-12/changes.html
   2. http://gcc.gnu.org/onlinedocs/12.2.0/
   3. http://gcc.gnu.org/gcc-12/changes.html
   4. http://gcc.gnu.org/onlinedocs/12.1.0/
   5. http://gcc.gnu.org/gcc-12/buildstat.html
   6. http://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Contributors.html
   7. http://gcc.gnu.org/index.html
   8. mailto:gcc@gcc.gnu.org
   9. http://gcc.gnu.org/mirrors.html
  10. http://gcc.gnu.org/git.html
  11. https://gcc.gnu.org/onlinedocs/
  12. mailto:gcc-help@gcc.gnu.org
  13. mailto:gcc@gcc.gnu.org
  14. https://gcc.gnu.org/lists.html
  15. https://www.fsf.org/
  16. https://gcc.gnu.org/about.html
======================================================================
http://gcc.gnu.org/gcc-12/changes.html
                             GCC 12 Release Series
                        Changes, New Features, and Fixes

   This page is a "brief" summary of some of the huge number of
   improvements in GCC 12. You may also want to check out our [1]Porting
   to GCC 12 page and the [2]full GCC documentation.

Caveats

     * An ABI incompatibility between C and C++ when passing or returning
       by value certain aggregates containing zero width bit-fields has
       been discovered on various targets. As mentioned in [3]PR102024,
       since the [4]PR42217 fix in GCC 4.5 the C++ front-end has been
       removing zero width bit-fields from the internal representation of
       the aggregates after the layout of those aggregates, but the C
       front-end kept them, so passing e.g. struct S { float a; int : 0;
       float b; } or struct T { float c; int : 0; } by value could differ
       between C and C++. Starting with GCC 12 the C++ front-end no longer
       removes those bit-fields from the internal representation and per
       clarified psABI some targets have been changed, so that they either
       ignore those bit-fields in the argument passing by value decisions
       in both C and C++, or they always take them into account. x86-64,
       ARM and AArch64 will always ignore them (so there is a C ABI
       incompatibility between GCC 11 and earlier with GCC 12 or later),
       PowerPC64 ELFv2 and S/390 always take them into account (so there
       is a C++ ABI incompatibility, GCC 4.4 and earlier compatible with
       GCC 12 or later, incompatible with GCC 4.5 through GCC 11). RISC-V
       has changed the handling of these already starting with GCC 10. As
       the ABI requires, MIPS takes them into account handling function
       return values so there is a C++ ABI incompatibility with GCC 4.5
       through 11. For function arguments on MIPS, refer to [5]the MIPS
       specific entry. GCC 12 on the above targets will report such
       incompatibilities as warnings or other diagnostics unless
       -Wno-psabi is used.
     * C: Computed gotos require a pointer type now.
     * C++: Two non-standard std::pair constructors have been deprecated.
       These allowed the use of an rvalue and a literal 0 to construct a
       pair containing a move-only type and a pointer. The nullptr keyword
       should be used to initialize the pointer member instead of a
       literal 0, as this is portable to other C++ implementations.
     * The configuration option --enable-libstdcxx-allocator no longer
       supports the bitmap, mt, and pool arguments. Those configurations
       had been broken for some time.
     * D: Building and bootstrapping GDC, the D compiler, now requires a
       working GDC compiler (GCC version 9.1 or later) and D runtime
       library, libphobos, as the D front end is written in D. On some
       targets, libphobos isn't enabled by default, but compiles and works
       if --enable-libphobos is used. Other targets may require a more
       recent minimum version of GCC to bootstrap. Specifics are
       documented for affected targets in the [6]manual for installing
       GCC.
     * Fortran: OpenMP code using the omp_lib.h include file can no longer
       be compiled with -std=f95 but now requires at least -std=f2003.
       Alternatively, use the omp_lib module, which still supports
       -std=f95 and is recommended to be used instead in general.
     * OpenMP offloading to Intel MIC has been deprecated and will be
       removed in a future release.
     * The cr16 target with the cr16-*-* configuration has been obsoleted
       and will be removed in a future release.
     * The hppa[12]*-*-hpux10* and hppa[12]*-*-hpux11* configurations
       targeting 32-bit PA-RISC with HP-UX have been obsoleted and will be
       removed in a future release.
     * The m32c*-*-rtems* configuration has been obsoleted and will be
       removed in a future release.
     * The support for the m32r-*-linux*, m32rle-*-linux*,
       m68k*-*-openbsd* and vax-*-openbsd* configurations has been
       removed.
     * STABS: Support for emitting the STABS debugging format is
       deprecated and will be removed in the next release. All ports now
       default to emit DWARF (version 2 or later) debugging info or are
       obsoleted.
     * The optimization level -Ofast now implies
       -fno-semantic-interposition.

General Improvements

     * Vectorization is enabled at -O2 which is now equivalent to the
       original -O2 -ftree-vectorize -fvect-cost-model=very-cheap. Note
       that default vectorizer cost model has been changed which used to
       behave as -fvect-cost-model=cheap were specified.
     * GCC now supports the [7]ShadowCallStack sanitizer, which can be
       enabled using the command-line option
       [8]-fsanitize=shadow-call-stack. This sanitizer currently only
       works on AArch64 targets and it requires an environment in which
       all code has been compiled with -ffixed-r18. Its primary initial
       user is the Linux kernel.

New Languages and Language specific improvements

     * OpenMP
          + OpenMP 5.0 support has been extended: The close map modifier
            and the affinity clause are now supported. In addition,
            Fortran gained the following features which were available in
            C and C++ before: declare variant is now available, depobj,
            mutexinoutset and iterator can now also be used with the
            depend clause, defaultmap has been updated for OpenMP 5.0, and
            the loop directive and combined directives involving the
            master directive have been added.
          + The following OpenMP 5.1 features have been added: support for
            expressing OpenMP directives as C++ 11 attributes, the masked
            and scope constructs, the nothing and error directives, and
            using primary with the proc_bind clause and OMP_PROC_BIND
            environment variable, the reproducible and unconstrained
            modifiers to the order clause, and, for C/C++ only, the align
            and allocator modifiers to the allocate clause and the atomic
            extensions are now available. The OMP_PLACE environment
            variable supports the OpenMP 5.1 features. In addition, the
            OMP_NUM_TEAMS and OMP_TEAMS_THREAD_LIMIT environment variables
            and their associated API routines are now supported as well as
            the memory-allocation routines added for Fortran and extended
            for C/C++ in OpenMP 5.1. In Fortran code, strictly structured
            blocks can be used.
          + The [9]OpenMP Implementation Status can be found in the
            libgomp manual.
     * Version 2.6 of the [10]OpenACC specification continues to be
       maintained and improved in the C, C++ and Fortran compilers. See
       the [11]implementation status section on the OpenACC wiki page and
       the [12]run-time library documentation for further information. In
       addition to general performance tuning and bug fixing, new features
       include:
          + OpenACC worker parallelism for [13]AMD GPUs (already for a
            long time supported for [14]Nvidia GPUs).
          + Data privatization/sharing at the OpenACC gang level.
          + Considerable improvements for the experimental OpenACC
            'kernels' decomposition ([15]--param
            openacc-kernels=decompose).
          + A new warning flag [16]-Wopenacc-parallelism to warn about
            potentially suboptimal choices related to OpenACC parallelism.
     * The offload target code generation for OpenMP and OpenACC can now
       be better adjusted using the new [17]-foffload-options= flag and
       the pre-existing but now documented [18]-foffload= flag.

  Ada

     * Ada 2022
          + Added the -gnat2022 flag to indicate strict Ada 2022
            compliance. The old -gnat2020 flag is now deprecated.
          + Support for Big Numbers (Annex G) has seen continuous
            improvements. It is now considered complete. It is compatible
            with SPARK, i.e. can be used from SPARK code.
          + Continuous improvements to the Ada 2022 standard since GCC 11.
          + Greatly improved compile time support. More functions can now
            have the with Static aspect and can be used in more contexts.
     * Ada 2022 extensions. The use of the -gnatX flag is necessary to
       access these features as they are not considered stable or
       standard.
          + Fixed lower bound for unconstrained arrays.
               o type Matrix is array (Natural range 0 .. <>, Natural
                 range 0 .. <>) of Integer; is now valid.
               o Subtypes can also specify a lower bound: subtype String_1
                 is String (1 .. <>);. Boundaries from slices will "slide"
                 to the correct lower bound of the subtype.
          + Generalized Object.Operand notation. The following code is now
            valid V.Add_Element(42);, with V being a vector, for example.
          + Additional when constructs. Keywords return, goto and raise
            can now use when in addition to the existing exit when. The
            following expression is therefore now valid raise
            Constraint_Error with "Element is null" when Element = null;
          + Pattern matching
               o The case statement has been extended to cover records and
                 arrays as well as finer grained casing on scalar types.
                 In the future it is expected to provide more compile time
                 guarantees when accessing discriminated fields. Case
                 exhaustion is supported for pattern matching. An example
                 would be
type Sign is (Neg, Zero, Pos);

function Multiply (S1, S2 : Sign) return Sign is
  (case (S1, S2) is
     when (Neg, Neg) | (Pos, Pos) => Pos,
     when (Zero, <>) | (<>, Zero) => Zero,
     when (Neg, Pos) | (Pos, Neg) => Neg);

     * gnatfind and gnatxref, which were already deprecated, have been
       removed.
     * Greatly expanded code covered by contracts. Thanks to this work,
       there are now several Ada standard libraries fully proven in SPARK
       which means they have no runtime nor logical errors. They are
       mostly numeric and string handling libraries.
     * Enable return-slot optimization for Pure functions.
     * General optimizations, improvements and additions to the standard
       library. Performance, correctness and in some cases stability was
       improved. Memory pools have also seen some minor enhancements.
     * Improvements to embedded-RTOS targets such as RTEMS, VxWorks and
       QNX. Older targets were removed or cleaned.
     * Added some [19]hardening features.

  C family

     * Support for __builtin_shufflevector compatible with the clang
       language extension was added.
     * Support for attribute unavailable was added.
     * A new built-in function, __builtin_assoc_barrier, was added. It can
       be used to inhibit re-association of floating-point expressions.
     * Support for __builtin_dynamic_object_size compatible with the clang
       language extension was added.
     * New warnings:
          + [20]-Wbidi-chars warns about potentially misleading UTF-8
            bidirectional control characters. The default is
            -Wbidi-chars=unpaired ([21]PR103026)
          + [22]-Warray-compare warns about comparisons between two
            operands of array type ([23]PR97573)
     * Enhancements to existing warnings:
          + [24]-Wattributes has been extended so that it's possible to
            use -Wno-attributes=ns::attr or -Wno-attributes=ns:: to
            suppress warnings about unknown scoped attributes (in C++11
            and C2X). Similarly, #pragma GCC diagnostic ignored_attributes
            "vendor::attr" can be used to achieve the same effect
            ([25]PR101940)

  C

     * Some new features from the upcoming C2X revision of the ISO C
       standard are supported with -std=c2x and -std=gnu2x. Some of these
       features are also supported as extensions when compiling for older
       language versions. In addition to the features listed, some
       features previously supported as extensions and now added to the C
       standard are enabled by default in C2X mode and not diagnosed with
       -std=c2x -Wpedantic.
          + Digit separators (as in C++) are supported for C2X.
          + The #elifdef and #elifndef preprocessing directives are now
            supported.
          + The printf and scanf format checking with [26]-Wformat now
            supports the %b format specified by C2X for binary integers,
            and the %B format recommended by C2X for printf.

  C++

     * Several C++23 features have been implemented:
          + [27]P1938R3, if consteval ([28]PR100974)
          + [29]P0849R8, auto(x): decay-copy in the language
            ([30]PR103049)
          + [31]P2242R3, Non-literal variables (and labels and gotos) in
            constexpr functions ([32]PR102612)
          + [33]P2334R1, Support for preprocessing directives elifdef and
            elifndef ([34]PR102616)
          + [35]P2360R0, Extend init-statement to allow alias-declaration
            ([36]PR102617)
          + [37]P2128R6, Multidimensional subscript operator
          + [38]DR 2397, auto specifier for pointers and references to
            arrays ([39]PR100975)
     * Several C++ Defect Reports have been resolved, e.g.:
          + [40]DR 960, Covariant functions and lvalue/rvalue references
          + [41]DR 1227, Mixing immediate and non-immediate contexts in
            deduction failure
          + [42]DR 1315, Restrictions on non-type template arguments in
            partial specializations
          + [43]DR 2082, Referring to parameters in unevaluated operands
            of default arguments
          + [44]DR 2351, void{}
          + [45]DR 2374, Overly permissive specification of enum
            direct-list-initialization
          + [46]DR 2397, auto specifier for pointers and references to
            arrays
          + [47]DR 2446, Questionable type-dependency of concept-ids
     * New command-line option -fimplicit-constexpr can be used to make
       inline functions implicitly constexpr ([48]git)
     * New command-line option -ffold-simple-inlines can be used to fold
       calls to certain trivial inline functions (currently std::move,
       std::forward, std::addressof and std::as_const). In contrast to
       inlining such calls, folding means that no intermediate code or
       debug information will be generated for them; this minimizes the
       abstraction penalty incurred for using these functions versus using
       the fundamental operations from which they're defined (e.g.
       std::move versus static_cast). This flag is enabled by default when
       -fno-inline is not active.
     * Deduction guides can be declared at class scope ([49]PR79501)
     * [50]-Wuninitialized warns about using uninitialized variables in
       member initializer lists ([51]PR19808)
     * [52]-Wint-in-bool-context is now disabled when instantiating a
       template ([53]git)
     * Stricter checking of attributes on friend declarations: if a friend
       declaration has an attribute, that declaration must be a
       definition. Moreover, a C++11 attribute cannot appear in the middle
       of the decl-specifier-seq. ([54]PR99032)
     * New warning options for C++ language mismatches:
       -Wc++11-extensions, -Wc++14-extensions, -Wc++17-extensions,
       -Wc++20-extensions, and -Wc++23-extensions. They are enabled by
       default and can be used to control existing pedwarns about
       occurrences of new C++ constructs in code using an old C++ standard
       dialect.
     * New warning [55]-Wmissing-requires warns about missing requires
       ([56]git)
     * The existing std::is_constant_evaluated in if warning was extended
       to warn in more cases ([57]PR100995)
     * [58]-Waddress has been enhanced so that it now warns about, for
       instance, comparing the address of a nonstatic member function to
       null ([59]PR102103)
     * Errors about narrowing are no longer hidden if they occur in system
       headers
     * Ordered comparison of null pointers is now rejected ([60]PR99701)
     * Anonymous structs with bases are now rejected ([61]git)
     * The compiler rejects taking the address of an immediate member
       function ([62]PR102753)
     * The compiler has support for C++20
       __cpp_lib_is_pointer_interconvertible and
       __cpp_lib_is_layout_compatible to help the C++ library implement
       [63]P0466, Layout-compatibility and Pointer-interconvertibility
       Traits ([64]PR101539)
     * Memory usage of constraint subsumption has been improved
       ([65]PR100828)
     * constinit thread_local variables are optimized better
       ([66]PR101786)
     * Support for C++17 std::hardware_destructive_interference_size was
       added, along with the [67]-Winterference-size warning ([68]git)
     * Many bugs in the CTAD handling have been fixed ([69]PR101344,
       [70]PR101883, [71]PR89062, [72]PR101233, [73]PR88252, [74]PR86439,
       [75]PR98832, [76]PR102933 ...)
     * Two-stage name lookup for dependent operator expressions has been
       corrected ([77]PR51577)
     * Several issues with constrained variable templates have been fixed
       ([78]PR98486)
     * The compiler performs less instantiating when doing speculative
       constant evaluation ([79]git)
     * Various diagnostic improvements; e.g., a more precise caret
       location for pointer-to-member expressions
     * The new -fconstexpr-fp-except flag allows IEC559 floating point
       exceptions in constant-expressions.

    Runtime Library (libstdc++)

     * Improved experimental C++20 support, including:
          + std::vector, std::basic_string, std::optional, and
            std::variant can be used in constexpr functions.
          + std::make_shared for arrays with default initialization, and
            std::atomic<std::shared_ptr<T>>.
          + Layout-compatibility and pointer-interconvertibility traits.
     * Improved experimental C++23 support, including:
          + Monadic operations for std::optional.
          + std::expected
          + std::move_only_function
          + <spanstream>
          + std::basic_string::resize_and_overwrite
          + std::unique_ptr can be used in constexpr functions.
          + <stacktrace> (not built by default, requires linking to an
            extra library).
          + <stdatomic.h>
          + std::invoke_r
          + constexpr std::type_info::operator==

  D

     * New features:
          + Support for the D programming language has been updated to
            version 2.100.1 of the language and run-time library. Full
            changelog for this release and previous releases can be found
            on the [80]dlang.org website.
          + On supported targets, the __traits(compiles) expression can
            now be used to determine whether a target-specific built-in is
            available without error during CTFE ([81]PR101127).
          + Functions annotated with pragma(inline, true) are now compiled
            into every module where they are used from ([82]PR106563).
          + Partial support for directly importing C99 sources into a D
            compilation ([83]ImportC) has been added to the language. A
            notable missing feature is support for preprocessing C
            imports, which can be worked around by preprocessing all C
            sources used for importing ahead of time.
     * New language options:
          + -fcheck=, enables or disables the code generation of specific
            run-time contract checks.
          + -fcheckaction=, controls the run-time behavior on an assert,
            array bounds check, or final switch contract failure. The
            default is -fcheckaction=throw.
          + -fdump-c++-spec=, dumps all compiled extern(C++) declarations
            as C++ code to the given file. The supplementary option
            -fdump-c++-spec-verbose turns on emission of comments for
            ignored declarations in the generated spec.
          + -fextern-std=, controls which C++ standard extern(C++)
            declarations are compiled to be compatible with. The default
            is -fextern-std=c++17.
          + -fpreview=, added to enable upcoming D language features in
            the compiler.
          + -frevert=, added to revert D language changes to support older
            D codebases that need more time to transition.
          + -fsave-mixins=, saves mixins expanded at compile-time to a
            file.
     * Deprecated and removed features:
          + The -Wtemplates compiler switch has been removed, as it had
            been superceded by -ftransition=templates, which more
            accurately reports on which templates have been instantiated.
          + The -ftransition=dip25 and -ftransition=dip1000 compiler
            switches have been renamed to -fpreview=dip25 and
            -fpreview=dip1000.

  Fortran

     * WG5/N1942, "TS 29113 Further Interoperability of Fortran with C",
       is now fully supported. In addition to implementing previously
       missing functionality, such as support for character arguments of
       length greater than one in functions marked bind(c) and gaps in the
       handling for assumed-rank arrays, numerous other bugs have been
       fixed, and an extensive set of new conformance test cases has been
       added.
     * GCC 12 now uses OPERATION as the name of the function to the
       CO_REDUCE intrinsic for the pairwise reduction, thus conforming to
       the Fortran 2018 standard. Previous versions used OPERATOR which
       conforms to TS 18508.
     * On POWER systems which support it, the -mabi=ieeelongdouble option
       now selects the IEEE 128-bit floating point format for
       REAL(KIND=16). R16_IBM and R16_IEEE have been added to the
       -fconvert option, the CONVERT specifier of the OPEN statement and
       the GFORTRAN_CONVERT_UNIT environment variable.

  Go

     * GCC 12 provides a complete implementation of the Go 1.18 user
       packages.
     * Although Go 1.18 includes support for generic programming, that
       support is not yet available in GCC.

libgccjit

     * The libgccjit API gained 30 new entry points:
          + 17 new "reflection" entry points for querying functions and
            types ([84]LIBGCCJIT_ABI_16)
          + [85]gcc_jit_lvalue_set_tls_model for supporting thread-local
            variables ([86]LIBGCCJIT_ABI_17)
          + [87]gcc_jit_lvalue_set_link_section for setting the link
            section of global variables, analogous to
            [88]__attribute__((section(".section")))
            ([89]LIBGCCJIT_ABI_18)
          + 4 new entry points for initializing global variables and
            creating constructors for rvalues ([90]LIBGCCJIT_ABI_19)
          + Support for sized integer types, including 128-bit integers
            and helper functions for such types ([91]LIBGCCJIT_ABI_20)
          + [92]gcc_jit_context_new_bitcast for reinterpreting the bits of
            an rvalue as a different type ([93]LIBGCCJIT_ABI_21)
          + [94]gcc_jit_lvalue_set_register_name for setting a specific
            register for a variable ([95]LIBGCCJIT_ABI_22)
          + [96]gcc_jit_context_set_bool_print_errors_to_stderr
            ([97]LIBGCCJIT_ABI_23)
          + 2 new entry points for setting the alignment of a variable
            ([98]LIBGCCJIT_ABI_24)
     * libgccjit has gained support for the use of various atomic builtins
       ([99]PR96066, [100]PR96067)
     * [101]gcc_jit_context_new_cast is now able to handle truncation and
       extension between different integer types ([102]PR95498)

New Targets and Target Specific Improvements

  AArch64 & arm

     * Newer revisions of the Arm Architecture are supported as arguments
       to the -march option: armv8.7-a, armv8.8-a, armv9-a.
     * The Arm Cortex-A510 CPU is now supported through the cortex-a510
       argument to the -mcpu and -mtune options.
     * GCC can now auto-vectorize operations performing sign-differing
       dot-product operations, taking advantage of instructions in the
       Advanced SIMD (AArch64/AArch32) and SVE (AArch64) instruction sets.

  AArch64

     * A number of new CPUs are supported through the -mcpu and -mtune
       options (GCC identifiers in parentheses).
          + Ampere-1 (ampere1).
          + Arm Cortex-A710 (cortex-a710).
          + Arm Cortex-X2 (cortex-x2).
     * The 64-byte atomic load/store intrinsics to accelerator memory from
       the [103]2020 Arm Architecture extensions are supported through the
       +ls64 option extension.
     * Initial code generation support is supported for hardware
       instructions used to accelerate the memcpy,memmove and memset
       standard functions. These instructions can be generated when
       compiling with the +mopsoption extension.
     * The ACLE Advanced SIMD intrinsics accessible through the arm_neon.h
       header have been significantly reimplemented and generate
       higher-performing code than previous GCC versions.
     * The option -mtune=neoverse-512tvb is added to tune for Arm Neoverse
       cores that have a total vector bandwidth of 512 bits. Please refer
       to the documentation for more details.

  AMD Radeon (GCN)

     * Debug experience with ROCGDB has been improved.
     * Support for the type __int128_t/integer(kind=16) was added.
     * For offloading, the limitation of using only one wavefront per
       compute unit (CU) has been lifted. Up to 40 workgroups per CU and
       16 wavefronts per workgroup are supported (up to a limit of 40
       wavefronts in total, per CU). Additionally, the number of used
       wavefronts and workgroups was tuned for performance.

  arm

     * Support is added for accessing the stack canary value via the TLS
       register through the -fstack-protector-guard=tls and
       -mstack-protector-guard-offset= options. This intended for use in
       Linux kernel development. Please refer to the documentation for
       more details.

  BPF

     * Support for CO-RE (compile-once, run-everywhere) has been added to
       the BPF backend. CO-RE allows to compile portable BPF programs that
       are able to run among different versions of the Linux kernel.

  IA-32/x86-64

     * New ISA extension support for Intel AVX512-FP16 was added.
       AVX512-FP16 intrinsics are available via the -mavx512fp16 compiler
       switch.
     * For both C and C++ the _Float16 type is supported on x86 systems
       with SSE2 enabled. Without {-mavx512fp16}, all operations will be
       emulated in software and float instructions.
     * Mitigation against straight line speculation (SLS) for function
       return and indirect jump is supported via
       -mharden-sls=[none|all|return|indirect-jmp].
     * Add CS prefix to call and jmp to indirect thunk with branch target
       in r8-r15 registers via -mindirect-branch-cs-prefix.
     * Always use global offset table (GOT) to access external data and
       function symbols when the new -mno-direct-extern-access
       command-line option is specified.

  LoongArch

     * Support for the LoongArch architecture instruction set has been
       added.
     * The Loongson CPU codename LA464 and LoongArch 64-bit generic CPU
       codename loongarch64 are supported through the -march= and -mtune=
       options (GCC identifiers in parentheses).
          + Loongson LA464 core (la464).
          + LoongArch 64-bit generic core (loongarch64).

  MIPS

     * The ABI passing arguments containing zero-width fields (for
       example, C/C++ zero-width bit-fields, GNU C/C++ zero-length arrays,
       and GNU C empty structs) has changed. Now a zero-width field will
       not prevent an aligned 64-bit floating-point field next to it from
       being passed through FPR. This is compatible with LLVM, but
       incompatible with previous GCC releases. GCC 12 on MIPS will report
       such incompatibilities as an inform unless -Wno-psabi is used.
     * The ABI returning values containing C++17 empty bases has changed.
       Now an empty base will not prevent an aggregate containing only one
       or two floating-point fields from being returned through FPR. This
       is compatible with GCC 6 and earlier, but incompatible with GCC 7
       through 11. GCC 12 on MIPS will report such incompatibilities as an
       inform unless -Wno-psabi is used.

  NVPTX

     * The -march flag has been added. The -misa flag is now considered an
       alias of the -march flag.
     * Support for PTX ISA target architectures sm_53, sm_70, sm_75 and
       sm_80 has been added. These can be specified using the -march flag.
     * The default PTX ISA target architecture has been set back to sm_30,
       to fix support for sm_30 boards.
     * The -march-map flag has been added. The -march-map value will be
       mapped to an valid -march flag value. For instance,
       -march-map=sm_50 maps to -march=sm_35. This can be used to specify
       that generated code is to be executed on a board with at least some
       specific compute capability, without having to know the valid
       values for the -march flag.
     * The -mptx flag has been added to specify the PTX ISA version for
       the generated code; permitted values are 3.1 (matches previous GCC
       versions), 6.0, 6.3, and 7.0. If not specified, the used version is
       the minimal version required for -march but at least 6.0.
     * An mptx-3.1 multilib was added. This allows using older drivers
       which do not support PTX ISA version 6.0.
     * The new __PTX_SM__ predefined macro allows code to check the PTX
       ISA target architecture being targeted by the compiler.
     * The new __PTX_ISA_VERSION_MAJOR__ and __PTX_ISA_VERSION_MINOR__
       predefined macros allows code to check the PTX ISA version being
       targeted by the compiler.

  PowerPC / PowerPC64 / RS6000

     * The internal implementation of Power's target-specific built-in
       functions has been rewritten to be easier and less error-prone to
       maintain. Every attempt has been made to ensure that the new
       behavior matches the old behavior, but inevitably some bugs can be
       expected. Please report any problems via [104]GCC Bugzilla.
     * The built-in functions __builtin_get_texasr, __builtin_get_texasru,
       __builtin_get_tfhar, __builtin_get_tfiar, __builtin_set_texasr,
       __builtin_set_texasru, __builtin_set_tfhar, and __builtin_set_tfiar
       now behave as documented in all supported configurations. On prior
       releases, the arguments and return values of these functions were
       treated as unsigned long long instead of as unsigned long, when the
       options -m32 -mpowerpc64 were in effect.
     * The overloaded built-in functions vec_cntlz_lsbb and vec_cnttz_lsbb
       now behave as documented. On prior releases, these built-in
       functions had incorrect semantics on little-endian targets.

  PRU

     * The [105]__regio_symbol variable qualifier has been added. It
       allows easier access in C programs to the __R30 and __R31 CPU I/O
       registers.

  RISC-V

     * Default ISA spec version was bump to 20191213, more detail see this
       [106]announcement
     * New ISA extension support for zba, zbb, zbc, zbs was added.
     * New ISA extension support for vector and scalar crypto was added,
       only support architecture testing marco and -march= parsing.
     * The option -mtune=thead-c906 is added to tune for T-HEAD c906
       cores.
     * libstdc++ no longer attempts to detect built-in atomics.
       Distributions that have out-of-tree workarounds for -latomic should
       check their ABIs again.

Operating Systems

Improvements to Static Analyzer

     * The analyzer has gained a
       [107]-Wanalyzer-use-of-uninitialized-value warning, similar to
       [108]-Wuninitialized and [109]-Wmaybe-uninitialized, but based on
       an interprocedural path-sensitive analysis ([110]PR95006).
       Such warnings are not disabled by the new
       [111]-ftrivial-auto-var-init (see below), as the latter is
       considered a mitigation option.
     * [112]-Wanalyzer-write-to-const and
       [113]-Wanalyzer-write-to-string-literal will now check for
       [114]__attribute__ ((access, ....)) on calls to externally-defined
       functions, and complain about read-only regions pointed to by
       arguments marked with a write_only or read_write attribute
       ([115]PR104793).
     * The analyzer's "taint" mode, activated by
       [116]-fanalyzer-checker=taint (in addition to [117]-fanalyzer), has
       gained four new taint-based warnings:
          + [118]-Wanalyzer-tainted-allocation-size for e.g.
            attacker-controlled malloc and alloca,
          + [119]-Wanalyzer-tainted-divisor for detecting where an
            attacker can inject a divide-by-zero,
          + [120]-Wanalyzer-tainted-offset for attacker-controlled pointer
            offsets,
          + [121]-Wanalyzer-tainted-size for attacker-controlled values
            being used as a size parameter to calls to memset or to
            functions marked with [122]__attribute__ ((access, ....)).
       The existing [123]-Wanalyzer-tainted-array-index has been reworded
       to talk about "attacker-controlled" rather than "tainted" values,
       for consistency with the new warnings.
       A new [124]__attribute__ ((tainted_args)) has been added to the C
       and C++ front ends, usable on functions, and on function pointer
       callback fields in structs. The analyzer's taint mode will treat
       all parameters and buffers pointed to by parameters of such
       functions as being attacker-controlled, such as for annotating
       system calls in an operating system kernel as being an "attack
       surface".
     * The analyzer now respects [125]__attribute__((const)): it will
       treat such functions as returning the same value when given the
       same inputs ([126]PR104434), and as having no side effects
       ([127]PR104576).
     * The analyzer is now able to split its analysis into multiple
       execution paths in places where there isn't a split in the control
       flow graph. For example, it now handles realloc calls by splitting
       the execution path into three possible outcomes for the call:
          + failure, returning NULL
          + success, growing the buffer in-place without moving it
          + success, allocating a new buffer, copying the content of the
            old buffer to it, and freeing the old buffer
     * The analyzer's interprocedural path exploration logic is now able
       to track calls through function pointers.
     * The analyzer now makes the assumption that if we know PTR is
       non-NULL, then (PTR + OFFSET) is also non-NULL. This isn't strictly
       true, but eliminates false positives in practice ([128]PR101962).
     * The analyzer has gained some initial support for inline assembler
       code. This is extremely limited, and is purely to help suppress
       false positives when analyzing the Linux kernel, which makes heavy
       use of inline assembler ([129]PR101570).
     * The way the analyzer tracks the state of memory along an execution
       path has been improved in various ways for GCC 12:
          + An optimization for representing bulk updates to memory (e.g.
            zero fills) has been removed as it never worked well. In GCC
            12 it has been replaced with a simpler and more accurate
            approach, eliminating many false positives ([130]PR95006).
          + Various optimizations have been added, speeding up the
            analysis on a particularly problematic source file from 4
            minutes down to 17 seconds ([131]PR104943, [132]PR104954, and
            [133]PR104955).
          + The analyzer now tracks the sizes of dynamically-allocated
            regions, both on the heap (via malloc etc) and stack (via
            alloca), though none of the analyzer warnings make use of this
            yet in GCC 12.
     * The analyzer's handling of switch statements has been rewritten,
       fixing various bugs.

Other significant improvements

  Eliminating uninitialized variables

     * GCC can now [134]initialize all stack variables implicitly,
       including padding. This is intended to eliminate all classes of
       uninitialized stack variable flaws. Lack of explicit initialization
       will still warn when [135]-Wuninitialized is active. For best
       debugging, use of the new command-line option
       [136]-ftrivial-auto-var-init=pattern can be used to fill variables
       with a repeated 0xFE pattern, which tends to illuminate many bugs
       (e.g. pointers receive invalid addresses, sizes and indices are
       very large). For best production results, the new command-line
       option [137]-ftrivial-auto-var-init=zero can be used to fill
       variables with 0x00, which tends to provide a safer state for bugs
       (e.g. pointers are NULL, strings are NUL filled, and sizes and
       indices are 0).

  Debugging formats

     * GCC can now generate debugging information in [138]CTF, a
       lightweight debugging format that provides information about C
       types and the association between functions and data symbols and
       types. This format is designed to be embedded in ELF files and to
       be very compact and simple. A new command-line option -gctf enables
       the generation of CTF.
     * GCC can now generate debugging information in BTF. This is a
       debugging format mainly used in BPF programs and the Linux kernel.
       The compiler can generate BTF for any target, when enabled with the
       command-line option -gbtf

GCC 12.1

   This is the [139]list of problem reports (PRs) from GCC's bug tracking
   system that are known to be fixed in the 12.1 release. This list might
   not be complete (that is, it is possible that some PRs that have been
   fixed are not listed here).

GCC 12.2

   This is the [140]list of problem reports (PRs) from GCC's bug tracking
   system that are known to be fixed in the 12.2 release. This list might
   not be complete (that is, it is possible that some PRs that have been
   fixed are not listed here).

  Target Specific Changes

    LoongArch

     * The default setting of -m[check|no-check]-zero-division is changed
       for optimized code. Now -mno-check-zero-division is the default for
       all optimization levels but -O0 and -Og. The old behavior can be
       obtained by explicitly passing -mcheck-zero-division to GCC.

GCC 12.3

   Note: GCC 12.3 has not been released yet, so this section is a
   work-in-progress.

  Target Specific Changes

  x86-64

     * GCC now supports AMD CPUs based on the znver4 core via
       -march=znver4. The switch makes GCC consider using 512 bit vectors
       when auto-vectorizing.

   This is the [141]list of problem reports (PRs) from GCC's bug tracking
   system that are known to be fixed in the 12.3 release. This list might
   not be complete (that is, it is possible that some PRs that have been
   fixed are not listed here).

