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-9/index.html
                              GCC 9 Release Series

   Aug 12, 2019

   The [1]GNU project and the GCC developers are pleased to announce the
   release of GCC 9.2.

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

Release History

   GCC 9.2
          Aug 12, 2019 ([2]changes, [3]documentation)

   GCC 9.1
          May 3, 2019 ([4]changes, [5]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 [6]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 [7]amazing group of volunteers is
   what makes GCC successful.

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

   To obtain GCC please use [10]our mirror sites or [11]our SVN server.


    For questions related to the use of GCC, please consult these web
    pages and the [12]GCC manuals. If that fails, the
    [13]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 [14]gcc@gcc.gnu.org. All of [15]our lists have public
    archives.

   Copyright (C) [16]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 [17]maintained by the GCC team. Last modified
   2019-08-12[18].

References

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

   This page is a "brief" summary of some of the huge number of
   improvements in GCC 9.

Caveats

     * On Arm targets (arm*-*-*), [1]a bug in the implementation of the
       procedure call standard (AAPCS) in the GCC 6, 7 and 8 releases has
       been fixed: a structure containing a bit-field based on a 64-bit
       integral type and where no other element in a structure required
       64-bit alignment could be passed incorrectly to functions. This is
       an ABI change. If the option -Wpsabi is enabled (on by default) the
       compiler will emit a diagnostic note for code that might be
       affected.
     * Support for a number of older systems and recently unmaintained or
       untested target ports of GCC has been declared obsolete in GCC 9.
       Unless there is activity to revive them, the next release of GCC
       will have their sources permanently removed.
       The following ports for individual systems on particular
       architectures have been obsoleted:
          + Solaris 10 (*-*-solaris2.10). Details can be found in the
            [2]announcement.
          + Cell Broadband Engine SPU (spu*-*-*). Details can be found in
            the [3]announcement.
     * A change to the C++ std::rotate algorithm in GCC 9.1.0 can cause
       ABI incompatibilities with object files compiled with other
       versions of GCC. If the std::rotate algorithm is called with an
       empty range then it might cause a divide-by-zero error (as a SIGFPE
       signal) and crash. The change has been reverted for GCC 9.2.0 and
       future releases. For more details see [4]Bug 90920. The problem can
       be avoided by recompiling any objects that might call std::rotate
       with an empty range, so that the GCC 9.1.0 definition of
       std::rotate is not used.
     * The automatic template instantiation at link time ([5]-frepo) has
       been deprecated and will be removed in a future release.

General Improvements

   The following GCC command line options have been introduced or
   improved.
     * All command line options that take a byte-size argument accept
       64-bit integers as well as standard SI and IEC suffixes such as kb
       and KiB, MB and MiB, or GB and GiB denoting the corresponding
       multiples of bytes. See [6]Invoking GCC for more.
     * A new option, [7]-flive-patching=[inline-only-static|inline-clone],
       has been introduced to provide a safe compilation for
       live-patching. At the same time, provides multiple-level control on
       the enabled IPA optimizations. See the user guide for more details
       about the option.
     * A new option, --completion, has been added to provide more fine
       option completion in a shell. It is intended to be used by
       Bash-completion.
     * GCC's diagnostics now print source code with a left margin showing
       line numbers, configurable with
       [8]-fno-diagnostics-show-line-numbers.
       GCC's diagnostics can also now label regions of the source code to
       show pertinent information, such as the types within an expression.
$ g++ t.cc
t.cc: In function 'int test(const shape&, const shape&)':
t.cc:15:4: error: no match for 'operator+' (operand types are 'boxed_value<doubl
e>' and 'boxed_value<double>')
   14 |   return (width(s1) * height(s1)
      |           ~~~~~~~~~~~~~~~~~~~~~~
      |                     |
      |                     boxed_value<[...]>
   15 |    + width(s2) * height(s2));
      |    ^ ~~~~~~~~~~~~~~~~~~~~~~
      |                |
      |                boxed_value<[...]>

       These labels can be disabled via [9]-fno-diagnostics-show-labels.
     * A new option [10]-fdiagnostics-format=json has been introduced for
       emitting diagnostics in a machine-readable format.
     * The alignment-related options [11]-falign-functions,
       [12]-falign-labels, [13]-falign-loops, and [14]-falign-jumps
       received support for a secondary alignment (e.g.
       -falign-loops=n:m:n2:m2).
     * New pair of profiling options ([15]-fprofile-filter-files and
       [16]-fprofile-exclude-files) has been added. The options help to
       filter which source files are instrumented.
     * AddressSanitizer generates more compact redzones for automatic
       variables. That helps to reduce memory footprint of a sanitized
       binary.
     * Numerous improvements have been made to the output of
       [17]-fopt-info.
       Messages are now prefixed with optimized, missed, or note, rather
       than the old behavior of all being prefixed with note.
       The output from -fopt-info can now contain information on inlining
       decisions:
$ g++ -c inline.cc -O2 -fopt-info-inline-all
inline.cc:24:11: note: Considering inline candidate void foreach(T, T, void (*)(
E)) [with T = char**; E = char*]/2.
inline.cc:24:11: optimized:  Inlining void foreach(T, T, void (*)(E)) [with T =
char**; E = char*]/2 into int main(int, char**)/1.
inline.cc:19:12: missed:   not inlinable: void inline_me(char*)/0 -> int std::pu
ts(const char*)/3, function body not available
inline.cc:13:8: optimized:  Inlined void inline_me(char*)/4 into int main(int, c
har**)/1 which now has time 127.363637 and size 11, net change of +0.
Unit growth for small function inlining: 16->16 (0%)

Inlined 2 calls, eliminated 1 functions


       The output from the vectorizer has been rationalized so that failed
       attempts to vectorize a loop are displayed in the form
    [LOOP-LOCATION]: couldn't vectorize this loop
    [PROBLEM-LOCATION]: because of [REASON]

       rather than an exhaustive log of all decisions made by the
       vectorizer. For example:
$ gcc -c v.c -O3 -fopt-info-all-vec
v.c:7:3: missed: couldn't vectorize loop
v.c:10:7: missed: statement clobbers memory: __asm__ __volatile__("" :  :  : "me
mory");
v.c:3:6: note: vectorized 0 loops in function.
v.c:10:7: missed: statement clobbers memory: __asm__ __volatile__("" :  :  : "me
mory");

       The old behavior can be obtained via a new -internals suboption of
       -fopt-info.
     * A new option, [18]-fsave-optimization-record has been added, which
       writes a SRCFILE.opt-record.json.gz file describing the
       optimization decisions made by GCC. This is similar to the output
       of -fopt-info, but with additional metadata such as the inlining
       chain, and profile information (if available).
     * Inter-procedural propagation of stack alignment can now be
       controlled by [19]-fipa-stack-alignment.
     * Propagation of addressability, readonly and writeonly flags on
       static variables can now be controlled by
       [20]-fipa-reference-addressable.

   The following built-in functions have been introduced.
     * [21]__builtin_expect_with_probability to provide branch prediction
       probability hints to the optimizer.
     * [22]__builtin_has_attribute determines whether a function, type, or
       variable has been declared with some attribute.
     * [23]__builtin_speculation_safe_value can be used to help mitigate
       against unsafe speculative execution.

   The following attributes have been introduced.
     * The [24]copy function attribute has been added. The attribute can
       also be applied to type definitions and to variable declarations.

   A large number of improvements to code generation have been made,
   including but not limited to the following.
     * Switch expansion has been improved by using a different strategy
       (jump table, bit test, decision tree) for a subset of switch cases.
     * A linear function expression defined as a switch statement can be
       transformed by [25]-ftree-switch-conversion. For example:

int
foo (int how)
{
  switch (how) {
    case 2: how = 205; break;
    case 3: how = 305; break;
    case 4: how = 405; break;
    case 5: how = 505; break;
    case 6: how = 605; break;
  }
  return how;
}

       can be transformed into 100 * how + 5 (for values defined in the
       switch statement).
     * Inter-procedural optimization improvements:
          + Inliner defaults was tuned to better suits modern C++
            codebases especially when built with link time optimizations.
            New parameters max-inline-insns-small, max-inline-insns-size,
            uninlined-function-insns, uninlined-function-time,
            uninlined-thunk-insns, and uninlined-thunk-time were added.
          + Hot/cold partitioning is now more precise and aggressive.
          + Improved scalability for very large translation units
            (especially when link-time optimizing large programs).
     * Profile driven optimization improvements:
          + [26]-fprofile-use now enables [27]-fversion-loops-for-strides,
            [28]-floop-interchange, [29]-floop-unroll-and-jam,
            [30]-ftree-loop-distribution.
          + Streaming of counter histograms was removed. This reduces the
            size of profile files. Histogram is computed on the fly with
            link-time optimization. Parameter hot-bb-count-ws-permille was
            reduced from 999 to 990 to account for more precise
            histograms.
     * Link-time optimization improvements:
          + Types are now simplified prior streaming resulting in
            significant reductions of the LTO object files, link-time
            memory use, and improvements of link-time parallelism.
          + Default number of partitions (--param lto-partitions) was
            increased from 32 to 128 enabling effective use of CPUs with
            more than 32 hyperthreads. --param
            lto-max-streaming-parallelism can now be used to control
            number of streaming processes.
          + Warnings on C++ One Decl Rule violations (-Wodr) are now more
            informative and produce fewer redundant results.
       Overall compile time of Firefox 66 and LibreOffice 6.2.3 on an
       8-core machine was reduced by about 5% compared to GCC 8.3, and the
       size of LTO object files by 7%. LTO link-time improves by 11% on an
       8-core machine and scales significantly better for more parallel
       build environments. The serial stage of the link-time optimization
       is 28% faster consuming 20% less memory. The parallel stage now
       scales to up to 128 partitions rather than 32 and reduces memory
       use for every worker by 30%.

   The following improvements to the gcov command-line utility have been
   made.
     * The gcov tool received a new option [31]--use-hotness-colors (-q)
       that can provide perf-like coloring of hot functions.
     * The gcov tool has changed its intermediate format to a new JSON
       format.

New Languages and Language specific improvements

   [32]OpenACC support in C, C++, and Fortran continues to be maintained
   and improved. Most of the OpenACC 2.5 specification is implemented. See
   the [33]implementation status section on the OpenACC wiki page for
   further information.

  C family

     * Version 5.0 of the [34]OpenMP specification is now partially
       supported in the C and C++ compilers. For details which features of
       OpenMP 5.0 are and which are not supported in the GCC 9 release see
       [35]this mail.
     * New extensions:
          + [36]__builtin_convertvector built-in for vector conversions
            has been added.
     * New warnings:
          + [37]-Waddress-of-packed-member, enabled by default, warns
            about an unaligned pointer value from the address of a packed
            member of a struct or union.
     * Enhancements to existing warnings:
          + [38]-Warray-bounds detects more instances of out-of-bounds
            indices.
          + [39]-Wattribute-alias also detects attribute mismatches
            between alias declarations and their targets, in addition to
            mismatches between their types.
          + [40]-Wformat-overflow and [41]-Wformat-truncation have been
            extended to all formatted input/output functions (where
            applicable) and enhanced to detect a subset of instances of
            reading past the end of unterminated constant character arrays
            in %s directives.
          + [42]-Wmissing-attributes detects instances of missing function
            attributes on declarations of aliases and weak references.
          + [43]-Wstringop-truncation also detects a subset of instances
            of reading past the end of unterminated constant character
            arrays,
     * If a macro is used with the wrong argument count, the C and C++
       front ends now show the definition of that macro via a note.
     * The spelling corrector now considers transposed letters, and the
       threshold for similarity has been tightened, to avoid nonsensical
       suggestions.

  C

     * There is now experimental support for -std=c2x, to select support
       for the upcoming C2X revision of the ISO C standard. This standard
       is in the early stages of development and the only feature
       supported in GCC 9 is _Static_assert with a single argument
       (support for _Static_assert with two arguments was added in C11 and
       GCC 4.6). There are also new options -std=gnu2x, for C2X with GNU
       extensions, and -Wc11-c2x-compat, to warn for uses of features
       added in C2X (such warnings are also enabled by use of -Wpedantic
       if not using -std=c2x or -std=gnu2x).
     * New warnings:
          + [44]-Wabsolute-value warns for calls to standard functions
            that compute the absolute value of an argument when a more
            appropriate standard function is available. For example,
            calling abs(3.14) triggers the warning because the appropriate
            function to call to compute the absolute value of a double
            argument is fabs. The option also triggers warnings when the
            argument in a call to such a function has an unsigned type.
            This warning can be suppressed with an explicit type cast and
            it is also enabled by -Wextra.

  C++

     * New warnings:
          + [45]-Wdeprecated-copy, implied by -Wextra, warns about the
            C++11 deprecation of implicitly declared copy constructor and
            assignment operator if one of them is user-provided.
            -Wdeprecated-copy-dtor also warns if the destructor is
            user-provided, as specified in C++11.
          + [46]-Winit-list-lifetime, on by default, warns about uses of
            std::initializer_list that are likely to result in a dangling
            pointer, such as returning or assigning from a temporary list.
          + [47]-Wredundant-move, implied by -Wextra, warns about
            redundant calls to std::move.
          + [48]-Wpessimizing-move, implied by -Wall, warns when a call to
            std::move prevents copy elision.
          + [49]-Wclass-conversion, on by default, warns when a conversion
            function will never be called due to the type it converts to.
     * The C++ front end has experimental support for some of the upcoming
       C++2a draft features with the -std=c++2a or -std=gnu++2a flags,
       including range-based for statements with initializer, default
       constructible and assignable stateless lambdas, lambdas in
       unevaluated contexts, language support for empty data members,
       allowing pack expansion in lambda init-capture, likely and unlikely
       attributes, class types in non-type template parameters, allowing
       virtual function calls in constant expressions, explicit(bool),
       std::is_constant_evaluated, nested inline namespaces, etc. For a
       full list of new features, see [50]the C++ status page.
     * The C++ front end now preserves source locations for literals,
       id-expression, and mem-initializer for longer. For example it is
       now able to pin-point the pertinent locations for bad
       initializations such as these
$ g++ -c bad-inits.cc
bad-inits.cc:10:14: error: cannot convert 'json' to 'int' in initialization
   10 |   { 3, json::object },
      |        ~~~~~~^~~~~~
      |              |
      |              json
bad-inits.cc:14:31: error: initializer-string for array of chars is too long [-f
permissive]
   14 | char buffers[3][5] = { "red", "green", "blue" };
      |                               ^~~~~~~
bad-inits.cc: In constructor 'X::X()':
bad-inits.cc:17:13: error: invalid conversion from 'int' to 'void*' [-fpermissiv
e]
   17 |   X() : one(42), two(42), three(42)
      |             ^~
      |             |
      |             int

       rather than emitting the error at the final closing parenthesis or
       brace.
     * Error-reporting of overload resolution has been special-cased to
       make the case of a single failed candidate easier to read. For
       example:
$ g++ param-type-mismatch.cc
param-type-mismatch.cc: In function 'int test(int, const char*, float)':
param-type-mismatch.cc:8:32: error: cannot convert 'const char*' to 'const char*
*'
    8 |   return foo::member_1 (first, second, third);
      |                                ^~~~~~
      |                                |
      |                                const char*
param-type-mismatch.cc:3:46: note:   initializing argument 2 of 'static int foo:
:member_1(int, const char**, float)'
    3 |   static int member_1 (int one, const char **two, float three);
      |                                 ~~~~~~~~~~~~~^~~

       highlights both the problematic argument, and the parameter that it
       can't be converted to.
     * Diagnostics involving binary operators now use color to distinguish
       the two operands, and label them separately (as per the example of
       source labelling above).
     * Diagnostics involving function calls now highlight the pertinent
       parameter of the declaration in more places.
$ g++ bad-conversion.cc
bad-conversion.cc: In function 'void caller()':
bad-conversion.cc:9:14: error: cannot convert 'bool' to 'void*'
    9 |   callee (0, false, 2);
      |              ^~~~~
      |              |
      |              bool
bad-conversion.cc:3:19: note:   initializing argument 2 of 'void callee(int, voi
d*, int)'
    3 | void callee (int, void *, int)
      |                   ^~~~~~

     * The C++ front end's implementation of [51]-Wformat now shows
       precise locations within string literals, and underlines the
       pertinent arguments at bogus call sites (the C front end has been
       doing this since GCC 7). For example:
$ g++ -c bad-printf.cc -Wall
bad-printf.cc: In function 'void print_field(const char*, float, long int, long
int)':
bad-printf.cc:6:17: warning: field width specifier '*' expects argument of type
'int', but argument 3 has type 'long int' [-Wformat=]
    6 |   printf ("%s: %*ld ", fieldname, column - width, value);
      |                ~^~~               ~~~~~~~~~~~~~~
      |                 |                        |
      |                 int                      long int
bad-printf.cc:6:19: warning: format '%ld' expects argument of type 'long int', b
ut argument 4 has type 'double' [-Wformat=]
    6 |   printf ("%s: %*ld ", fieldname, column - width, value);
      |                ~~~^                               ~~~~~
      |                   |                               |
      |                   long int                        double
      |                %*f

     * The C++ front end has gained new fix-it hints for forgetting the
       return *this; needed by various C++ operators:
$ g++ -c operator.cc
operator.cc: In member function 'boxed_ptr& boxed_ptr::operator=(const boxed_ptr
&)':
operator.cc:7:3: warning: no return statement in function returning non-void [-W
return-type]
    6 |     m_ptr = other.m_ptr;
  +++ |+    return *this;
    7 |   }
      |   ^

       for when the compiler needs a typename:
