-fno-implicit-templates @gol
-fno-implicit-inline-templates @gol
-fno-implement-inlines -fms-extensions @gol
--fno-nonansi-builtins -fno-operator-names @gol
+-fno-nonansi-builtins -fnothrow-opt -fno-operator-names @gol
-fno-optional-diags -fpermissive @gol
-fno-pretty-templates @gol
-frepo -fno-rtti -fstats -ftemplate-depth=@var{n} @gol
-Wno-attributes -Wno-builtin-macro-redefined @gol
-Wc++-compat -Wc++0x-compat -Wcast-align -Wcast-qual @gol
-Wchar-subscripts -Wclobbered -Wcomment @gol
--Wconversion -Wcoverage-mismatch -Wno-deprecated @gol
+-Wconversion -Wcoverage-mismatch -Wcpp -Wno-deprecated @gol
-Wno-deprecated-declarations -Wdisabled-optimization @gol
-Wno-div-by-zero -Wempty-body -Wenum-compare -Wno-endif-labels @gol
-Werror -Werror=* @gol
-Wsign-compare -Wsign-conversion -Wstack-protector @gol
-Wstrict-aliasing -Wstrict-aliasing=n @gol
-Wstrict-overflow -Wstrict-overflow=@var{n} @gol
+-Wsuggest-attribute=@r{[}const@r{|}pure@r{]} @gol
-Wswitch -Wswitch-default -Wswitch-enum -Wsync-nand @gol
-Wsystem-headers -Wtrigraphs -Wtype-limits -Wundef -Wuninitialized @gol
-Wunknown-pragmas -Wno-pragmas @gol
-Wunsuffixed-float-constants -Wunused -Wunused-function @gol
-Wunused-label -Wunused-parameter -Wno-unused-result -Wunused-value -Wunused-variable @gol
--Wvariadic-macros -Wvla @gol
+-Wunused-but-set-parameter -Wunused-but-set-variable -Wvariadic-macros -Wvla @gol
-Wvolatile-register-var -Wwrite-strings}
@item C and Objective-C-only Warning Options
-fgcse-sm -fif-conversion -fif-conversion2 -findirect-inlining @gol
-finline-functions -finline-functions-called-once -finline-limit=@var{n} @gol
-finline-small-functions -fipa-cp -fipa-cp-clone -fipa-matrix-reorg -fipa-pta @gol
--fipa-pure-const -fipa-reference -fipa-struct-reorg @gol
--fipa-type-escape -fira-algorithm=@var{algorithm} @gol
+-fipa-profile -fipa-pure-const -fipa-reference -fipa-struct-reorg @gol
+-fira-algorithm=@var{algorithm} @gol
-fira-region=@var{region} -fira-coalesce @gol
-fira-loop-pressure -fno-ira-share-save-slots @gol
-fno-ira-share-spill-slots -fira-verbose=@var{n} @gol
-funit-at-a-time -funroll-all-loops -funroll-loops @gol
-funsafe-loop-optimizations -funsafe-math-optimizations -funswitch-loops @gol
-fvariable-expansion-in-unroller -fvect-cost-model -fvpt -fweb @gol
--fwhole-program -fwhopr -fwpa -fuse-linker-plugin @gol
+-fwhole-program -fwhopr[=@var{n}] -fwpa -fuse-linker-plugin @gol
--param @var{name}=@var{value}
-O -O0 -O1 -O2 -O3 -Os}
@item Directory Options
@xref{Directory Options,,Options for Directory Search}.
-@gccoptlist{-B@var{prefix} -I@var{dir} -iquote@var{dir} -L@var{dir}
--specs=@var{file} -I- --sysroot=@var{dir}}
-
-@item Target Options
-@c I wrote this xref this way to avoid overfull hbox. -- rms
-@xref{Target Options}.
-@gccoptlist{-V @var{version} -b @var{machine}}
+@gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir}}
+-iquote@var{dir} -L@var{dir} -specs=@var{file} -I-
+--sysroot=@var{dir}
@item Machine Dependent Options
@xref{Submodel Options,,Hardware Models and Configurations}.
-mprefergot -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
-mdivsi3_libfunc=@var{name} -mfixed-range=@var{register-range} @gol
-madjust-unroll -mindexed-addressing -mgettrcost=@var{number} -mpt-fixed @gol
--minvalid-symbols}
+-maccumulate-outgoing-args -minvalid-symbols}
@emph{SPARC Options}
@gccoptlist{-mcpu=@var{cpu-type} @gol
-fshort-double -fshort-wchar @gol
-fverbose-asm -fpack-struct[=@var{n}] -fstack-check @gol
-fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol
--fno-stack-limit -fargument-alias -fargument-noalias @gol
--fargument-noalias-global -fargument-noalias-anything @gol
+-fno-stack-limit @gol
-fleading-underscore -ftls-model=@var{model} @gol
-ftrapv -fwrapv -fbounds-check @gol
-fvisibility}
@item -###
@opindex ###
-Like @option{-v} except the commands are not executed and all command
-arguments are quoted. This is useful for shell scripts to capture the
-driver-generated command lines.
+Like @option{-v} except the commands are not executed and arguments
+are quoted unless they contain only alphanumeric characters or @code{./-_}.
+This is useful for shell scripts to capture the driver-generated command lines.
@item -pipe
@opindex pipe
@w{@uref{http://gcc.gnu.org/c99status.html}} for more information. The
names @samp{c9x} and @samp{iso9899:199x} are deprecated.
+@item c1x
+ISO C1X, the draft of the next revision of the ISO C standard.
+Support is limited and experimental and features enabled by this
+option may be changed or removed if changed in or removed from the
+standard draft.
+
@item gnu90
@itemx gnu89
GNU dialect of ISO C90 (including some C99 features). This
GNU dialect of ISO C99. When ISO C99 is fully implemented in GCC,
this will become the default. The name @samp{gnu9x} is deprecated.
+@item gnu1x
+GNU dialect of ISO C1X. Support is limited and experimental and
+features enabled by this option may be changed or removed if changed
+in or removed from the standard draft.
+
@item c++98
The 1998 ISO C++ standard plus amendments. Same as @option{-ansi} for
C++ code.
ANSI/ISO C@. These include @code{ffs}, @code{alloca}, @code{_exit},
@code{index}, @code{bzero}, @code{conjf}, and other related functions.
+@item -fnothrow-opt
+@opindex fnothrow-opt
+Treat a @code{throw()} exception specification as though it were a
+@code{noexcept} specification to reduce or eliminate the text size
+overhead relative to a function with no exception specification. If
+the function has local variables of types with non-trivial
+destructors, the exception specification will actually make the
+function smaller because the EH cleanups for those variables can be
+optimized away. The semantic effect is that an exception thrown out of
+a function with such an exception specification will result in a call
+to @code{terminate} rather than @code{unexpected}.
+
@item -fno-operator-names
@opindex fno-operator-names
Do not treat the operator name keywords @code{and}, @code{bitand},
Emit statistics about front-end processing at the end of the compilation.
This information is generally only useful to the G++ development team.
+@item -fstrict-enums
+@opindex fstrict-enums
+Allow the compiler to optimize using the assumption that a value of
+enumeration type can only be one of the values of the enumeration (as
+defined in the C++ standard; basically, a value which can be
+represented in the minimum number of bits needed to represent all the
+enumerators). This assumption may not be valid if the program uses a
+cast to convert an arbitrary integer value to the enumeration type.
+
@item -ftemplate-depth=@var{n}
@opindex ftemplate-depth
Set the maximum instantiation depth for template classes to @var{n}.
If a source file was changed between @option{-fprofile-gen} and
@option{-fprofile-use}, the files with the profile feedback can fail
to match the source file and GCC can not use the profile feedback
-information. By default, GCC emits an error message in this case.
-The option @option{-Wcoverage-mismatch} emits a warning instead of an
-error. GCC does not use appropriate feedback profiles, so using this
-option can result in poorly optimized code. This option is useful
-only in the case of very minor changes such as bug fixes to an
-existing code-base.
+information. By default, this warning is enabled and is treated as an
+error. @option{-Wno-coverage-mismatch} can be used to disable the
+warning or @option{-Wno-error=coverage-mismatch} can be used to
+disable the error. Disable the error for this warning can result in
+poorly optimized code, so disabling the error is useful only in the
+case of very minor changes such as bug fixes to an existing code-base.
+Completely disabling the warning is not recommended.
@end table
language-specific options also refer to @ref{C++ Dialect Options} and
@ref{Objective-C and Objective-C++ Dialect Options}.
+When an unrecognized warning label is requested (e.g.,
+@option{-Wunknown-warning}), GCC will emit a diagnostic stating
+that the option is not recognized. However, if the @samp{-Wno-} form
+is used, the behavior is slightly different: No diagnostic will be
+produced for @option{-Wno-unknown-warning} unless other diagnostics
+are being produced. This allows the use of new @option{-Wno-} options
+with old compilers, but if something goes wrong, the compiler will
+warn that an unrecognized option was used.
+
@table @gcctabopt
@item -pedantic
@opindex pedantic
-Wc++0x-compat @gol
-Wchar-subscripts @gol
-Wenum-compare @r{(in C/Objc; this is on by default in C++)} @gol
--Wimplicit-int @gol
--Wimplicit-function-declaration @gol
+-Wimplicit-int @r{(C and Objective-C only)} @gol
+-Wimplicit-function-declaration @r{(C and Objective-C only)} @gol
-Wcomment @gol
-Wformat @gol
-Wmain @r{(only for C/ObjC and unless} @option{-ffreestanding}@r{)} @gol
-Wsign-compare @gol
-Wtype-limits @gol
-Wuninitialized @gol
--Wunused-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)} @gol
+-Wunused-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)} @gol
+-Wunused-but-set-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)} @gol
}
The option @option{-Wextra} also prints warning messages for the
comment, or whenever a Backslash-Newline appears in a @samp{//} comment.
This warning is enabled by @option{-Wall}.
+@item -Wno-cpp \
+@r{(C, Objective-C, C++, Objective-C++ and Fortran only)}
+
+Suppress warning messages emitted by @code{#warning} directives.
+
@item -Wformat
@opindex Wformat
@opindex Wno-format
@option{-pedantic-errors}. This warning is also enabled by
@option{-Wall}.
-@item -Wimplicit
+@item -Wimplicit @r{(C and Objective-C only)}
@opindex Wimplicit
@opindex Wno-implicit
Same as @option{-Wimplicit-int} and @option{-Wimplicit-function-declaration}.
the program (trigraphs within comments are not warned about).
This warning is enabled by @option{-Wall}.
+@item -Wunused-but-set-parameter
+@opindex Wunused-but-set-parameter
+@opindex Wno-unused-but-set-parameter
+Warn whenever a function parameter is assigned to, but otherwise unused
+(aside from its declaration).
+
+To suppress this warning use the @samp{unused} attribute
+(@pxref{Variable Attributes}).
+
+This warning is also enabled by @option{-Wunused} together with
+@option{-Wextra}.
+
+@item -Wunused-but-set-variable
+@opindex Wunused-but-set-variable
+@opindex Wno-unused-but-set-variable
+Warn whenever a local variable is assigned to, but otherwise unused
+(aside from its declaration).
+This warning is enabled by @option{-Wall}.
+
+To suppress this warning use the @samp{unused} attribute
+(@pxref{Variable Attributes}).
+
+This warning is also enabled by @option{-Wunused}, which is enabled
+by @option{-Wall}.
+
@item -Wunused-function
@opindex Wunused-function
@opindex Wno-unused-function
false positives.
@end table
+@item -Wsuggest-attribute=@r{[}const@r{|}pure@r{]}
+@opindex Wsuggest-attribute=
+@opindex Wno-suggest-attribute=
+Warn for cases where adding an attribute may be beneficial. The
+attributes currently supported are listed below.
+
+@table @gcctabopt
+@item -Wsuggest-attribute=pure
+@itemx -Wsuggest-attribute=const
+@opindex Wsuggest-attribute=pure
+@opindex Wno-suggest-attribute=pure
+@opindex Wsuggest-attribute=const
+@opindex Wno-suggest-attribute=const
+
+Warn about functions which might be candidates for attributes
+@code{pure} or @code{const}. The compiler only warns for functions
+visible in other compilation units or if it cannot prove that the
+function returns normally. A function returns normally if it doesn't
+contain an infinite loop nor returns abnormally by throwing, calling
+@code{abort()} or trapping. This analysis requires option
+@option{-fipa-pure-const}, which is enabled by default at @option{-O}
+and higher. Higher optimization levels improve the accuracy of the
+analysis.
+@end table
+
@item -Warray-bounds
@opindex Wno-array-bounds
@opindex Warray-bounds
This option is only active when @option{-ftree-vrp} is active
-(default for -O2 and above). It warns about subscripts to arrays
+(default for @option{-O2} and above). It warns about subscripts to arrays
that are always out of bounds. This warning is enabled by @option{-Wall}.
@item -Wno-div-by-zero
The restrictions on @samp{offsetof} may be relaxed in a future version
of the C++ standard.
-@item -Wno-int-to-pointer-cast @r{(C and Objective-C only)}
+@item -Wno-int-to-pointer-cast
@opindex Wno-int-to-pointer-cast
@opindex Wint-to-pointer-cast
Suppress warnings from casts to pointer type of an integer of a
-different size.
+different size. In C++, casting to a pointer type of smaller size is
+an error. @option{Wint-to-pointer-cast} is enabled by default.
+
@item -Wno-pointer-to-int-cast @r{(C and Objective-C only)}
@opindex Wno-pointer-to-int-cast
-fif-conversion2 @gol
-fif-conversion @gol
-fipa-pure-const @gol
+-fipa-profile @gol
-fipa-reference @gol
-fmerge-constants
-fsplit-wide-types @gol
layout in order to better utilize spatial locality. This transformation is
affective for programs containing arrays of structures. Available in two
compilation modes: profile-based (enabled with @option{-fprofile-generate})
-or static (which uses built-in heuristics). Require @option{-fipa-type-escape}
-to provide the safety of this transformation. It works only in whole program
+or static (which uses built-in heuristics). It works only in whole program
mode, so it requires @option{-fwhole-program} and @option{-combine} to be
enabled. Structures considered @samp{cold} by this transformation are not
affected (see @option{--param struct-reorg-cold-struct-ratio=@var{value}}).
@item -fipa-pta
@opindex fipa-pta
-Perform interprocedural pointer analysis. This option is experimental
-and does not affect generated code.
+Perform interprocedural pointer analysis and interprocedural modification
+and reference analysis. This option can cause excessive memory and
+compile-time usage on large compilation units. It is not enabled by
+default at any optimization level.
+
+@item -fipa-profile
+@opindex fipa-profile
+Perform interprocedural profile propagation. The functions called only from
+cold functions are marked as cold. Also functions executed once (such as
+@code{cold}, @code{noreturn}, static constructors or destructors) are identified. Cold
+functions and loop less parts of functions executed once are then optimized for
+size.
+Enabled by default at @option{-O} and higher.
@item -fipa-cp
@opindex fipa-cp
Perform loop strip mining transformations on loops. Strip mining
splits a loop into two nested loops. The outer loop has strides
equal to the strip size and the inner loop has strides of the
-original loop within a strip. For example, given a loop like:
+original loop within a strip. The strip length can be changed
+using the @option{loop-block-tile-size} parameter. For example,
+given a loop like:
@smallexample
DO I = 1, N
A(I) = A(I) + C
@end smallexample
loop strip mining will transform the loop as if the user had written:
@smallexample
-DO II = 1, N, 4
- DO I = II, min (II + 3, N)
+DO II = 1, N, 51
+ DO I = II, min (II + 50, N)
A(I) = A(I) + C
ENDDO
ENDDO
@item -floop-block
Perform loop blocking transformations on loops. Blocking strip mines
each loop in the loop nest such that the memory accesses of the
-element loops fit inside caches. For example, given a loop like:
+element loops fit inside caches. The strip length can be changed
+using the @option{loop-block-tile-size} parameter. For example, given
+a loop like:
@smallexample
DO I = 1, N
DO J = 1, M
@end smallexample
loop blocking will transform the loop as if the user had written:
@smallexample
-DO II = 1, N, 64
- DO JJ = 1, M, 64
- DO I = II, min (II + 63, N)
- DO J = JJ, min (JJ + 63, M)
+DO II = 1, N, 51
+ DO JJ = 1, M, 51
+ DO I = II, min (II + 50, N)
+ DO J = JJ, min (JJ + 50, M)
A(J, I) = B(I) + C(J)
ENDDO
ENDDO
was mixing languages before, all you need to add is @option{-flto} to
all the compile and link commands.
+If LTO encounters objects with C linkage declared with incompatible
+types in separate translation units to be linked together (undefined
+behavior according to ISO C99 6.2.7), a non-fatal diagnostic may be
+issued. The behavior is still undefined at runtime.
+
If object files containing GIMPLE bytecode are stored in a library
archive, say @file{libfoo.a}, it is possible to extract and use them
in an LTO link if you are using @command{gold} as the linker (which,
This option is disabled by default.
-@item -fwhopr
+@item -fwhopr[=@var{n}]
@opindex fwhopr
This option is identical in functionality to @option{-flto} but it
differs in how the final link stage is executed. Instead of loading
that otherwise would not fit in memory. This option enables
@option{-fwpa} and @option{-fltrans} automatically.
-Disabled by default.
+If you specify the optional @var{n} the link stage is executed in
+parallel using @var{n} parallel jobs by utilizing an installed
+@code{make} program.
-This option is experimental.
+Disabled by default.
@item -fwpa
@opindex fwpa
@item min-insn-to-prefetch-ratio
The minimum ratio between the number of instructions and the
-number of prefetches to enable prefetching in a loop with an
-unknown trip count.
+number of prefetches to enable prefetching in a loop.
@item prefetch-min-insn-to-mem-ratio
The minimum ratio between the number of instructions and the
@option{ipa-sra-ptr-growth-factor} times the size of the original
pointer parameter.
+@item graphite-max-nb-scop-params
+To avoid exponential effects in the Graphite loop transforms, the
+number of parameters in a Static Control Part (SCoP) is bounded. The
+default value is 10 parameters. A variable whose value is unknown at
+compile time and defined outside a SCoP is a parameter of the SCoP.
+
+@item graphite-max-bbs-per-function
+To avoid exponential effects in the detection of SCoPs, the size of
+the functions analyzed by Graphite is bounded. The default value is
+100 basic blocks.
+
+@item loop-block-tile-size
+Loop blocking or strip mining transforms, enabled with
+@option{-floop-block} or @option{-floop-strip-mine}, strip mine each
+loop in the loop nest by a given number of iterations. The strip
+length can be changed using the @option{loop-block-tile-size}
+parameter. The default value is 51 iterations.
+
@end table
@end table
If you really need to change the search order for system directories,
use the @option{-nostdinc} and/or @option{-isystem} options.
+@item -iplugindir=@var{dir}
+Set the directory to search for plugins which are passed
+by @option{-fplugin=@var{name}} instead of
+@option{-fplugin=@var{path}/@var{name}.so}. This option is not meant
+to be used by the user, but only passed by the driver.
+
@item -iquote@var{dir}
@opindex iquote
Add the directory @var{dir} to the head of the list of directories to
The usual way to run GCC is to run the executable called @file{gcc}, or
@file{<machine>-gcc} when cross-compiling, or
@file{<machine>-gcc-<version>} to run a version other than the one that
-was installed last. Sometimes this is inconvenient, so GCC provides
-options that will switch to another cross-compiler or version.
-
-@table @gcctabopt
-@item -b @var{machine}
-@opindex b
-The argument @var{machine} specifies the target machine for compilation.
-
-The value to use for @var{machine} is the same as was specified as the
-machine type when configuring GCC as a cross-compiler. For
-example, if a cross-compiler was configured with @samp{configure
-arm-elf}, meaning to compile for an arm processor with elf binaries,
-then you would specify @option{-b arm-elf} to run that cross compiler.
-Because there are other options beginning with @option{-b}, the
-configuration must contain a hyphen, or @option{-b} alone should be one
-argument followed by the configuration in the next argument.
-
-@item -V @var{version}
-@opindex V
-The argument @var{version} specifies which version of GCC to run.
-This is useful when multiple versions are installed. For example,
-@var{version} might be @samp{4.0}, meaning to run GCC version 4.0.
-@end table
-
-The @option{-V} and @option{-b} options work by running the
-@file{<machine>-gcc-<version>} executable, so there's no real reason to
-use them if you can just run that directly.
+was installed last.
@node Submodel Options
@section Hardware Models and Configurations
@cindex hardware models and configurations, specifying
@cindex machine dependent options
-Earlier we discussed the standard option @option{-b} which chooses among
-different installed compilers for completely different target
-machines, such as VAX vs.@: 68000 vs.@: 80386.
-
-In addition, each of these target machine types can have its own
+Each target machine types can have its own
special options, starting with @samp{-m}, to choose among various
hardware models or configurations---for example, 68010 vs 68020,
floating coprocessor or none. A single installed version of the
by default. This can be overridden with the @code{section} attribute.
@xref{Variable Attributes}.
-@item -mfix-cortex-m3-ldrd
-@opindex mfix-cortex-m3-ldrd
-Some Cortex-M3 cores can cause data corruption when @code{ldrd} instructions
-with overlapping destination and base registers are used. This option avoids
-generating these instructions. This option is enabled by default when
-@option{-mcpu=cortex-m3} is specified.
-
@end table
@node ARM Options
loader imposes this restriction, and when @option{-fpic} or @option{-fPIC}
is specified.
+@item -mfix-cortex-m3-ldrd
+@opindex mfix-cortex-m3-ldrd
+Some Cortex-M3 cores can cause data corruption when @code{ldrd} instructions
+with overlapping destination and base registers are used. This option avoids
+generating these instructions. This option is enabled by default when
+@option{-mcpu=cortex-m3} is specified.
+
@end table
@node AVR Options
slows down the case of larger dividends. inv20u assumes the case of a such
a small dividend to be unlikely, and inv20l assumes it to be likely.
+@item -maccumulate-outgoing-args
+@opindex maccumulate-outgoing-args
+Reserve space once for outgoing arguments in the function prologue rather
+than around each call. Generally beneficial for performance and size. Also
+needed for unwinding to avoid changing the stack frame around conditional code.
+
@item -mdivsi3_libfunc=@var{name}
@opindex mdivsi3_libfunc=@var{name}
Set the name of the library function used for 32 bit signed division to
@option{-Wl,--defsym,__stack_limit=0x7ffe0000} to enforce a stack limit
of 128KB@. Note that this may only work with the GNU linker.
-@cindex aliasing of parameters
-@cindex parameters, aliased
-@item -fargument-alias
-@itemx -fargument-noalias
-@itemx -fargument-noalias-global
-@itemx -fargument-noalias-anything
-@opindex fargument-alias
-@opindex fargument-noalias
-@opindex fargument-noalias-global
-@opindex fargument-noalias-anything
-Specify the possible relationships among parameters and between
-parameters and global data.
-
-@option{-fargument-alias} specifies that arguments (parameters) may
-alias each other and may alias global storage.@*
-@option{-fargument-noalias} specifies that arguments do not alias
-each other, but may alias global storage.@*
-@option{-fargument-noalias-global} specifies that arguments do not
-alias each other and do not alias global storage.
-@option{-fargument-noalias-anything} specifies that arguments do not
-alias any other storage.
-
-Each language will automatically use whatever option is required by
-the language standard. You should not need to use these options yourself.
-
@item -fleading-underscore
@opindex fleading-underscore
This option and its counterpart, @option{-fno-leading-underscore}, forcibly