-std=gnu++14
instead of
-std=gnu++98
.Support for a number of older systems and recently unmaintained or untested target ports of GCC has been declared obsolete in GCC 6. 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:
-fsanitize=bounds-strict
, which enables strict checking
of array bounds. In particular, it enables
-fsanitize=bounds
as well as instrumentation of
flexible array member-like arrays.enum { newval, oldval __attribute__ ((deprecated ("too old"))) };
format-strings.c:3:14: warning: field width specifier '*' expects a matching 'int' argument [-Wformat=] printf("%*d"); ^
-Wshift-negative-value
warns about left shifting a
negative value.-Wshift-overflow
warns about left shift overflows.
This warning is enabled by default.
-Wshift-overflow=2
also warns about left-shifting 1 into
the sign bit.-Wtautological-compare
warns if a self-comparison
always evaluates to true or false. This warning is enabled by
-Wall
.-Wnull-dereference
warns if the compiler detects paths
that trigger erroneous or undefined behavior due to dereferencing a
null pointer. This option is only active when
-fdelete-null-pointer-checks
is active, which is enabled
by optimizations in most targets. The precision of the warnings
depends on the optimization options used.-Wduplicated-cond
warns about duplicated conditions
in an if-else-if chain.-Woverride-init-side-effects
.-std=gnu++14
.-std=gnu++1z
or -std=c++1z
.std::uncaught_exceptions
function (this is also
available for -std=gnu++NN modes); try_emplace
and
insert_or_assign
for unique_key maps;std::size
,
std::empty
, and std::data
for
accessing containers and arrays;std::invoke
;std::shared_mutex
;std::void_t
and std::bool_constant
metaprogramming utilities. shared_ptr
, thanks to Fan You._GLIBCXX_ASSERTIONS
. The subset of checks enabled by
the new macro have less run-time overhead than the full
_GLIBCXX_DEBUG
checks and and don't affect the library
ABI, so can be enabled per-translation unit.
std::locale
support for DragonFly and FreeBSD,
thanks to John Marino and Andreas Tobler.
MATMUL
intrinsic is now inlined for straightforward
cases if front-end optimization is active. The maximum size for
inlining can be set to n
with the
-finline-matmul-limit=n
option and turned off
with -finline-matmul-llimit=0
.-Wconversion-extra
option will warn about
REAL
constants which have excess precision for
their kind.-Winteger-division
option has been added, which
warns about divisions of integer constants which are truncated.
This option is included in -Wall
by default.-march=native
,
-mcpu=native
and -mtune=native
are now
available on native AArch64 GNU/Linux systems. Specifying
these options will cause GCC to auto-detect the host CPU and
rewrite these options to the optimal setting for that system.
If GCC is unable to detect the host CPU these options have no effect.
-fpic
is now supported by the AArch64 target when generating
code for the small code model (-mcmodel=small
). The size of
the global offset table (GOT) is limited to 28KiB under the LP64 SysV ABI
, and 15KiB under the ILP32 SysV ABI.
-march=skylake-avx512
. The switch enables the following
ISA extensions: AVX-512F, AVX512VL, AVX-512CD, AVX-512BW, AVX-512DQ.
monitorx
and
mwaitx
has been added. This includes new intrinsic
and built-in support. It is enabled through option -mmwaitx
.
The instructions monitorx
and mwaitx
implement the same functionality as the old monitor
and mwait
instructions. In addition mwaitx
adds a configurable timer. The timer value is received as third
argument and stored in register %ebx
.
-fstackrealign
or
__attribute__ ((force_align_arg_pointer))
. This allows
functions compiled with a vector-aligned stack to be invoked from
objects that keep only word-alignment.
__seg_fs
, __seg_gs
,
and __seg_tls
. These can be used to access data via the
%fs
and %gs
segments without having to
resort to inline assembly.
Please refer to the
documentation for usage instructions.
-march=znver1
and -mtune=znver1
options.
The MSP430 compiler now has the ability to automatically distribute code and data between low memory (addresses below 64K) and high memory. This only applies to parts that actually have both memory regions and only if the linker script for the part has been specifically set up to support this feature.
A new attribute of either
can be applied to both functions
and data, and this tells the compiler to place the object into low memory
if there is room and into high memory otherwise. Two other new attributes
- lower
and upper
- can be used to explicitly
state that an object should be placed in the specified memory region. If
there is not enough left in that region the compilation will fail.
Two new command-line options - -mcode-region=[lower|upper|either]
and -mdata-region=[lower|upper|either]
- can be used to tell
the compiler what to do with objects that do not have one of these new
attributes.
A new configuration option ---with-advance-toolchain=at
was added for PowerPC 64-bit GNU/Linux systems to use the header files, library
files, and the dynamic linker from a specific Advance Toolchain release
instead of the default versions that are provided by the GNU/Linux
distribution. In general, this option is intended for the developers of
GCC, and it is not intended for general use.
-march=z13
option, the compiler will generate
code making use of the new instructions and registers introduced
with the vector extension facility. The -mtune=z13
option enables z13 specific instruction scheduling without
making use of new instructions.-march=z13
reduces the default
alignment of vector types bigger than 8 bytes to 8. This is an
ABI change and care must be taken when linking modules compiled
with different arch levels which interchange variables
containing vector type values. For newly compiled code the GNU
linker will emit a warning.-mzvector
option enables a C/C++ language
extension. This extension provides a new
keyword vector
which can be used to define vector
type variables. (Note: This is not available when
enforcing strict standard compliance
e.g. with -std=c99
. Either enable GNU extensions
with e.g. -std=gnu99
or use
__vector
instead of vector
.)vecintrin.h
header file needs to be included.-march=native
,
and -mtune=native
are now available on native IBM
z Systems. Specifying these options will cause GCC to
auto-detect the host CPU and rewrite these options to the
optimal setting for that system. If GCC is unable to detect
the host CPU these options have no effect.g5
and g6
-march=/-mtune=
CPU level switches has been deprecated
and will be removed in a future GCC release. -m31
from now on defaults to -march=z900
if not
specified otherwise. -march=native
on a g5/g6
machine will default to -march=z900
.-mfdpic
target option and --enable-fdpic
configure option.once
function are directly defined via <pthread.h>.
Self-contained condition variables are provided via Newlib
<sys/lock.h>. The RTEMS thread model also supports C++11
threads.libgomp
. It is possible to
configure thread pools for each scheduler instance via the environment
variable GOMP_RTEMS_THREAD_POOLS
.--enable-default-pie
configure option enables
generation of PIE by default.Copyright (C) Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
These pages are maintained by the GCC team. Last modified 2015-12-22.