$ g++ -c template.cc
template.cc:3:3: error: need 'typename' before 'Traits::type' because 'Traits' i
s a dependent scope
    3 |   Traits::type type;
      |   ^~~~~~
      |   typename

       when trying to use an accessor member as if it were a data member:
$ g++ -c fncall.cc
fncall.cc: In function 'void hangman(const mystring&)':
fncall.cc:12:11: error: invalid use of member function 'int mystring::get_length
() const' (did you forget the '()' ?)
   12 |   if (str.get_length > 0)
      |       ~~~~^~~~~~~~~~
      |                     ()

       for C++11's scoped enums:
$ g++ -c enums.cc
enums.cc: In function 'void json::test(const json::value&)':
enums.cc:12:26: error: 'STRING' was not declared in this scope; did you mean 'js
on::kind::STRING'?
   12 |     if (v.get_kind () == STRING)
      |                          ^~~~~~
      |                          json::kind::STRING
enums.cc:3:44: note: 'json::kind::STRING' declared here
    3 |   enum class kind { OBJECT, ARRAY, NUMBER, STRING, TRUE, FALSE, NULL_ };
      |                                            ^~~~~~

       and a tweak to integrate the suggestions about misspelled members
       with that for accessors:
$ g++ -c accessor-fixit.cc
accessor-fixit.cc: In function 'int test(t*)':
accessor-fixit.cc:17:15: error: 'class t' has no member named 'ratio'; did you m
ean 'int t::m_ratio'? (accessible via 'int t::get_ratio() const')
   17 |   return ptr->ratio;
      |               ^~~~~
      |               get_ratio()

       In addition, various diagnostics in the C++ front-end have been
       streamlined by consolidating the suggestion into the initial error,
       rather than emitting a follow-up note:
