On May 3, the first public release of the ninth version of GCC took place: GCC 9.1.
It contains many significant improvements and additions compared to the eighth
version.
General changes
Options
- Commands that accept size now support 64-bit values ββand suffixes to specify size;
- Added option -flive-patching,to control optimizations that are potentially destructive to dynamic,code replacement;
- Added --completion option to support auto-completion in the command shell;
- Compiler diagnostics now include line numbers (-fno-diagnostics-show-line-numbers) and
type information (fno-diagnostics-show-labels); - Added option -fdiagnostics-format=json to output diagnostics in JSON format;
- Options for specifying alignment (-falign-functions, for example) can now accept a couple of alignment options;
- Added options for filtering the list of files (-fprofile-filter-files, -fprofile-exclude-files), which are instrumented by the profiler;
- AddressSanitizer now uses more compact alignment to catch invalid accesses to variables on the stack;
- Numerous output improvements -fopt-info;
- Added option -fsave-optimization-record to save the optimization report to a file;
- Added option -fipa-stack-alignment ΠΈ -fipa-reference-addressable.
New built-in features
New attribute
- copy.
Other
Numerous code generation improvements related to:
- generation of switch constructs;
- inter-procedural optimizations;
- optimization based on profiling information;
- optimization at the assembly stage (LTO);
Also gcov's internal format is now JSON, and the new option --use-hotness-colors involves coloring lines of code based on how often they are used.
Languages
Quality and completeness of implementation OpenACC the languages ββC, C++, and Fortran continue to improve.
C-like languages
- Partial support for OpenMP 5.0 has been implemented;
- Feature added __builtin_convertvector;
- Added warning -Waddress-of-packed-member;
- Improvements to a number of existing warnings;
- The error text when passing the wrong number of arguments to a macro now includes the declaration of the macro itself;
- Improvements to typo correction suggestions.
C
- Support _Static_assert with one argument for -std=c2x (future C standard);
- New warning -Wabsolute-value, which catches the wrong argument type for functions like abs().
C++
- New warnings: -Wdeprecated-copy,
-Winit-list-lifetime,
-Wredundant-move,
-Wpessimizing-move,
-Wclass-conversion; - Work is underway to implement new features from the future standard C++2a;
- The frontend now stores more accurate information about a number of source code elements, which allows you to display more detailed information in diagnostics;
- Improved diagnostics for overloaded functions, binary operators, function calls and format strings;
- Added automatic fixes supported by some development environments for a number of popular errors (missing parentheses, namespaces, typos, etc.).
libstdc ++
- The C++17 implementation is no longer experimental;
- Added parallel algorithms, , , A no longer requires -lstdc++fs;
- Improved experimental support for C++2a ( , , std::bind_front, etc.);
- Support for opening file streams on Windows whose paths contain non-char characters;
- Initial support on Windows;
- Initial support for Networking TS.
D
D language version 2.076 is included in GCC.
Fortran
- Full support for asynchronous I/O;
- Implemented BACK argument for MINLOC and MAXLOC;
- Implemented FINDLOC and IS_CONTIGOUS functions;
- The syntax for accessing the components of complex numbers has been implemented: c%re and c%im;
- Implemented syntax str%len and a%kind;
- Implemented C descriptors and ISO_Fortran_binding.h header;
- Relaxed requirements for the result of the MAX and MIN functions when one of the arguments is NaN;
- Added option -fdec-include;
- Directive added BUILTIN.
libgccjit
- Feature added gcc_jit_context_add_driver_option.
Other
Many architecture- and OS-specific changes.
Source: linux.org.ru