Support for a number of older systems and recently unmaintained or untested target ports of GCC has been declared obsolete in GCC 4.5. 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:
Support for the classic POWER architecture implemented in the original RIOS and RIOS2 processors of the old IBM RS/6000 product line has been obsoleted in the rs6000 port. This does not affect the new generation Power and PowerPC architectures.
protoize
and unprotoize
utilities, obsoleted in GCC 4.4.-gdwarf-3 -gstrict-dwarf
options, or
use -gdwarf-2 -gstrict-dwarf
to restrict GCC to just
DWARF2, but epilogue unwind info is emitted unconditionally whenever
unwind info is emitted.-fexcess-precision=fast
; also see
below.noinline
no longer prevents GCC
from cloning the function. A new attribute noclone
has been introduced for this purpose. Cloning a function means
that it is duplicated and the new copy is specialized for certain
contexts (for example when a parameter is a known constant).-save-temps
now takes an optional argument. The
-save-temps
and -save-temps=cwd
switches write
the temporary files in the current working directory based on the original
source file. The -save-temps=obj
switch will write files into
the directory specified with the -o
option, and the
intermediate filenames are based on the output file. This will allow the
user to get the compiler intermediate files when doing parallel builds
without two builds of the same filename located in different directories
from interfering with each other.cacos
, cacosh
, casin
,
casinh
, catan
, catanh
,
ccos
, ccosh
, cexp
,
clog
, cpow
, csin
,
csinh
, csqrt
, ctan
, and
ctanh
. The float
and long
double
variants of these functions (e.g. csinf
and csinl
) are also handled.-flto
).
When this option is used, GCC generates a bytecode representation of
each input file and writes it to specially-named sections in each
object file. When the object files are linked together, all the
function bodies are read from these named sections and instantiated
as if they had been part of the same translation unit. This
enables interprocedural optimizations to work across different
files (and even different languages), potentially improving the
performance of the generated code. To use the link-timer optimizer,
-flto
needs to be specified at compile time and during
the final link. If the program does not require any symbols to be
exported, it is possible to combine -flto
and the
experimental -fwhopr
with -fwhole-program
to allow the interprocedural optimizers
to use more aggressive assumptions.-ftree-parallelize-loops=
, specify
-floop-parallelize-all
to enable the Graphite-based
optimization.-fno-strict-aliasing
.-O2
and above
as well as -Os
and can be manually invoked using the new
command-line switch -fipa-sra
. -fshow-column
option is now on by default. This
means error messages now have a column associated with them.#include
directive is not
found, the compiler exits immediately. This avoids a cascade of
errors arising from declarations expected to be found in that
header being missing.__builtin_unreachable()
has been added that tells the compiler that control will never
reach that point. It may be used after asm
statements that terminate by transferring control elsewhere, and
in other places that are known to be unreachable.-Wlogical-op
option now warns for logical
expressions such as (c == 1 && c == 2)
and (c
!= 1 || c != 2)
, which are likely to be mistakes. This
option is disabled by default.asm goto
feature has been added to
allow asm
statements that jump to C labels.-std=gnu99
.deprecated
attribute now takes an optional
string argument, for example,
__attribute__((deprecated("text string")))
, that will
be printed together with the deprecation warning.-Wenum-compare
option, which warns when
comparing values of different enum types, now works for C. It
formerly only worked for C++. This warning is enabled
by -Wall
. It may be avoided by using a
type cast.-Wcast-qual
option now warns about casts
which are unsafe in that they permit const-correctness to be
violated without further warnings. Specifically, it warns about
cases where a qualifier is added when all the lower types are
not const
. For example, it warns about a cast
from char **
to const char **
.-Wc++-compat
option is significantly
improved. It issues new warnings for:
?:
.++
or --
on a variable of
enum type.-Wjump-misses-init
option warns about
cases where a goto
or switch
skips the
initialization of a variable. This sort of branch is an error in
C++ but not in C. This warning is enabled
by -Wc++-compat
.<stdint.h>
is present on most
targets, and uses information about the types in this header to
implement the Fortran bindings to those types. GCC does not
ensure the presence of such a header, and does not implement the
Fortran bindings, on the following targets: NetBSD, VxWorks, VMS,
SymbianOS, WinCE, LynxOS, Netware, QNX, Interix, TPF.FLOAT_CONST_DECIMAL64
pragma.explicit
type conversion
operators.-fno-pretty-templates
option.typedef
names used in
a template, which may cause G++ to reject some ill-formed code that was
accepted by earlier releases. The -fno-access-control
option can be used as a temporary workaround until the code is
corrected.abort
or memcpy
. Such code is ill-formed, but was accepted by
earlier releases....
or jumping past the declaration of a non-POD
variable now check for triviality rather than PODness, as per
C++0x.unused
.-fno-access-control
; the second is
only rejected with -pedantic
.
-fabi-version=4
or -fabi-version=0
.
-Wabi
will now warn about code that uses the old
mangling.-ftemplate-depth-N
is now
written as -ftemplate-depth=N
and the old form is
deprecated.NULL
and non-pointer types
are now warned by default. The new option
-Wno-conversion-null
disables these warnings.
Previously these warnings were only available when using
-Wconversion
explicitly.An experimental profile mode has been added. This is an implementation of many C++ standard library constructs with an additional analysis layer that gives performance improvement advice based on recognition of suboptimal usage patterns. For example,
#include <vector> int main() { std::vector<int> v; for (int k = 0; k < 1024; ++k) v.insert(v.begin(), k); }
When instrumented via the profile mode, can return suggestions about the initial size and choice of the container used as follows:
vector-to-list: improvement = 5: call stack = 0x804842c ... : advice = change std::vector to std::list vector-size: improvement = 3: call stack = 0x804842c ... : advice = change initial container size from 0 to 1024
These constructs can be substituted for the normal libstdc++
constructs on a piecemeal basis, or all existing components can be
transformed via the -D_GLIBCXX_PROFILE
macro.
<decimal/decimal>
, uses namespace
std::decimal
, and includes classes decimal32
,
decimal64
, and decimal128
.nothrow
, const
, pure
, and
noreturn
.<typeinfo>
,
__GXX_MERGED_TYPEINFO_NAMES
now defaults to zero.-static-libstdc++
option
directs g++
to link the C++ library statically, even
if the default would normally be to link it dynamically.COMMON
default padding has been changed –
instead of adding the padding before a variable it is now added
afterwards, which increases the compatibility with other vendors
and helps to obtain the correct output in some cases. Cf. also the
-falign-commons
option (added
in 4.4).-finit-real=
option now also supports the value
snan
for signaling not-a-number; to be effective,
one additionally needs to enable trapping (e.g. via
-ffpe-trap=
). Note: Compile-time optimizations can
turn a signaling NaN into a quiet one.-fcheck=
has been added with the
options bounds
, array-temps
,
do
, pointer
, and recursive
. The
bounds
and array-temps
options are
equivalent to -fbounds-check
and
-fcheck-array-temporaries
. The do
option checks for invalid modification of loop iteration variables,
and the recursive
option tests for recursive calls
to subroutines/functions which are not marked as recursive. With
pointer
pointer association checks in calls are performed;
however, neither undefined pointers nor pointers in expressions are
handled. Using -fcheck=all
enables all these run-time
checks.-fcheck=bounds
now warns
about invalid string lengths of character dummy arguments. Additionally,
more compile-time checks have been added.-fno-protect-parens
has been added; if set, the
compiler may reorder REAL and COMPLEX expressions without regard
to parentheses.libgfortranbegin
.
As before, MAIN__
(assembler symbol name) is the actual
Fortran main program, which is invoked by the main
function.
However, main
is now generated and put in the same object
file as MAIN__
. For the time being,
libgfortranbegin
still exists for backward
compatibility. For details see the new Mixed-Language
Programming chapter in the manual.WHERE
are now run in parallel when
OpenMP's WORKSHARE
is used.-fwhole-file
was added. The option
allows whole-file checking of procedure arguments and allows for better
optimizations. It can also be used with -fwhole-program
,
which is now also supported in gfortran.STDCALL
are now
supported via the
GCC$
compiler directive.-fno-sign-zero
is
used, the SIGN
intrinsic behaves now as if zero were always
positive.CONOUT$
and CONIN$
(and CONERR$
which maps to CONOUT$
) are now supported.DEFERRED
type-bound procedures,ERRMSG=
argument of the ALLOCATE
and DEALLOCATE
statements have been implemented.ALLOCATE
statement supports type-specs and
the SOURCE=
argument.OPERATOR(*)
and ASSIGNMENT(=)
are now
allowed as GENERIC
type-bound procedure (i.e. as
type-bound operators).ROUND=
, RZ
, ...) for output
is now supported.INT_FAST{8,16,32,64,128}_T
kind type parameters
of the intrinsic module ISO_C_BINDING
are now
supported, except for the targets listed above as ones where
GCC does not have <stdint.h>
type information.
PASS
attribute now have to use
CLASS
in line with the Fortran 2003 standard; the
workaround to use TYPE
is no longer supported.CLASS
,
SELECT TYPE
and dynamic dispatch of type-bound
procedure calls. Some features do not work yet such as
unlimited polymorphism (CLASS(*)
).OPEN
statement now supports the
NEWUNIT=
option, which returns a unique file unit,
thus preventing inadvertent use of the same unit in different parts
of the program.INT{8,16,32}
and REAL{32,64,128}
kind type parameters of the intrinsic module
ISO_FORTRAN_ENV
are now supported.TAN
, SINH
,
COSH
, TANH
, ASIN
,
ACOS
, and ATAN
is now possible; the
functions ASINH
, ACOSH
, and
ATANH
have been added (for real and complex arguments)
and ATAN(Y,X)
is now an alias for ATAN2(Y,X).
BLOCK
construct has been implemented.__fp16
, with the
layout determined by -mfp16-format
. With
appropriate -mfpu
options, the Cortex-A9 and VFPv4
half-precision instructions will be used.-mno-tablejump
option has been removed because it
has the same effect as the -fno-jump-tables
option.-march=
based on
the configure target.-fexcess-precision=standard
and with standards
conformance options such as -std=c99
, and may be
disabled using -fexcess-precision=fast
.-march=atom
and -mtune=atom
options.-mcrc32
option is now available to enable
crc32
intrinsics.-mmovbe
option is now available to enable GCC
to use the movbe
instruction to implement
__builtin_bswap32
and __builtin_bswap64
.
--with-fpmath=sse
option.-mxop
, -mfma4
,
and -mlwp
options.-mabm
option enables GCC to use
the popcnt
and lzcnt
instructions on AMD
processors.-mpopcnt
option enables GCC to use
the popcnt
instructions on both AMD and Intel
processors.Support has been added for the Toshiba Media embedded Processor (MeP, or mep-elf) embedded target.
--with-arch-32
, --with-arch-64
,
--with-tune-32
and --with-tune-64
to
control the default optimization separately for 32-bit and 64-bit
modes._mcount
interface,
in which register $12
points to the function's save slot
for register $31
. This interface is selected by the
-mcount-ra-address
option; see the documentation for
more details..eh_frame
sections. This optimization requires GNU binutils 2.20 or above, and
is only available if GCC is configured with a suitable version of
binutils.-mrelax-pic-calls
command-line option.-fstack-protector
option.-msynci
option, which specifies
that synci
is enough to flush the instruction cache,
without help from the operating system. GCC uses this information
to optimize automatically-generated cache flush operations, such as
those used for nested functions in C. There is also a
--with-synci
configure-time option, which makes
-msynci
the default.interrupt
, use_shadow_register_set
,
keep_interrupts_masked
and
use_debug_exception_return
. See the documentation
for more details about these attributes.-mcpu=power7
and -mtune=power7
.-mcpu=a2
and -mtune=a2
options.-mcpu={476,476fp}
and -mtune={476,476fp}
options.-mcpu=e500mc64
and -mtune=e500mc64
options.--with-cpu-32
, --with-cpu-64
,
--with-tune-32
and --with-tune-64
to
control the default optimization separately for 32-bit and 64-bit
modes.Support has been added for the Renesas RX Processor (rx-elf) target.
--enable-shared
option.-fplugin=file.so
tells GCC to load the shared object file.so
and execute
it as part of the compiler. The internal documentation describes
the details on how plugins can interact with the compiler.--with-datarootdir
, --with-docdir
,
--with-pdfdir
, and --with-htmldir
switches are
not used any more. Instead, you can now use --datarootdir
,
--docdir
, --htmldir
, and --pdfdir
.
The default installation directories have changed as follows according to
the GNU Coding Standards:
datarootdir | read-only architecture-independent data root [PREFIX/share] |
localedir | locale-specific message catalogs [DATAROOTDIR/locale] |
docdir | documentation root [DATAROOTDIR/doc/PACKAGE] |
htmldir | html documentation [DOCDIR] |
dvidir | dvi documentation [DOCDIR] |
pdfdir | pdf documentation [DOCDIR] |
psdir | ps documentation [DOCDIR] |
datadir | read-only architecture-independent data [DATAROOTDIR] |
infodir | info documentation [DATAROOTDIR/info] |
mandir | man documentation [DATAROOTDIR/man] |
This is the list of problem reports (PRs) from GCC's bug tracking system that are known to be fixed in the 4.5.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's new link-time optimizer (-flto
) now also works on a few non-ELF targets:
LTO is not enabled by default for these targets. To enable LTO,
you should configure with the --enable-lto
option.
This is the list of problem reports (PRs) from GCC's bug tracking system that are known to be fixed in the 4.5.2 release. This list might not be complete (that is, it is possible that some PRs that have been fixed are not listed here).
This is the list of problem reports (PRs) from GCC's bug tracking system that are known to be fixed in the 4.5.3 release. This list might not be complete (that is, it is possible that some PRs that have been fixed are not listed here).
On the PowerPC compiler, the Altivec builtin functions vec_ld
and vec_st
have been modified to generate the Altivec memory
instructions LVX
and STVX
, even if the
-mvsx
option is used. In the initial GCC 4.5 release, these
builtin functions were changed to generate VSX memory reference instructions
instead of Altivec memory instructions, but there are differences between the
two instructions. If the VSX instruction set is available, you can now use the
new builtin functions vec_vsx_ld
and vec_vsx_st
which
always generates the VSX memory instructions.
This is the list of problem reports (PRs) from GCC's bug tracking system that are known to be fixed in the 4.5.4 release. This list might not be complete (that is, it is possible that some PRs that have been fixed are not listed here).
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 2023-07-30.