$ g++ typo.cc
typo.cc:5:13: error: 'BUFSIZE' was not declared in this scope; did you mean 'BUF
_SIZE'?
    5 | uint8_t buf[BUFSIZE];
      |             ^~~~~~~
      |             BUF_SIZE

    Runtime Library (libstdc++)

     * Improved support for C++17, including:
          + The C++17 implementation is no longer experimental.
          + Parallel algorithms and <execution> (requires [52]Thread
            Building Blocks 2018 or newer).
          + <memory_resource>.
          + Using the types and functions in <filesystem> does not require
            linking with -lstdc++fs now.
     * Improved experimental support for C++2a, including:
          + Type traits std::remove_cvref, std::unwrap_reference,
            std::unwrap_decay_ref, std::is_nothrow_convertible, and
            std::type_identity.
          + Headers <bit> and <version>.
          + Uniform container erasure (std::erase_if).
          + contains member of maps and sets.
          + String prefix and suffix checking (starts_with, ends_with).
          + Functions std::midpoint and std::lerp for interpolation.
          + std::bind_front.
          + std::visit<R>.
          + std::assume_aligned.
          + Uses-allocator construction utilities.
          + std::pmr::polymorphic_allocator<std::byte>.
          + Library support for char8_t type.
          + Destroying delete.
          + std::is_constant_evaluated() function.
     * Support for opening file streams with wide character paths on
       Windows
     * Incomplete support for the C++17 Filesystem library and the
       Filesystem TS on Windows.
     * Incomplete, experimental support for the Networking TS.

  D

     * Support for the D programming language has been added to GCC,
       implementing version 2.076 of the language and run-time library.

  Fortran

     * Asynchronous I/O is now fully supported. The program needs to be
       linked against the pthreads library to use it, otherwise the I/O is
       done synchronously. For systems which do not support POSIX
       condition variables, such as AIX, all I/O is still done
       synchronously.
     * The BACK argument for MINLOC and MAXLOC has been implemented.
     * The FINDLOC intrinsic function has been implemented.
     * The IS_CONTIGUOUS intrinsic function has been implemented.
     * Direct access to the real and imaginary parts of a complex variable
       via c%re and c%im has been implemented.
     * Type parameter inquiry via str%len and a%kind has been implemented.
     * C descriptors and the ISO_Fortran_binding.h source file have been
       implemented.
     * The MAX and MIN intrinsics are no longer guaranteed to return any
       particular value in case one of the arguments is a NaN. Note that
       this conforms to the Fortran standard and to what other Fortran
       compilers do. If there is a need to handle that case in some
       specific way, one needs to explicitly check for NaN's before
       calling MAX or MIN, e.g. by using the IEEE_IS_NAN function from the
       intrinsic module IEEE_ARITHMETIC.
     * A new command-line option [53]-fdec-include, set also by the
       [54]-fdec option, has been added to increase compatibility with
       legacy code. With this option, an INCLUDE directive is also parsed
       as a statement, which allows the directive to be spread across
       multiple source lines with line continuations.
     * A new [55]BUILTIN directive, has been added. The purpose of the
       directive is to provide an API between the GCC compiler and the GNU
       C Library which would define vector implementations of math
       routines.

