protoize
and unprotoize utilities, obsoleted in GCC 4.4.-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.-flto).
When this flag is used, GCC generates a bytecode representation of
each input file and writes it to special ELF sections in each
object file. When the object files are linked together, all the
function bodies are read from these ELF 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 -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.-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.-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.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
flag 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.-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 flag (added
in 4.4).-finit-real= flag now also supports the value
snan for signalling not-a-number; to be effective,
one additionally needs to enable trapping (e.g. via
-ffpe-trap=). Note: Compile-time optimizations can
turn a signalling 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.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 flag
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.
PASS attribute now have to use
CLASS in line with the Fortran 2003 standard; the
workaround to use TYPE is no longer supported.CLASS (as allocatable or dummy), SELECT TYPE
and dynamic dispatch of type-bound procedure calls. Some features do
not work yet such as unlimited polymorphism (CODE(*)),
CLASS IS, EXTENDS_TYPE_OF.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.-mno-tablejump option has been removed because it
has the same effect as the -fno-jump-tables option.-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.Support has been added for the Toshiba Media embedded Processor (MeP, or mep-elf) embedded target.
-mcpu=power7 and -mtune=power7.-mcpu=a2 and -mtune=a2 options.-mcpu={476,476fp} and -mtune={476,476fp}
options.Support has been added for the Renesas RX Processor (rx-elf) target.
-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.Please send FSF & GNU inquiries & questions to gnu@gnu.org. There are also other ways to contact the FSF.
These pages are maintained by the GCC team.
For questions related to the use of GCC, please consult these web pages and the GCC manuals. If that fails, the gcc-help@gcc.gnu.org mailing list might help.Copyright (C) Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
| Last modified 2009-11-08 |
|