This page is a brief summary of some of the huge number of improvements in GCC 7.For more information, see thePorting to GCC 7 page and thefull GCC documentation.
has_trivial_default_constructor,has_trivial_copy_constructor andhas_trivial_copy_assign have been removed.arm*-*-*),a bug introduced in GCC 5 that affects conformance to the procedure call standard (AAPCS) has been fixed. The bug affects some C++ code where class objects are passed by value to functions and could result in incorrect or inconsistent code being generated. 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.sprintf family of functions and make it available to other optimization passes. Some calls to thesnprintf function with a zero size argument can be folded into constants. This optimization is included in-O1 and can be selectively controlled by the-fprintf-return-value option.-fstore-merging option and at the-O2 optimization level or higher (and-Os).-fcode-hoisting option and at the-O2 optimization level or higher (and-Os).-fipa-bit-cp option if-fipa-cp is enabled as well, and is enabled at the-O2 optimization level and higher (and-Os). This optimization supersedes interprocedural alignment propagation of GCC 6, and therefore the option-fipa-cp-alignment is now deprecated and ignored.-fipa-vrp option and at the-O2 optimization level and higher (and-Os).-fsplit-loops option and at the-O3 optimization level or higher.-fshrink-wrap-separate option, enabled by default. It requires target support, which is currently only implemented in the PowerPC and AArch64 ports.-fsanitize-address-use-after-scope, which enables sanitization of variables whose address is taken and used after a scope where the variable is defined:intmain (int argc, char **argv){ char *ptr; { char my_char; ptr = &my_char; } *ptr = 123; return *ptr;}==28882==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fffb8dba990 at pc 0x0000004006d5 bp 0x7fffb8dba960 sp 0x7fffb8dba958WRITE of size 1 at 0x7fffb8dba990 thread T0 #0 0x4006d4 in main /tmp/use-after-scope-1.c:10 #1 0x7f9c71943290 in __libc_start_main (/lib64/libc.so.6+0x20290) #2 0x400739 in _start (/tmp/a.out+0x400739)Address 0x7fffb8dba990 is located in stack of thread T0 at offset 32 in frame #0 0x40067f in main /tmp/use-after-scope-1.c:3 This frame has 1 object(s): [32, 33) 'my_char'<== Memory access at offset 32 is inside this variable The option is enabled by default with-fsanitize=address and disabled by default with-fsanitize=kernel-address. Compared to the LLVM compiler, where the option already exists, the implementation in the GCC compiler has some improvements and advantages:-fsanitize=signed-integer-overflow suboption of the UndefinedBehavior Sanitizer now diagnoses arithmetic overflows even on arithmetic operations with generic vectors.-gdwarf-5 option. The DWARF version 4 debugging information remains the default until consumers of debugging information are adjusted.Support for processing BRIG 1.0 files was added in this release.BRIG is a binary format for HSAIL (Heterogeneous System ArchitectureIntermediate Language). The BRIG front end can be used for implementingHSAIL "finalizers" (compilation of HSAIL to a native ISA) for GCC-supportedtargets. An implementation of an HSAIL runtime library, libhsail-rt isalso included.
-Wimplicit-fallthrough warns when a switch case falls through. This warning has five different levels. The compiler isable to parse a wide range of fallthrough comments, depending onthe level. It also handles control-flow statements, such as ifs.It's possible to suppress the warning by either adding a fallthroughcomment, or by using a null statement:__attribute__((fallthrough)); (C, C++), or[[fallthrough]]; (C++17), or[[gnu::fallthrough]]; (C++11/C++14). This warning is enabled by-Wextra.-Wpointer-compare warns when a pointer is compared with a zero character constant. Such code is now invalid in C++11 andGCC rejects it. This warning is enabled by default.-Wduplicated-branches warns when an if-else has identical branches.-Wrestrict warns when an argument passed to arestrict-qualified parameter aliases with anotherargument.-Wmemset-elt-size warns formemset calls, when the first argument references an array, and the third argument isa number equal to the number of elements of the array, but not the sizeof the array. This warning is enabled by-Wall.-Wint-in-bool-context warns about suspicious uses of integer values where boolean values are expected. This warning isenabled by-Wall.-Wswitch-unreachable warns when aswitchstatement has statements between the controlling expression and thefirst case label which will never be executed. This warning is enabledby default.-Wexpansion-to-defined warns whendefined is used outside#if. This warning is enabled by-Wextra or-Wpedantic.-Wregister warns about uses of theregister storage specifier. In C++17 this keyword has been removed and for C++17this is a pedantic warning enabled by default. The warning is notemitted for the GNU Explicit Register Variables extension.-Wvla-larger-than=N warns about unbounded uses of variable-length arrays, and about bounded uses of variable-lengtharrays whose bound can be larger thanN bytes.-Wduplicate-decl-specifier warns when a declaration has duplicateconst,volatile,restrict or_Atomic specifier. This warningis enabled by-Wall.GCC 7 greatly expands the scope of these suggestions. Firstly, it adds fix-it hints to such suggestions:spellcheck-fields.cc:52:13:error:'struct s' has no member named'colour'; did you mean'color'? return ptr->colour;^~~~~~
The suggestions now cover many other things, such as misspelled function names:spellcheck-fields.cc:52:13:error:'struct s' has no member named'colour'; did you mean'color'? return ptr->colour;^~~~~~color
misspelled macro names and enum values:spellcheck-identifiers.c:11:3:warning: implicit declaration of function'gtk_widget_showall'; did you mean'gtk_widget_show_all'? [-Wimplicit-function-declaration]gtk_widget_showall (w);^~~~~~~~~~~~~~~~~~gtk_widget_show_all
misspelled type names:spellcheck-identifiers.cc:85:11:error:'MAX_ITEM' undeclared here (not in a function); did you mean'MAX_ITEMS'? int array[MAX_ITEM];^~~~~~~~MAX_ITEMS
and, in the C front end, named initializers:spellcheck-typenames.c:7:14:error: unknown type name'singed'; did you mean'signed'? void test (singed char e);^~~~~~signed
test.c:7:20:error:'struct s' has no member named'colour'; did you mean'color'? struct s test = { .colour = 3 };^~~~~~color
test.c:5:2:error:invalid preprocessing directive #endfi; did you mean #endif? #endfi^~~~~endif
test.c:51:29:warning: format'%s' expects argument of type'char *', but argument 3 has type'int' [-Wformat=] printf ("foo: %d bar:%s baz: %d", 100,i + j, 102);~^~~~~~%d
-Wdangling-else command-line option has been splitout of-Wparentheses and warns about danglingelse.The-Wshadow warning has been split into threevariants.-Wshadow=global warns for any shadowing. Thisis the default when using-Wshadow without anyargument.-Wshadow=local only warns for a local variableshadowing another local variable orparameter.-Wshadow=compatible-local only warns for alocal variable shadowing another local variable or parameter whosetype is compatible (in C++ compatible means that the type of theshadowing variable can be converted to that of the shadowed variable).
The following example shows the different kinds of shadowwarnings:
enum operation { add, count };struct container { int nr; };intcontainer_count (struct container c, int count){ int r = 0; for (int count = 0; count > 0; count--) { struct container count = c; r += count.nr; } return r;}-Wshadow=compatible-local will warn for the parameter beingshadowed with the same type:
warn-test.c:8:12:warning: declaration of 'count' shadows a parameter [-Wshadow=compatible-local] for (intcount = 0; count > 0; count--)^~~~~warn-test.c:5:42:note: shadowed declaration is here container_count (struct container c, intcount)^~~~~
-Wshadow=local will warn for the above and for the shadoweddeclaration with incompatible type:
warn-test.c:10:24:warning: declaration of 'count' shadows a previous local [-Wshadow=local] struct containercount = c;^~~~~warn-test.c:8:12:note: shadowed declaration is here for (intcount = 0; count > 0; count--)^~~~~
-Wshadow=global will warn for all of the above and the shadowingof the global declaration:
warn-test.c:5:42:warning: declaration of 'count' shadows a global declaration [-Wshadow] container_count (struct container c, intcount)^~~~~warn-test.c:1:23:note: shadowed declaration is here enum operation { add,count };^~~~~
The-Walloc-size-larger-than=size optiondetects calls to standard and user-defined memory allocationfunctions decorated with attributealloc_size whoseargument exceeds the specifiedsize(PTRDIFF_MAX by default). The option also detectsarithmetic overflow in the computation of the size in two-argumentallocation functions likecalloc where the total sizeis the product of the two arguments. Since calls with an excessivesize cannot succeed they are typically the result of programmingerrors. Such bugs have been known to be the source ofsecurity vulnerabilities and a target of exploits.-Walloc-size-larger-than=PTRDIFF_MAX is included in-Wall.
For example, the following call tomalloc incorrectlytries to avoid passing a negative argument to the function andinstead ends up unconditionally invoking it with an argument lessthan or equal to zero. Since after conversion to the type ofthe argument of the function (size_t) a negativeargument results in a value in excess of the maximumPTRDIFF_MAX the call is diagnosed.
void* f (int n){ return malloc (n > 0 ? 0 : n);}warning:argument 1 range [2147483648, 4294967295] exceeds maximum object size 2147483647 [-Walloc-size-larger-than=]-Walloc-zero option detects calls to standard and user-defined memory allocation functions decorated with attributealloc_size with a zero argument.-Walloc-zero is not included in either-Wall or-Wextra and must be explicitly enabled.-Walloca option detects all calls to thealloca function in the program.-Walloca is not included in either-Wall or-Wextra and must be explicitly enabled.The-Walloca-larger-than=size option detectscalls to thealloca function whose argument either mayexceed the specifiedsize, or that is not knownto be sufficiently constrained to avoid exceeding it.-Walloca-larger-than is not included in either-Wall or-Wextra and must be explicitlyenabled.
For example, compiling the following snippet with-Walloca-larger-than=1024 results in a warning becauseeven though the code appears to callalloca only withsizes of 1kb and less, sincen is signed, a negativevalue would result in a call to the function well in excess ofthe limit.
void f (int n){ char *d; if (n < 1025) d = alloca (n); else d = malloc (n); …}warning:argument to 'alloca may be too large due to conversion from 'int' to 'long unsigned int' [-Walloca-larger-than=]In contrast, a call toalloca that isn't bounded at allsuch as in the following function will elicit the warning belowregardless of thesize argument to the option.
void f (size_t n){ char *d = alloca (n); …}warning:unbounded use of 'alloca' [-Walloca-larger-than=]The-Wformat-overflow=level option detectscertain and likely buffer overflow in calls to thesprintffamily of formatted output functions. Although the option is enabledeven without optimization it works best with-O2 andhigher.
For example, in the following snippet the call tosprintf is diagnosed because even though itsoutput has been constrained using the modulo operation it couldresult in as many as three bytes ifmday were negative.The solution is to either allocate a larger buffer or make surethe argument is not negative, for example by changingmday's type tounsigned or by makingthe type of the second operand of the modulo expressionunsigned:100U.
void* f (int mday){ char *buf = malloc (3); sprintf (buf, "%02i", mday % 100); return buf;}warning:'sprintf may write a terminating nul past the end of the destination [-Wformat-overflow=]note:'sprintf' output between 3 and 4 bytes into a destination of size 3The-Wformat-truncation=level option detectscertain and likely output truncation in calls to thesnprintf family of formatted output functions.-Wformat-truncation=1 is included in-Walland enabled without optimization but works best with-O2and higher.
For example, the following function attempts to format an integerbetween 0 and 255 in hexadecimal, including the0xprefix, into a buffer of four characters. But since the functionmust always terminate output by the null character ('\0')such a buffer is only big enough to fit just one digit plus the prefix.Therefore thesnprintf call is diagnosed. To avoidthe warning either use a bigger buffer or handle the function'sreturn value which indicates whether or not its output hasbeen truncated.
void f (unsigned x){ char d[4]; snprintf (d, sizeof d, "%#02x", x & 0xff); …}warning:'snprintf' output may be truncated before the last format character [-Wformat-truncation=]note:'snprintf' output between 3 and 5 bytes into a destination of size 4-Wnonnull option has been enhanced to detect a broader set of cases of passing null pointers to functions that expect a non-null argument (those decorated with attributenonnull). By taking advantage of optimizations the option can detect many more cases of the problem than in prior GCC versions.The-Wstringop-overflow=type option detectsbuffer overflow in calls to string handling functions likememcpy andstrcpy. The option relies on Object Size Checking and has an effect similar to definingthe_FORTIFY_SOURCE macro.-Wstringop-overflow=2 is enabled by default.
For example, in the following snippet, because the call tostrncat specifies a maximum that allows the function towrite past the end of the destination, it is diagnosed. To correctthe problem and avoid the overflow the function should be calledwith a size of at mostsizeof d - strlen(d) - 1.
void f (const char *fname){ char d[8]; strncpy (d, "/tmp/", sizeof d); strncat (d, fname, sizeof d); …}warning:specified bound 8 equals the size of the destination [-Wstringop-overflow=]<limits.h> header provided by GCC defines macros such asINT_WIDTH for the width in bits of integer types, if__STDC_WANT_IEC_60559_BFP_EXT__ is defined before the header is included. The<stdint.h> header defines such macros asSIZE_WIDTH andINTMAX_WIDTH for the width of some standardtypedef names for integer types, again if__STDC_WANT_IEC_60559_BFP_EXT__ is defined before the header is included; note that GCC's implementation of this header is only used for freestanding compilations, not hosted compilations, on most systems. These macros come from ISO/IEC TS 18661-1:2014.<float.h> header provided by GCC defines the macroCR_DECIMAL_DIG, from ISO/IEC TS 18661-1:2014, if__STDC_WANT_IEC_60559_BFP_EXT__ is defined before the header is included. This represents the number of decimal digits for which conversions between decimal character strings and binary formats, in both directions, are correctly rounded, and currently has the value ofUINTMAX_MAX on all systems, reflecting that GCC's compile-time conversions are correctly rounded for any number of digits.New__builtin_add_overflow_p,__builtin_sub_overflow_p,__builtin_mul_overflow_p built-in functions have been added. These work similarly to their siblings without the_p suffix, but do not actually store the result of the arithmetics anywhere, just return whether the operation would overflow. Calls to these built-ins with integer constant arguments evaluate to integer constants expressions.
For example, in the following,c is assigned the result ofa * b only if the multiplication does not overflow, otherwise it is assigned the value zero. The multiplication is performed at compile-time and without triggering a-Woverflow warning.
enum { a = 12345678, b = 87654321, c = __builtin_mul_overflow_p (a, b, a) ? 0 : a * b};The C front end now supports type names_FloatN for floating-point types with IEEE interchange formats and_FloatNx for floating-point types with IEEE extended formats. These type names come from ISO/IEC TS 18661-3:2015.
The set of types supported depends on the target for which GCC is configured. Most targets support_Float32,_Float32x and_Float64._Float128 is supported on targets where IEEE binary128 encoding was already supported aslong double or__float128._Float64x is supported on targets where a type with either binary128 or Intel extended precision format is available.
Constants with these types are supported using suffixesfN,FN,fNx andFNx (e.g.,1.2f128 or2.3F64x). Macros such asFLT128_MAX are defined in<float.h> if__STDC_WANT_IEC_60559_TYPES_EXT__ is defined before it is included.
These new types are always distinct from each other and fromfloat,double andlong double, even if they have the same encoding. Complex types such as_Complex _Float128 are also supported.
Type-generic built-in functions such as__builtin_isinf support the new types, and the following type-specific built-in functions have versions (suffixedfN orfNx) for the new types:__builtin_copysign,__builtin_fabs,__builtin_huge_val,__builtin_inf,__builtin_nan,__builtin_nans.
-fopenmp is now compatible with the C11_Atomic keyword.-std=c++1z or-std=gnu++1z flags, includingif constexpr, class template argument deduction,auto template parameters, and structured bindings. For a full list of new features, seethe C++ status page.new of over-aligned types can be enabled in other modes with the-faligned-new flag.-fstrong-eval-order flag, or disabled in C++17 mode with-fno-strong-eval-order.-fno-new-inheriting-ctors, or-fabi-version less than 11.-f{no-,}new-ttp-matching.test.cc:4:11:error: expected';' after class definition class a {}^;
-Waligned-new has been added to the C++ front end. It warns aboutnew of type with extended alignment without-faligned-new.std::ios_base::failure, now uses thecxx11 ABI.std::string_view;std::any,std::optional, andstd::variant;std::invoke,std::is_invocable,std::is_nothrow_invocable, andinvoke_result;std::is_swappable, andstd::is_nothrow_swappable;std::apply, andstd::make_from_tuple;std::void_t,std::bool_constant,std::conjunction,std::disjunction, andstd::negation;std::chrono::floor,std::chrono::ceil,std::chrono::round, andstd::chrono::abs;std::clamp,std::gcd,std::lcm, 3-dimensionalstd::hypot;std::scoped_lock,std::shared_mutex,std::atomic<T>::is_always_lock_free;std::sample,std::default_searcher,std::boyer_moore_searcher andstd::boyer_moore_horspool_searcher;try_emplace members for maps, and functions for accessing containersstd::size,std::empty, andstd::data;std::shared_ptr support for arrays,std::shared_ptr<T>::weak_type,std::enable_shared_from_this<T>::weak_from_this(), andstd::owner_less<void>;std::byte;std::as_const,std::not_fn,std::has_unique_object_representations, constexprstd::addressof._Hashtable internals, thanks to François Dumont.-fdec-structure Support for DECSTRUCTURE andUNION-fdec-intrinsic-ints Support for new integer intrinsics with B/I/J/K prefixes such asBABS,JIAND...-fdec-math Support for additional math intrinsics, includingCOTAN and degree-valued trigonometric functions such asTAND,ASIND...-fdec Enable the-fdec-* family of extensions.-finit-derived to allow default initialization of derived-type variables.DO loops with step equal to 1 or -1, generates faster code without a loop preheader. A new warning,-Wundefined-do-loop, warns when a loop iterates either toHUGE(i) (with step equal to 1), or to-HUGE(i) (with step equal to -1). Invalid behavior can be caught at run time with-fcheck=do enabled:program test implicit none integer(1) :: i do i = -HUGE(i)+10, -HUGE(i)-1, -1 print *, i end doend program testAt line 8 of file do_check_12.f90Fortran runtime error: Loop iterates infinitely
-fgo-optimize-allocs option. The-fgo-debug-escape prints information useful for debugging escape analysis choices.The GCC Java front end and associated libjava runtime library have beenremoved from GCC.
The libgccjit API gained support for marking calls as requiringtail-call optimization via a new entry point:gcc_jit_rvalue_set_bool_require_tail_call.
libgccjit performs numerous checks at the API boundary, butif these succeed, it previously ignored errors and other diagnostics emittedwithin the core of GCC, and treated the compile of a gcc_jit_contextas having succeeded. As of GCC 7 it now ensures that if any diagnostics areemitted, they are visible from the libgccjit API, and that the the context isflagged as having failed.
-march=armv8.3-a option.-msign-return-address= is supported to enable return address protection using ARMv8.3-A Pointer Authentication Extensions. For more information on the arguments accepted by this option, please refer toAArch64-Options.-march=armv8.2-a or-march=armv8.2-a+fp16 options. The 16-bit Floating-Point Extensions introduce new half-precision data processing floating-point instructions.cortex-a73), Broadcom Vulcan (vulcan), Cavium ThunderX CN81xx (thunderxt81), Cavium ThunderX CN83xx (thunderxt83), Cavium ThunderX CN88xx (thunderxt88), Cavium ThunderX CN88xx pass 1.x (thunderxt88p1), Cavium ThunderX 2 CN99xx (thunderx2t99), Qualcomm Falkor (falkor). The GCC identifiers can be used as arguments to the-mcpu or-mtune options, for example:-mcpu=cortex-a73 or-mtune=vulcan or as arguments to the equivalent target attributes and pragmas.armv5 andarmv5e of-march are thus deprecated.-march=armv8.2-a or-march=armv8.2-a+fp16 options. The 16-bit Floating-Point Extensions introduce new half-precision data processing floating-point instructions.-march=armv8-m.base,armv8-m.main orarmv8-m.main+dsp options.cortex-a73), ARM Cortex-M23 (cortex-m23) and ARM Cortex-M33 (cortex-m33). The GCC identifiers can be used as arguments to the-mcpu or-mtune options, for example:-mcpu=cortex-a73 or-mtune=cortex-m33.-mpure-code has been added. It does not allow constant data to be placed in code sections. This option is only available when generating non-PIC code for ARMv7-M targets.cdp,ldc, and others.--with-multilib-list now accepts the valuermprofile to build multilib libraries for a range of embedded targets. See ourinstallation instructions for details.progmemvariable attribute is now properly supported. Respective read-only variables are located in flash memory in section.progmem.data. No special code is needed to access such variables; the compiler automatically adds an offset of0x4000 to all addresses, which is needed to access variables in flash memory. As opposed to ordinary cores where it is sufficient to specify theprogmem attribute with definitions, on the reduced Tiny cores the attribute also has to be specified with (external) declarations:extern const int array[] __attribute__((__progmem__));int get_value2 (void){ /* Access via addresses array + 0x4004 and array + 0x4005. */ return array[2];}const int* get_address (unsigned idx){ /* Returns array + 0x4000 + 2 * idx. */ return &array[idx];}-Wmisspelled-isr has been added. It turns off — or turns into errors — warnings that are reported for interrupt service routines (ISRs) which don't follow AVR-LibC's naming convention of prefixing ISR names with__vector.__builtin_avr_nops(n) is a newbuilt-in function that insertsnNOP instructions into the instruction stream.n must be a value known at compile time.-mcpu=power9) has been enhanced to generate more of the new instructions by default, and to provide more built-in functions to generate code for other new instructions.--enable-gnu-indirect-function is now enabled by default on PowerPC GNU/Linux builds.-mstack-protector-guard=global,-mstack-protector-guard=tls,-mstack-protector-guard-reg=, and-mstack-protector-guard-offset= change how the stack protector gets the value to use as canary.-march=z14 option, the compiler will generate code making use of the new instructions introduced with the vector enhancement facility and the miscellaneous instruction extension facility 2. The-mtune=z14 option enables z14 specific instruction scheduling without making use of new instructions.-mzvector option.-mcbranchdi-mcmpeqdi-minvalid-symbols-msoft-atomic-mspace-madjust-unrollmov.b @-Rm,R0mov.w @-Rm,R0mov.l @-Rm,R0mov.b R0,@Rn+mov.w R0,@Rn+mov.l R0,@Rn+-fverbose-asm previously emitted information on the meanings of assembly expressions. This has been extended so that it now also prints comments showing the source lines that correspond to the assembly, making it easier to read the generated assembly (especially with larger functions). For example, given this C source file:int test (int n){ int i; int total = 0; for (i = 0; i < n; i++) total += i * i; return total;}-fverbose-asm now gives output similar to this for the function body (when compiling for x86_64, with-Os):.text .globl test .type test, @@functiontest:.LFB0: .cfi_startproc# example.c:4: int total = 0; xorl %eax, %eax # <retval># example.c:6: for (i = 0; i < n; i++) xorl %edx, %edx # i.L2:# example.c:6: for (i = 0; i < n; i++) cmpl %edi, %edx # n, i jge .L5 #,# example.c:7: total += i * i; movl %edx, %ecx # i, tmp92 imull %edx, %ecx # i, tmp92# example.c:6: for (i = 0; i < n; i++) incl %edx # i# example.c:7: total += i * i; addl %ecx, %eax # tmp92, <retval> jmp .L2 #.L5:# example.c:10: } ret .cfi_endproc
-fdiagnostics-parseable-fixits allows for fix-it hints to be emitted in a machine-readable form, suitable for consumption by IDEs. For example, given:it will emit:spellcheck-fields.cc:52:13:error:'struct s' has no member named'colour'; did you mean'color'? return ptr->colour;^~~~~~color
fix-it:"spellcheck-fields.cc":{52:13-52:19}:"color"-fdiagnostics-generate-patch will print a patch in "unified" format after any diagnostics are printed, showing the result of applying all fix-it hints. For the above example it would emit:--- spellcheck-fields.cc+++ spellcheck-fields.cc@@ -49,5 +49,5 @@ color get_color(struct s *ptr) {- return ptr->colour;+ return ptr->color; }
gcc andg++ driver programs will now provide suggestions for misspelled arguments to command-line options.$ gcc -c test.c -ftls-model=global-dinamicgcc:error: unknown TLS model'global-dinamic'gcc:note: valid arguments to'-ftls-model=' are: global-dynamic initial-exec local-dynamic local-exec; did you mean'global-dynamic'?
$ gcc -c test.c --param max-early-inliner-iteration=3 cc1:error: invalid --param name'max-early-inliner-iteration'; did you mean'max-early-inliner-iterations'?__attribute__((constructor))), destructors and C++ constructors (and destructors) of classes that are used as the type of a global variable.-fprofile-update=atomic prevents creation of corrupted profiles created during an instrumentation run (-fprofile=generate) of an application. The downside of the option is a speed penalty. Providing-pthread on the command line selects atomic profile updating (when supported by the target).GCC's already extensive testsuite has gained some new capabilities, to further improve the reliability of the compiler:
This is thelistof problem reports (PRs) from GCC's bug tracking system that areknown to be fixed in the 7.1 release. This list might not becomplete (that is, it is possible that some PRs that have been fixedare not listed here).
This is thelistof problem reports (PRs) from GCC's bug tracking system that areknown to be fixed in the 7.2 release. This list might not becomplete (that is, it is possible that some PRs that have been fixedare not listed here).
-mfix-ut700 and-mfix-gr712rc have been added to work around an erratum in LEON3FT processors.-mfsmuld and-fno-fsmuld options.This is thelistof problem reports (PRs) from GCC's bug tracking system that areknown to be fixed in the 7.3 release. This list might not becomplete (that is, it is possible that some PRs that have been fixedare not listed here).
-mfix-ut699,-mfix-ut700 and-mfix-gr712rc switches.This is thelistof problem reports (PRs) from GCC's bug tracking system that areknown to be fixed in the 7.4 release. This list might not becomplete (that is, it is possible that some PRs that have been fixedare not listed here).
This is thelistof problem reports (PRs) from GCC's bug tracking system that areknown to be fixed in the 7.5 release. This list might not becomplete (that is, it is possible that some PRs that have been fixedare not listed here).
Copyright (C)Free Software Foundation, Inc.Verbatim copying and distribution of this entire article ispermitted in any medium, provided this notice is preserved.
These pages aremaintained by the GCC team.Last modified 2025-01-31.