libgccjit

     * The libgccjit API gained a new entry point:
       [56]gcc_jit_context_add_driver_option.

New Targets and Target Specific Improvements

  AArch64 & Arm

     * Support has been added for the following processors (GCC
       identifiers in parentheses):
          + Arm Cortex-A76 (cortex-a76).
          + Arm Cortex-A55/Cortex-A76 DynamIQ big.LITTLE
            (cortex-a76.cortex-a55).
          + Arm Neoverse N1 (neoverse-n1).
       The GCC identifiers can be used as arguments to the -mcpu or -mtune
       options, for example: -mcpu=cortex-a76 or
       -mtune=cortex-a76.cortex-a55 or as arguments to the equivalent
       target attributes and pragmas.
     * The Armv8.3-A complex number instructions are now supported via
       intrinsics when the option -march=armv8.3-a or equivalent is
       specified. For the half-precision floating-point variants of these
       instructions use the architecture extension flag +fp16, e.g.
       -march=armv8.3-a+fp16.
       The intrinsics are defined by the ACLE specification.
     * The Armv8.5-A architecture is now supported through the
       -march=armv8.5-a option.
     * The Armv8.5-A architecture also adds some security features that
       are optional to all older architecture versions. These are now
       supported and only affect the assembler.
          + Speculation Barrier instruction through the -march=armv8-a+sb
            option.
          + Execution and Data Prediction Restriction instructions through
            the -march=armv8-a+predres option.
          + Speculative Store Bypass Safe instruction through the
            -march=armv8-a+ssbs option. This does not require a compiler
            option for Arm and thus -march=armv8-a+ssbs is an
            AArch64-specific option.

      AArch64 specific

     * Support has been added for the Arm Neoverse E1 processor
       (-mcpu=neoverse-e1).
     * The AArch64 port now has support for stack clash protection using
       the [57]-fstack-clash-protection option. The probing interval/guard
       size can be set by using --param
       stack-clash-protection-guard-size=12|16. The value of this
       parameter must be in bytes represented as a power of two. The two
       supported values for this parameter are 12 (for a 4KiB size, 2^12)
       and 16 (for a 64KiB size, 2^16). The default value is 16 (64Kb) and
       can be changed at configure time using the flag
       --with-stack-clash-protection-guard-size=12|16.
     * The option -msign-return-address= has been deprecated. This has
       been replaced by the new -mbranch-protection= option. This new
       option can now be used to enable the return address signing as well
       as the new Branch Target Identification feature of Armv8.5-A
       architecture. For more information on the arguments accepted by
       this option, please refer to [58]AArch64-Options.
     * The following optional extensions to Armv8.5-A architecture are now
       supported and only affect the assembler.
          + Random Number Generation instructions through the
            -march=armv8.5-a+rng option.
          + Memory Tagging Extension through the -march=armv8.5-a+memtag
            option.

      Arm specific

     * Support for the deprecated Armv2 and Armv3 architectures and their
       variants has been removed. Their corresponding -march values and
       the -mcpu options that used these architectures have been removed.
     * Support for the Armv5 and Armv5E architectures (which have no known
       implementations) has been removed. Note that Armv5T, Armv5TE and
       Armv5TEJ architectures remain supported.
     * Corrected FPU configurations for Cortex-R7 and Cortex-R8 when using
       their respective -mcpu options.

  AMD GCN

     * A new back end targeting AMD GCN GPUs has been contributed to GCC.
       The implementation is currently limited to compiling
       single-threaded, stand-alone programs. Future versions will add
       support for offloading multi-threaded kernels via OpenMP and
       OpenACC. The following devices are supported (GCC identifiers in
       parentheses):
          + Fiji (fiji).
          + Vega 10 (gfx900).

  ARC

     * LRA is now on by default for the ARC target. This can be controlled
       by -mlra.
     * Add support for frame code-density and branch-and-index
       instructions.

  C-SKY

     * A new back end targeting C-SKY V2 processors has been contributed
       to GCC.

  IA-32/x86-64

     * Support of Intel MPX (Memory Protection Extensions) has been
       removed.

  OpenRISC

     * A new back end targeting OpenRISC processors has been contributed
       to GCC.

  S/390, System z, IBM z Systems

     * Support for the arch13 architecture has been added. When using the
       -march=arch13 option, the compiler will generate code making use of
       the new instructions introduced with the vector enhancement
       facility 2 and the miscellaneous instruction extension facility 2.
       The -mtune=arch13 option enables arch13 specific instruction
       scheduling without making use of new instructions.
     * Builtins for the new vector instructions have been added and can be
       enabled using the -mzvector option.
     * Support for ESA architecture machines g5 and g6 is deprecated since
       GCC 6.1.0 and has been removed now.
     * When compiling with -march=z14 or higher GCC emits alignments hints
       on the vector load/store instructions (8 or 16 byte).
     * Functions now have a default alignment of 16 bytes. This helps with
       branch prediction effects.
     * -mfentry is now supported. As well as the mcount mechanism the
       __fentry__ is called before the function prologue. However, since
       just a single instruction is required to call __fentry__ the call
       sequence imposes a smaller overhead than mcount (4 instructions).
       The produced code is compatible only with newer glibc versions,
       which provide the __fentry__ symbol and do not clobber r0 when
       resolving lazily bound functions. -mfentry is only supported when
       generating 64 bit code and does not work with nested C functions.
     * The -mnop-mcount option can be used to emit NOP instructions
       instead of an mcount or fentry call stub.
     * With the -mrecord-mcount option a __mcount_loc section is generated
       containing pointers to each profiling call stub. This is useful for
       automatically patching in and out calls.

Operating Systems

  Solaris

     * g++ now unconditionally enables large file support when compiling
       32-bit code.
     * Support for the AddressSanitizer and UndefinedBehaviorSanitizer has
       been merged from LLVM. For the moment, this only works for 32-bit
       code on both SPARC and x86.
     * An initial port of the D runtime library has been completed on
       Solaris 11/x86. It requires the use of GNU as. Solaris 11/SPARC
       support is still work-in-progress.

  Windows

     * A C++ Microsoft ABI bitfield layout bug, [59]PR87137 has been
       fixed. A non-field declaration could cause the current bitfield
       allocation unit to be completed, incorrectly placing a following
       bitfield into a new allocation unit. The Microsoft ABI is selected
       for:
          + Mingw targets
          + PowerPC, IA-32 or x86-64 targets when the -mms-bitfields
            option is specified, or __attribute__((ms_struct)) is used
          + SuperH targets when the -mhitachi option is specified, or
            __attribute__((renesas)) is used

Improvements for plugin authors

     * GCC's diagnostic subsystem now has a way to logically group
       together related diagnostics, auto_diagnostic_group. Such
       diagnostics will be nested by the output of
       [60]-fdiagnostics-format=json.
     * GCC now has a set of [61]user experience guidelines for GCC, with
       information and advice on implementing new diagnostics.

Other significant improvements

     * GCC's internal "selftest" suite now runs for C++ as well as C (in
       debug builds of the compiler).

GCC 9.1

   This is the [62]list of problem reports (PRs) from GCC's bug tracking
   system that are known to be fixed in the 9.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 9.2

   This is the [63]list of problem reports (PRs) from GCC's bug tracking
   system that are known to be fixed in the 9.2 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 [64]GCC manuals. If that fails, the
    [65]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 [66]gcc@gcc.gnu.org. All of [67]our lists have public
    archives.

   Copyright (C) [68]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 [69]maintained by the GCC team. Last modified
   2019-08-12[70].

References

   1. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88469
   2. https://gcc.gnu.org/ml/gcc/2018-10/msg00139.html
   3. https://gcc.gnu.org/ml/gcc/2019-04/msg00023.html
   4. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90920
   5. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-frepo
   6. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Invoking-GCC.html#Invoking-GCC
   7. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-flive-patching
   8. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fno-diagnostics-show-line-numbers
   9. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fno-diagnostics-show-labels
  10. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format
  11. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-falign-functions
  12. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-falign-labels
  13. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-falign-loops
  14. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-falign-jumps
  15. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Instrumentation-Options.html#index-fprofile-filter-files
  16. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Instrumentation-Options.html#index-fprofile-exclude-files
  17. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Developer-Options.html#index-fopt-info
  18. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Developer-Options.html#index-fsave-optimization-record
  19. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-fipa-stack-alignment
  20. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-fipa-reference-addressable
  21. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fexpect_005fwith_005fprobability
  22. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fhas_005fattribute-1
  23. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fspeculation_005fsafe_005fvalue-1
  24. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Common-Function-Attributes.html#index-copy-function-attribute
  25. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-ftree-switch-conversion
  26. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-fprofile-use
  27. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-fversion-loops-for-strides
  28. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-floop-interchange
  29. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-floop-unroll-and-jam
  30. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-ftree-loop-distribution
  31. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Invoking-Gcov.html#Invoking-Gcov
  32. https://www.openacc.org/
  33. https://gcc.gnu.org/wiki/OpenACC#status-9
  34. https://www.openmp.org/specifications/
  35. https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00628.html
  36. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Vector-Extensions.html#index-_005f_005fbuiltin_005fconvertvector
  37. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Waddress-of-packed-member
  38. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Warray-bounds
  39. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wattribute-alias
  40. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wformat-overflow
  41. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wformat-truncation
  42. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wmissing-attributes
  43. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wstringop-truncation
  44. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wabsolute-value
  45. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wdeprecated-copy
  46. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Winit-list-lifetime
  47. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wredundant-move
  48. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wpessimizing-move
  49. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wclass-conversion
  50. http://gcc.gnu.org/projects/cxx-status.html#cxx2a
  51. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wformat
  52. https://www.threadingbuildingblocks.org/
  53. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gfortran/Fortran-Dialect-Options.html#index-fdec-include
  54. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gfortran/Fortran-Dialect-Options.html#index-fdec
  55. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gfortran/BUILTIN-directive.html#BUILTIN-directive
  56. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/jit/topics/contexts.html#gcc_jit_context_add_driver_option
  57. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Instrumentation-Options.html#index-fstack-protector
  58. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/AArch64-Options.html#AArch64-Options
  59. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87137
  60. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format
  61. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gccint/User-Experience-Guidelines.html
  62. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=9.0
  63. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=9.2
  64. https://gcc.gnu.org/onlinedocs/
  65. mailto:gcc-help@gcc.gnu.org
  66. mailto:gcc@gcc.gnu.org
  67. https://gcc.gnu.org/lists.html
  68. https://www.fsf.org/
  69. https://gcc.gnu.org/about.html
  70. http://validator.w3.org/check/referer
======================================================================
http://gcc.gnu.org/gcc-8/index.html
                              GCC 8 Release Series

   Feb 22, 2019

   The [1]GNU project and the GCC developers are pleased to announce the
   release of GCC 8.3.

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

Release History

   GCC 8.3
          Feb 22, 2019 ([2]changes, [3]documentation)

   GCC 8.2
          Jul 14, 2018 ([4]changes, [5]documentation)

   GCC 8.1
          May 2, 2018 ([6]changes, [7]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 [8]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 [9]amazing group of volunteers is
   what makes GCC successful.

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

   To obtain GCC please use [12]our mirror sites or [13]our SVN server.


    For questions related to the use of GCC, please consult these web
    pages and the [14]GCC manuals. If that fails, the
    [15]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 [16]gcc@gcc.gnu.org. All of [17]our lists have public
    archives.

   Copyright (C) [18]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 [19]maintained by the GCC team. Last modified
   2019-02-22[20].

References

   1. http://www.gnu.org/
   2. http://gcc.gnu.org/gcc-8/changes.html
   3. http://gcc.gnu.org/onlinedocs/8.3.0/
   4. http://gcc.gnu.org/gcc-8/changes.html
   5. http://gcc.gnu.org/onlinedocs/8.2.0/
   6. http://gcc.gnu.org/gcc-8/changes.html
   7. http://gcc.gnu.org/onlinedocs/8.1.0/
   8. http://gcc.gnu.org/gcc-8/buildstat.html
   9. http://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Contributors.html
  10. http://gcc.gnu.org/index.html
  11. mailto:gcc@gcc.gnu.org
  12. http://gcc.gnu.org/mirrors.html
  13. http://gcc.gnu.org/svn.html
  14. https://gcc.gnu.org/onlinedocs/
  15. mailto:gcc-help@gcc.gnu.org
  16. mailto:gcc@gcc.gnu.org
  17. https://gcc.gnu.org/lists.html
  18. https://www.fsf.org/
  19. https://gcc.gnu.org/about.html
  20. http://validator.w3.org/check/referer
======================================================================
http://gcc.gnu.org/gcc-8/changes.html
                              GCC 8 Release Series
                        Changes, New Features, and Fixes

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

Caveats

     * Support for the obsolete SDB/coff debug info format has been
       removed. The option -gcoff no longer does anything.
     * The Cilk+ extensions to the C and C++ languages have been removed.
     * The MPX extensions to the C and C++ languages have been deprecated
       and will be removed in a future release.
     * The extension allowing arithmetic on std::atomic<void*> and types
       like std::atomic<R(*)()> has been deprecated.
     * The non-standard C++0x std::copy_exception function was removed.
       std::make_exception_ptr should be used instead.
     * Support for the powerpc*-*-*spe* target ports which have been
       recently unmaintained and untested in GCC has been declared
       obsolete in GCC 8 as announced [3]here. Unless there is activity to
       revive them, the next release of GCC will have their sources
       permanently removed.

General Improvements

     * Inter-procedural optimization improvements:
          + Reworked run-time estimation metrics leading to more realistic
            guesses driving inliner and cloning heuristics.
          + The ipa-pure-const pass is extended to propagate the malloc
            attribute, and the corresponding warning option
            -Wsuggest-attribute=malloc emits a diagnostic for functions
            which can be annotated with the malloc attribute.
     * Profile driven optimization improvements:
          + New infrastructure for representing profiles (both statically
            guessed and profile feedback) which allows propagation of
            additional information about the reliability of the profile.
          + A number of improvements in the profile updating code solving
            problems found by new verification code.
          + Static detection of code which is not executed in a valid run
            of the program. This includes paths which trigger undefined
            behavior as well as calls to functions declared with the cold
            attribute. Newly the noreturn attribute does not imply all
            effects of cold to differentiate between exit (which is
            noreturn) and abort (which is in addition not executed in
            valid runs).
          + -freorder-blocks-and-partition, a pass splitting function
            bodies into hot and cold regions, is now enabled by default at
            -O2 and higher for x86 and x86-64.
     * Link-time optimization improvements:
          + We have significantly improved debug information on ELF
            targets using DWARF by properly preserving language-specific
            information. This allows for example the libstdc++
            pretty-printers to work with LTO optimized executables.
     * A new option -fcf-protection=[full|branch|return|none] is
       introduced to perform code instrumentation to increase program
       security by checking that target addresses of control-flow transfer
       instructions (such as indirect function call, function return,
       indirect jump) are valid. Currently the instrumentation is
       supported on x86 GNU/Linux targets only. See the user guide for
       further information about the option syntax and section "New
       Targets and Target Specific Improvements" for IA-32/x86-64 for more
       details.
     * The -gcolumn-info option is now enabled by default. It includes
       column information in addition to just filenames and line numbers
       in DWARF debugging information.
     * The polyhedral-based loop nest optimization pass
       -floop-nest-optimize has been overhauled. It's still considered
       experimental and may not result in any runtime improvements.
     * Two new classical loop nest optimization passes have been added.
       -floop-unroll-and-jam performs outer loop unrolling and fusing of
       the inner loop copies. -floop-interchange exchanges loops in a loop
       nest to improve data locality. Both passes are enabled by default
       at -O3 and above.
     * The classic loop nest optimization pass -ftree-loop-distribution
       has been improved and enabled by default at -O3 and above. It
       supports loop nest distribution in some restricted scenarios; it
       also supports cancellable innermost loop distribution with loop
       versioning under run-time alias checks.
     * The new option -fstack-clash-protection causes the compiler to
       insert probes whenever stack space is allocated statically or
       dynamically to reliably detect stack overflows and thus mitigate
       the attack vector that relies on jumping over a stack guard page as
       provided by the operating system.
     * A new pragma GCC unroll has been implemented in the C family of
       languages, as well as Fortran and Ada, so as to make it possible
       for the user to have a finer-grained control over the loop
       unrolling optimization.
     * GCC has been enhanced to detect more instances of meaningless or
       mutually exclusive attribute specifications and handle such
       conflicts more consistently. Mutually exclusive attribute
       specifications are ignored with a warning regardless of whether
       they appear on the same declaration or on distinct declarations of
       the same entity. For example, because the noreturn attribute on the
       second declaration below is mutually exclusive with the malloc
       attribute on the first, it is ignored and a warning is issued.
>
      void* __attribute__ ((malloc)) f (unsigned);
      void* __attribute__ ((noreturn)) f (unsigned);

      warning: ignoring attribute 'noreturn' because it conflicts with attribute
 'malloc' [-Wattributes]
     * The gcov tool can distinguish functions that begin on a same line
       in a source file. This can be a different template instantiation or
       a class constructor:

File 'ins.C'
Lines executed:100.00% of 8
Creating 'ins.C.gcov'

        -:    0:Source:ins.C
        -:    0:Graph:ins.gcno
        -:    0:Data:ins.gcda
        -:    0:Runs:1
        -:    0:Programs:1
        -:    1:template<class T>
        -:    2:class Foo
        -:    3:{
        -:    4: public:
        2:    5:   Foo(): b (1000) {}
------------------
Foo<char>::Foo():
        1:    5:   Foo(): b (1000) {}
------------------
Foo<int>::Foo():
        1:    5:   Foo(): b (1000) {}
------------------
        2:    6:   void inc () { b++; }
------------------
Foo<char>::inc():
        1:    6:   void inc () { b++; }
------------------
Foo<int>::inc():
        1:    6:   void inc () { b++; }
------------------
        -:    7:
        -:    8:  private:
        -:    9:   int b;
        -:   10:};
        -:   11:
        1:   12:int main(int argc, char **argv)
        -:   13:{
        1:   14:  Foo<int> a;
        1:   15:  Foo<char> b;
        -:   16:
        1:   17:  a.inc ();
        1:   18:  b.inc ();
        1:   19:}

     * The gcov tool has more accurate numbers for execution of lines in a
       source file.
     * The gcov tool can use TERM colors to provide more readable output.
     * AddressSanitizer gained a new pair of sanitization options,
       -fsanitize=pointer-compare and -fsanitize=pointer-subtract, which
       warn about subtraction (or comparison) of pointers that point to a
       different memory object:

int
main ()
{
  /* Heap allocated memory.  */
  char *heap1 = (char *)__builtin_malloc (42);
  char *heap2 = (char *)__builtin_malloc (42);
  if (heap1 > heap2)
      return 1;

  return 0;
}

==17465==ERROR: AddressSanitizer: invalid-pointer-pair: 0x604000000010 0x6040000
00050
    #0 0x40070f in main /tmp/pointer-compare.c:7
    #1 0x7ffff6a72a86 in __libc_start_main (/lib64/libc.so.6+0x21a86)
    #2 0x400629 in _start (/tmp/a.out+0x400629)

0x604000000010 is located 0 bytes inside of 42-byte region [0x604000000010,0x604
00000003a)
allocated by thread T0 here:
    #0 0x7ffff6efb390 in __interceptor_malloc ../../../../libsanitizer/asan/asan
_malloc_linux.cc:86
    #1 0x4006ea in main /tmp/pointer-compare.c:5
    #2 0x7ffff6a72a86 in __libc_start_main (/lib64/libc.so.6+0x21a86)

0x604000000050 is located 0 bytes inside of 42-byte region [0x604000000050,0x604
00000007a)
allocated by thread T0 here:
    #0 0x7ffff6efb390 in __interceptor_malloc ../../../../libsanitizer/asan/asan
_malloc_linux.cc:86
    #1 0x4006f8 in main /tmp/pointer-compare.c:6
    #2 0x7ffff6a72a86 in __libc_start_main (/lib64/libc.so.6+0x21a86)

SUMMARY: AddressSanitizer: invalid-pointer-pair /tmp/pointer-compare.c:7 in main

     * The store merging pass has been enhanced to handle bit-fields and
       not just constant stores, but also data copying from adjacent
       memory locations into other adjacent memory locations, including
       bitwise logical operations on the data. The pass can also handle
       byte swapping into memory locations.
     * The undefined behavior sanitizer gained two new options included in
       -fsanitize=undefined: -fsanitize=builtin which diagnoses at run
       time invalid arguments to __builtin_clz or __builtin_ctz prefixed
       builtins, and -fsanitize=pointer-overflow which performs cheap run
       time tests for pointer wrapping.
     * A new attribute no_sanitize can be applied to functions to instruct
       the compiler not to do sanitization of the options provided as
       arguments to the attribute. Acceptable values for no_sanitize match
       those acceptable by the -fsanitize command-line option.

void __attribute__ ((no_sanitize ("alignment", "object-size")))
f () { /* Do something. */; }

New Languages and Language specific improvements

  Ada

     * For its internal exception handling used on the host for error
       recovery in the front-end, the compiler now relies on the native
       exception handling mechanism of the host platform, which should be
       more efficient than the former mechanism.

  BRIG (HSAIL)

   In this release cycle, the focus for the BRIGFE was on stabilization
   and performance improvements. Also a couple of completely new features
   were added.
     * Improved support for function and module scope group segment
       variables. PRM specs define function and module scope group segment
       variables as an experimental feature. However, PRM test suite uses
       them. Now group segment is handled by separate book keeping of
       module scope and function (kernel) offsets. Each function has a
       "frame" in the group segment offset to which is given as an
       argument, similar to traditional call stack frame handling.
     * Reduce the number of type conversions due to the untyped HSAIL
       registers. Instead of always representing the HSAIL's untyped
       registers as unsigned int, the gccbrig now pre-analyzes the BRIG
       code and builds the register variables as a type used the most when
       storing or reading data to/from each register. This reduces the
       number of total casts which cannot be always optimized away.
     * Support for BRIG_KIND_NONE directives.
     * Made -O3 the default optimization level for BRIGFE.
     * Fixed illegal addresses generated from address expressions which
       refer only to offset 0.
     * Fixed a bug with reg+offset addressing on 32b segments. In 'large'
       mode, the offset is treated as 32bits unless it's in global,
       read-only or kernarg address space.
     * Fixed a crash caused sometimes by calls with more than 4 arguments.
     * Fixed a mis-execution issue with kernels that have both unexpanded
       ID functions and calls to subfunctions.
     * Treat HSAIL barrier builtins as setjmp/longjump style functions to
       avoid illegal optimizations.
     * Ensure per WI copies of private variables are aligned correctly.
     * libhsail-rt: Assume the host runtime allocates the work group
       memory.

  C family

     * New command-line options have been added for the C and C++
       compilers:
          + [4]-Wmultistatement-macros warns about unsafe macros expanding
            to multiple statements used as a body of a statement such as
            if, else, while, switch, or for.
          + [5]-Wstringop-truncation warns for calls to bounded string
            manipulation functions such as strncat, strncpy, and stpncpy
            that might either truncate the copied string or leave the
            destination unchanged. For example, the following call to
            strncat is diagnosed because it appends just three of the four
            characters from the source string.
void append (char *buf, size_t bufsize)
{
    strncat (buf, ".txt", 3);
}
warning: 'strncat' output truncated copying 3 bytes from a string of length 4 [-
Wstringop-truncation]
            Similarly, in the following example, the call to strncpy
            specifies the size of the destination buffer as the bound. If
            the length of the source string is equal to or greater than
            this size the result of the copy will not be NUL-terminated.
            Therefore, the call is also diagnosed. To avoid the warning,
            specify sizeof buf - 1 as the bound and set the last element
            of the buffer to NUL.
void copy (const char *s)
{
    char buf[80];
    strncpy (buf, s, sizeof buf);
    …
}
warning: 'strncpy' specified bound 80 equals destination size [-Wstringop-trunca
tion]
            The -Wstringop-truncation option is included in -Wall.
            Note that due to GCC bug [6]82944, defining strncat, strncpy,
            or stpncpy as a macro in a system header as some
            implementations do, suppresses the warning.
          + [7]-Wif-not-aligned controls warnings issued in response to
            invalid uses of objects declared with attribute
            [8]warn_if_not_aligned.
            The -Wif-not-aligned option is included in -Wall.
          + [9]-Wmissing-attributes warns when a declaration of a function
            is missing one or more attributes that a related function is
            declared with and whose absence may adversely affect the
            correctness or efficiency of generated code. For example, in
            C++, the warning is issued when an explicit specialization of
            a primary template declared with attribute alloc_align,
            alloc_size, assume_aligned, format, format_arg, malloc, or
            nonnull is declared without it. Attributes deprecated, error,
            and warning suppress the warning.
            The -Wmissing-attributes option is included in -Wall.
          + [10]-Wpacked-not-aligned warns when a struct or union declared
            with attribute packed defines a member with an explicitly
            specified alignment greater than 1. Such a member will wind up
            under-aligned. For example, a warning will be issued for the
            definition of struct A in the following:
struct __attribute__ ((aligned (8)))
S8 { char a[8]; };

struct __attribute__ ((packed)) A
{
    struct S8 s8;
};
warning: alignment 1 of 'struct S' is less than 8 [-Wpacked-not-aligned]
            The -Wpacked-not-aligned option is included in -Wall.
          + -Wcast-function-type warns when a function pointer is cast to
            an incompatible function pointer. This warning is enabled by
            -Wextra.
          + -Wsizeof-pointer-div warns for suspicious divisions of the
            size of a pointer by the size of the elements it points to,
            which looks like the usual way to compute the array size but
            won't work out correctly with pointers. This warning is
            enabled by -Wall.
          + -Wcast-align=strict warns whenever a pointer is cast such that
            the required alignment of the target is increased. For
            example, warn if a char * is cast to an int * regardless of
            the target machine.
          + -fprofile-abs-path creates absolute path names in the .gcno
            files. This allows gcov to find the correct sources in
            projects where compilations occur with different working
            directories.
     * -fno-strict-overflow is now mapped to -fwrapv -fwrapv-pointer and
       signed integer overflow is now undefined by default at all
       optimization levels. Using -fsanitize=signed-integer-overflow is
       now the preferred way to audit code, -Wstrict-overflow is
       deprecated.
     * The [11]-Warray-bounds option has been improved to detect more
       instances of out-of-bounds array indices and pointer offsets. For
       example, negative or excessive indices into flexible array members
       and string literals are detected.
     * The [12]-Wrestrict option introduced in GCC 7 has been enhanced to
       detect many more instances of overlapping accesses to objects via
       restrict-qualified arguments to standard memory and string
       manipulation functions such as memcpy and strcpy. For example, the
       strcpy call in the function below attempts to truncate the string
       by replacing its initial characters with the last four. However,
       because the function writes the terminating NUL into a[4], the
       copies overlap and the call is diagnosed.
void f (void)
{
    char a[] = "abcd1234";
    strcpy (a, a + 4);
    …
}
warning: 'strcpy' accessing 5 bytes at offsets 0 and 4 overlaps 1 byte at offset
 4 [-Wrestrict]
       The -Wrestrict option is included in -Wall.
     * Several optimizer enhancements have enabled improvements to the
       [13]-Wformat-overflow and [14]-Wformat-truncation options. The
       warnings detect more instances of buffer overflow and truncation
       than in GCC 7 and are better at avoiding certain kinds of false
       positives.
     * When reporting mismatching argument types at a function call, the C
       and C++ compilers now underline both the argument and the pertinent
       parameter in the declaration.
$ gcc arg-type-mismatch.cc
arg-type-mismatch.cc: In function 'int caller(int, int, float)':
arg-type-mismatch.cc:5:24: error: invalid conversion from 'int' to 'const char*'
 [-fpermissive]
   return callee(first, second, third);
                        ^~~~~~
arg-type-mismatch.cc:1:40: note:   initializing argument 2 of 'int callee(int, c
onst char*, float)'
 extern int callee(int one, const char *two, float three);
                            ~~~~~~~~~~~~^~~

     * When reporting on unrecognized identifiers, the C and C++ compilers
       will now emit fix-it hints suggesting #include directives for
       various headers in the C and C++ standard libraries.
$ gcc incomplete.c
incomplete.c: In function 'test':
incomplete.c:3:10: error: 'NULL' undeclared (first use in this function)
   return NULL;
          ^~~~
incomplete.c:3:10: note: 'NULL' is defined in header '<stddef.h>'; did you forge
t to '#include <stddef.h>'?
incomplete.c:1:1:
+#include <stddef.h>
 const char *test(void)
incomplete.c:3:10:
   return NULL;
          ^~~~
incomplete.c:3:10: note: each undeclared identifier is reported only once for ea
ch function it appears in

$ gcc incomplete.cc
incomplete.cc:1:6: error: 'string' in namespace 'std' does not name a type
 std::string s("hello world");
      ^~~~~~
incomplete.cc:1:1: note: 'std::string' is defined in header '<string>'; did you
forget to '#include <string>'?
+#include <string>
 std::string s("hello world");
 ^~~

     * The C and C++ compilers now use more intuitive locations when
       reporting on missing semicolons, and offer fix-it hints:
$ gcc t.c
t.c: In function 'test':
t.c:3:12: error: expected ';' before '}' token
   return 42
            ^
            ;
 }
 ~

     * When reporting on missing '}' and ')' tokens, the C and C++
       compilers will now highlight the corresponding '{' and '(' token,
       issuing a 'note' if it's on a separate line:
$ gcc unclosed.c
unclosed.c: In function 'log_when_out_of_range':
unclosed.c:12:50: error: expected ')' before '{' token
       && (temperature < MIN || temperature > MAX) {
                                                  ^~
                                                  )
unclosed.c:11:6: note: to match this '('
   if (logging_enabled && check_range ()
      ^

       or highlighting it directly if it's on the same line:
$ gcc unclosed-2.c
unclosed-2.c: In function 'test':
unclosed-2.c:8:45: error: expected ')' before '{' token
   if (temperature < MIN || temperature > MAX {
      ~                                      ^~
                                             )

       They will also emit fix-it hints.

  C++

     * GCC 8 (-fabi-version=12) has a couple of corrections to the calling
       convention, which changes the ABI for some uncommon code:
          + Passing an empty class as an argument now takes up no space on
            x86_64, as required by the psABI.
          + Passing or returning a class with only deleted copy and move
            constructors now uses the same calling convention as a class
            with a non-trivial copy or move constructor. This only affects
            C++17 mode, as in earlier standards passing or returning such
            a class was impossible.
          + WARNING: In GCC 8.1 the second change mistakenly also affects
            classes with a deleted copy constructor and defaulted trivial
            move constructor (bug [15]c++/86094). This issue is fixed in
            GCC 8.2 (-fabi-version=13).
       You can test whether these changes affect your code with -Wabi=11
       (or -Wabi=12 in GCC 8.2 for the third issue); if these changes are
       problematic for your project, the GCC 7 ABI can be selected with
       -fabi-version=11.
     * The value of the C++11 alignof operator has been corrected to match
       C _Alignof (minimum alignment) rather than GNU __alignof__
       (preferred alignment); on ia32 targets this means that
       alignof(double) is now 4 rather than 8. Code that wants the
       preferred alignment should use __alignof__ instead.
     * New command-line options have been added for the C++ compiler to
       control warnings:
          + [16]-Wclass-memaccess warns when objects of non-trivial class
            types are manipulated in potentially unsafe ways by raw memory
            functions such as memcpy, or realloc. The warning helps detect
            calls that bypass user-defined constructors or copy-assignment
            operators, corrupt virtual table pointers, data members of
            const-qualified types or references, or member pointers. The
            warning also detects calls that would bypass access controls
            to data members. For example, a call such as:
        memcpy (&std::cout, &std::cerr, sizeof std::cout);
            results in
        warning: 'void* memcpy(void*, const void*, long unsigned int)' writing t
o an object of type 'std::ostream' {aka 'class std::basic_ostream<char>'} with n
o trivial copy-assignment [-Wclass-memaccess]
            The -Wclass-memaccess option is included in -Wall.
     * The C++ front end has experimental support for some of the upcoming
       C++2a draft features with the -std=c++2a or -std=gnu++2a flags,
       including designated initializers, default member initializers for
       bit-fields, __VA_OPT__ (except that #__VA_OPT__ is unsupported),
       lambda [=, this] captures, etc. For a full list of new features,
       see [17]the C++ status page.
     * When reporting on attempts to access private fields of a class or
       struct, the C++ compiler will now offer fix-it hints showing how to
       use an accessor function to get at the field in question, if one
       exists.
$ gcc accessor.cc
accessor.cc: In function 'void test(foo*)':
accessor.cc:12:12: error: 'double foo::m_ratio' is private within this context
   if (ptr->m_ratio >= 0.5)
            ^~~~~~~
accessor.cc:7:10: note: declared private here
   double m_ratio;
          ^~~~~~~
accessor.cc:12:12: note: field 'double foo::m_ratio' can be accessed via 'double
 foo::get_ratio() const'
   if (ptr->m_ratio >= 0.5)
            ^~~~~~~
            get_ratio()

     * The C++ compiler can now give you a hint if you use a macro before
       it was defined (e.g. if you mess up the order of your #include
       directives):
$ gcc ordering.cc
ordering.cc:2:24: error: expected ';' at end of member declaration
   virtual void clone() const OVERRIDE { }
                        ^~~~~
                             ;
ordering.cc:2:30: error: 'OVERRIDE' does not name a type
   virtual void clone() const OVERRIDE { }
                              ^~~~~~~~
ordering.cc:2:30: note: the macro 'OVERRIDE' had not yet been defined
In file included from ordering.cc:5:
c++11-compat.h:2: note: it was later defined here
 #define OVERRIDE override


     * The -Wold-style-cast diagnostic can now emit fix-it hints telling
       you when you can use a static_cast, const_cast, or
       reinterpret_cast.
$ gcc -c old-style-cast-fixits.cc -Wold-style-cast
old-style-cast-fixits.cc: In function 'void test(void*)':
old-style-cast-fixits.cc:5:19: warning: use of old-style cast to 'struct foo*' [
-Wold-style-cast]
   foo *f = (foo *)ptr;
                   ^~~
            ----------
            static_cast<foo *> (ptr)

     * When reporting on problems within extern "C" linkage
       specifications, the C++ compiler will now display the location of
       the start of the extern "C".
$ gcc -c extern-c.cc
extern-c.cc:3:1: error: template with C linkage
 template <typename T> void test (void);
 ^~~~~~~~
