@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-@c 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+@c 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@ignore
+@c man begin INCLUDE
+@include gcc-vers.texi
+@c man end
+
@c man begin COPYRIGHT
-Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
-1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
[@option{-I}@var{dir}@dots{}] [@option{-L}@var{dir}@dots{}]
[@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}]
[@option{-f}@var{option}@dots{}] [@option{-m}@var{machine-option}@dots{}]
- [@option{-o} @var{outfile}] @var{infile}@dots{}
+ [@option{-o} @var{outfile}] [@@@var{file}] @var{infile}@dots{}
Only the most useful options are listed here; see below for the
remainder. @samp{g++} accepts mostly the same options as @samp{gcc}.
@item Overall Options
@xref{Overall Options,,Options Controlling the Kind of Output}.
@gccoptlist{-c -S -E -o @var{file} -combine -pipe -pass-exit-codes @gol
--x @var{language} -v -### --help --target-help --version}
+-x @var{language} -v -### --help --target-help --version @@@var{file}}
@item C Language Options
@xref{C Dialect Options,,Options Controlling C Dialect}.
@item C++ Language Options
@xref{C++ Dialect Options,,Options Controlling C++ Dialect}.
@gccoptlist{-fabi-version=@var{n} -fno-access-control -fcheck-new @gol
--fconserve-space -ffriend-injection -fno-const-strings @gol
+-fconserve-space -ffriend-injection @gol
-fno-elide-constructors @gol
-fno-enforce-eh-specs @gol
-ffor-scope -fno-for-scope -fno-gnu-keywords @gol
@item Warning Options
@xref{Warning Options,,Options to Request or Suppress Warnings}.
@gccoptlist{-fsyntax-only -pedantic -pedantic-errors @gol
--w -Wextra -Wall -Waggregate-return -Wno-attributes @gol
+-w -Wextra -Wall -Waggregate-return -Walways-true -Wno-attributes @gol
-Wc++-compat -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment @gol
-Wconversion -Wno-deprecated-declarations @gol
-Wdisabled-optimization -Wno-div-by-zero -Wno-endif-labels @gol
--Werror -Werror-implicit-function-declaration @gol
+-Werror -Werror-* -Werror-implicit-function-declaration @gol
-Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
-Wno-format-extra-args -Wformat-nonliteral @gol
-Wformat-security -Wformat-y2k @gol
-Wmain -Wmissing-braces -Wmissing-field-initializers @gol
-Wmissing-format-attribute -Wmissing-include-dirs @gol
-Wmissing-noreturn @gol
--Wno-multichar -Wnonnull -Wpacked -Wpadded @gol
+-Wno-multichar -Wnonnull -Woverlength-strings -Wpacked -Wpadded @gol
-Wparentheses -Wpointer-arith -Wno-pointer-to-int-cast @gol
-Wredundant-decls @gol
-Wreturn-type -Wsequence-point -Wshadow @gol
-Wsign-compare -Wstack-protector @gol
-Wstrict-aliasing -Wstrict-aliasing=2 @gol
+-Wstring-literal-comparison @gol
-Wswitch -Wswitch-default -Wswitch-enum @gol
-Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol
-Wunknown-pragmas -Wno-pragmas -Wunreachable-code @gol
@gccoptlist{-Wbad-function-cast -Wmissing-declarations @gol
-Wmissing-prototypes -Wnested-externs -Wold-style-definition @gol
-Wstrict-prototypes -Wtraditional @gol
--Wdeclaration-after-statement -Wno-pointer-sign}
+-Wdeclaration-after-statement -Wpointer-sign}
@item Debugging Options
@xref{Debugging Options,,Options for Debugging Your Program or GCC}.
-fexpensive-optimizations -ffast-math -ffloat-store @gol
-fforce-addr -ffunction-sections @gol
-fgcse -fgcse-lm -fgcse-sm -fgcse-las -fgcse-after-reload @gol
--floop-optimize -fcrossjumping -fif-conversion -fif-conversion2 @gol
+-fcrossjumping -fif-conversion -fif-conversion2 @gol
-finline-functions -finline-functions-called-once @gol
-finline-limit=@var{n} -fkeep-inline-functions @gol
-fkeep-static-consts -fmerge-constants -fmerge-all-constants @gol
-fmodulo-sched -fno-branch-count-reg @gol
--fno-default-inline -fno-defer-pop -floop-optimize2 -fmove-loop-invariants @gol
+-fno-default-inline -fno-defer-pop -fmove-loop-invariants @gol
-fno-function-cse -fno-guess-branch-probability @gol
-fno-inline -fno-math-errno -fno-peephole -fno-peephole2 @gol
-funsafe-math-optimizations -funsafe-loop-optimizations -ffinite-math-only @gol
--fno-trapping-math -fno-zero-initialized-in-bss @gol
+-fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss @gol
-fomit-frame-pointer -foptimize-register-move @gol
--foptimize-sibling-calls -fprefetch-loop-arrays @gol
+-foptimize-sibling-calls -fprefetch-loop-arrays -fprefetch-loop-arrays-rtl @gol
-fprofile-generate -fprofile-use @gol
-fregmove -frename-registers @gol
-freorder-blocks -freorder-blocks-and-partition -freorder-functions @gol
-frerun-cse-after-loop -frerun-loop-opt @gol
--frounding-math -fschedule-insns -fschedule-insns2 @gol
+-frounding-math -frtl-abstract-sequences @gol
+-fschedule-insns -fschedule-insns2 @gol
-fno-sched-interblock -fno-sched-spec -fsched-spec-load @gol
-fsched-spec-load-dangerous @gol
-fsched-stalled-insns=@var{n} -fsched-stalled-insns-dep=@var{n} @gol
-fsched2-use-superblocks @gol
-fsched2-use-traces -freschedule-modulo-scheduled-loops @gol
--fsignaling-nans -fsingle-precision-constant @gol
+-fsection-anchors -fsignaling-nans -fsingle-precision-constant @gol
-fstack-protector -fstack-protector-all @gol
-fstrength-reduce -fstrict-aliasing -ftracer -fthread-jumps @gol
-funroll-all-loops -funroll-loops -fpeel-loops @gol
-ftree-loop-linear -ftree-loop-im -ftree-loop-ivcanon -fivopts @gol
-ftree-dominator-opts -ftree-dse -ftree-copyrename -ftree-sink @gol
-ftree-ch -ftree-sra -ftree-ter -ftree-lrs -ftree-fre -ftree-vectorize @gol
--ftree-vect-loop-version -ftree-salias -fweb @gol
+-ftree-vect-loop-version -ftree-salias -fipa-pta -fweb @gol
-ftree-copy-prop -ftree-store-ccp -ftree-store-copy-prop -fwhole-program @gol
--param @var{name}=@var{value}
-O -O0 -O1 -O2 -O3 -Os}
-include @var{file} -imacros @var{file} @gol
-iprefix @var{file} -iwithprefix @var{dir} @gol
-iwithprefixbefore @var{dir} -isystem @var{dir} @gol
--isysroot @var{dir} @gol
+-imultilib @var{dir} -isysroot @var{dir} @gol
-M -MM -MF -MG -MP -MQ -MT -nostdinc @gol
-P -fworking-directory -remap @gol
-trigraphs -undef -U@var{macro} -Wp,@var{option} @gol
-mTLS -mtls @gol
-mcpu=@var{cpu}}
+@emph{GNU/Linux Options}
+@gccoptlist{-muclibc}
+
@emph{H8/300 Options}
@gccoptlist{-mrelax -mh -ms -mn -mint32 -malign-300}
-mno-fp-ret-in-387 -msoft-float -msvr3-shlib @gol
-mno-wide-multiply -mrtd -malign-double @gol
-mpreferred-stack-boundary=@var{num} @gol
--mmmx -msse -msse2 -msse3 -m3dnow @gol
+-mmmx -msse -msse2 -msse3 -m3dnow -msselibm @gol
-mthreads -mno-align-stringops -minline-all-stringops @gol
-mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol
-m96bit-long-double -mregparm=@var{num} -msseregparm @gol
@emph{M680x0 Options}
@gccoptlist{-m68000 -m68020 -m68020-40 -m68020-60 -m68030 -m68040 @gol
--m68060 -mcpu32 -m5200 -m68881 -mbitfield -mc68000 -mc68020 @gol
+-m68060 -mcpu32 -m5200 -mcfv4e -m68881 -mbitfield @gol
+-mc68000 -mc68020 @gol
-mnobitfield -mrtd -mshort -msoft-float -mpcrel @gol
-malign-int -mstrict-align -msep-data -mno-sep-data @gol
-mshared-library-id=n -mid-shared-library -mno-id-shared-library}
-mreturn-pointer-on-d0 @gol
-mno-crt0 -mrelax}
-@emph{MS1 Options}
-@gccoptlist{-mno-crt0 -mmul -mbacc -msim @gol
+@emph{MT Options}
+@gccoptlist{-mno-crt0 -mbacc -msim @gol
-march=@var{cpu-type} }
@emph{PDP-11 Options}
-mspe -mno-spe @gol
-mspe=yes -mspe=no @gol
-mvrsave -mno-vrsave @gol
+-mmulhw -mno-mulhw @gol
-mfloat-gprs=yes -mfloat-gprs=no -mfloat-gprs=single -mfloat-gprs=double @gol
-mprototype -mno-prototype @gol
-msim -mmvme -mads -myellowknife -memb -msdata @gol
@emph{S/390 and zSeries Options}
@gccoptlist{-mtune=@var{cpu-type} -march=@var{cpu-type} @gol
--mhard-float -msoft-float -mbackchain -mno-backchain @gol
--mpacked-stack -mno-packed-stack @gol
+-mhard-float -msoft-float -mlong-double-64 -mlong-double-128 @gol
+-mbackchain -mno-backchain -mpacked-stack -mno-packed-stack @gol
-msmall-exec -mno-small-exec -mmvcle -mno-mvcle @gol
-m64 -m31 -mdebug -mno-debug -mesa -mzarch @gol
-mtpf-trace -mno-tpf-trace -mfused-madd -mno-fused-madd @gol
-mstack-bias -mno-stack-bias @gol
-munaligned-doubles -mno-unaligned-doubles @gol
-mv8plus -mno-v8plus -mvis -mno-vis
--threads -pthreads}
+-threads -pthreads -pthread}
@emph{System V Options}
@gccoptlist{-Qy -Qn -YP,@var{paths} -Ym,@var{dir}}
-fno-common -fno-ident @gol
-fpcc-struct-return -fpic -fPIC -fpie -fPIE @gol
-fno-jump-tables @gol
--freg-struct-return -fshared-data -fshort-enums @gol
+-freg-struct-return -fshort-enums @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
-fargument-noalias-global -fleading-underscore @gol
-ftls-model=@var{model} @gol
-ftrapv -fwrapv -fbounds-check @gol
--fvisibility}
+-fvisibility -fopenmp}
@end table
@menu
@item @var{file}.f
@itemx @var{file}.for
@itemx @var{file}.FOR
-Fortran source code which should not be preprocessed.
+Fixed form Fortran source code which should not be preprocessed.
@item @var{file}.F
@itemx @var{file}.fpp
@itemx @var{file}.FPP
-Fortran source code which must be preprocessed (with the traditional
+Fixed form Fortran source code which must be preprocessed (with the traditional
preprocessor).
-@item @var{file}.r
-Fortran source code which must be preprocessed with a RATFOR
-preprocessor (not included with GCC)@.
-
@item @var{file}.f90
@itemx @var{file}.f95
-Fortran 90/95 source code which should not be preprocessed.
+Free form Fortran source code which should not be preprocessed.
@item @var{file}.F90
@itemx @var{file}.F95
-Fortran 90/95 source code which must be preprocessed (with the
+Free form Fortran source code which must be preprocessed (with the
traditional preprocessor).
@c FIXME: Descriptions of Java file types.
@c Pascal:
@c @var{file}.p
@c @var{file}.pas
+@c Ratfor:
+@c @var{file}.r
@item @var{file}.s
Assembler code.
objective-c++ objective-c++-header objective-c++-cpp-output
assembler assembler-with-cpp
ada
-f77 f77-cpp-input ratfor
+f77 f77-cpp-input
f95 f95-cpp-input
java
treelang
@item --version
@opindex version
Display the version number and copyrights of the invoked GCC@.
+
+@include @value{srcdir}/../libiberty/at-file.texi
@end table
@node Invoking G++
This option is for compatibility, and may be removed in a future
release of G++.
-@item -fno-const-strings
-@opindex fno-const-strings
-Give string constants type @code{char *} instead of type @code{const
-char *}. By default, G++ uses type @code{const char *} as required by
-the standard. Even if you use @option{-fno-const-strings}, you cannot
-actually modify the value of a string constant.
-
-This option might be removed in a future release of G++. For maximum
-portability, you should structure your code so that it works with
-string constants that have type @code{const char *}.
-
@item -fno-elide-constructors
@opindex fno-elide-constructors
The C++ standard allows an implementation to omit creating a temporary
destructors, but will only work if your C library supports
@code{__cxa_atexit}.
+@item -fno-use-cxa-get-exception-ptr
+@opindex fno-use-cxa-get-exception-ptr
+Don't use the @code{__cxa_get_exception_ptr} runtime routine. This
+will cause @code{std::uncaught_exception} to be incorrect, but is necessary
+if the runtime routine is not available.
+
@item -fvisibility-inlines-hidden
@opindex fvisibility-inlines-hidden
Causes all inlined methods to be marked with
@item -Wnon-virtual-dtor @r{(C++ only)}
@opindex Wnon-virtual-dtor
Warn when a class appears to be polymorphic, thereby requiring a virtual
-destructor, yet it declares a non-virtual one.
-This warning is enabled by @option{-Wall}.
+destructor, yet it declares a non-virtual one. This warning is also
+enabled if -Weffc++ is specified.
@item -Wreorder @r{(C++ only)}
@opindex Wreorder
@item -fobjc-exceptions
@opindex fobjc-exceptions
Enable syntactic support for structured exception handling in Objective-C,
-similar to what is offered by C++ and Java. Currently, this option is only
-available in conjunction with the NeXT runtime on Mac OS X 10.3 and later.
+similar to what is offered by C++ and Java. This option is
+unavailable in conjunction with the NeXT runtime on Mac OS X 10.2 and
+earlier.
@smallexample
@@try @{
@item -Wsequence-point
@opindex Wsequence-point
Warn about code that may have undefined semantics because of violations
-of sequence point rules in the C standard.
-
-The C standard defines the order in which expressions in a C program are
-evaluated in terms of @dfn{sequence points}, which represent a partial
-ordering between the execution of parts of the program: those executed
-before the sequence point, and those executed after it. These occur
-after the evaluation of a full expression (one which is not part of a
-larger expression), after the evaluation of the first operand of a
+of sequence point rules in the C and C++ standards.
+
+The C and C++ standards defines the order in which expressions in a C/C++
+program are evaluated in terms of @dfn{sequence points}, which represent
+a partial ordering between the execution of parts of the program: those
+executed before the sequence point, and those executed after it. These
+occur after the evaluation of a full expression (one which is not part
+of a larger expression), after the evaluation of the first operand of a
@code{&&}, @code{||}, @code{? :} or @code{,} (comma) operator, before a
function is called (but after the evaluation of its arguments and the
expression denoting the called function), and in certain other places.
It is not specified when between sequence points modifications to the
values of objects take effect. Programs whose behavior depends on this
-have undefined behavior; the C standard specifies that ``Between the
-previous and next sequence point an object shall have its stored value
-modified at most once by the evaluation of an expression. Furthermore,
-the prior value shall be read only to determine the value to be
-stored.''. If a program breaks these rules, the results on any
+have undefined behavior; the C and C++ standards specify that ``Between
+the previous and next sequence point an object shall have its stored
+value modified at most once by the evaluation of an expression.
+Furthermore, the prior value shall be read only to determine the value
+to be stored.''. If a program breaks these rules, the results on any
particular implementation are entirely unpredictable.
Examples of code with undefined behavior are @code{a = a++;}, @code{a[n]
result, but in general it has been found fairly effective at detecting
this sort of problem in programs.
-The present implementation of this option only works for C programs. A
-future implementation may also work for C++ programs.
-
-The C standard is worded confusingly, therefore there is some debate
+The standard is worded confusingly, therefore there is some debate
over the precise meaning of the sequence point rules in subtle cases.
Links to discussions of the problem, including proposed formal
definitions, may be found on the GCC readings page, at
@w{@uref{http://gcc.gnu.org/readings.html}}.
-This warning is enabled by @option{-Wall}.
+This warning is enabled by @option{-Wall} for C and C++.
@item -Wreturn-type
@opindex Wreturn-type
char[@var{length}]} so that
copying the address of one into a non-@code{const} @code{char *}
pointer will get a warning; when compiling C++, warn about the
-deprecated conversion from string constants to @code{char *}.
+deprecated conversion from string literals to @code{char *}. This
+warning, by default, is enabled for C++ programs.
These warnings will help you find at
compile time code that can try to write into a string constant, but
only if you have been very careful about using @code{const} in
called. (In languages where you can return an array, this also elicits
a warning.)
+@item -Walways-true
+@opindex Walways-true
+Warn about comparisons which are always true such as testing if
+unsigned values are greater than or equal to zero. This warning is
+enabled by @option{-Wall}.
+
@item -Wno-attributes
@opindex Wno-attributes
@opindex Wattributes
complex; GCC will refuse to optimize programs when the optimization
itself is likely to take inordinate amounts of time.
-@item -Wno-pointer-sign
+@item -Wpointer-sign
+@opindex Wpointer-sign
@opindex Wno-pointer-sign
-Don't warn for pointer argument passing or assignment with different signedness.
-Only useful in the negative form since this warning is enabled by default.
-This option is only supported for C and Objective-C@.
+Warn for pointer argument passing or assignment with different signedness.
+This option is only supported for C and Objective-C@. It is implied by
+@option{-Wall} and by @option{-pedantic}, which can be disabled with
+@option{-Wno-pointer-sign}.
@item -Werror
@opindex Werror
Make all warnings into errors.
+@item -Werror=
+@opindex Werror=
+Make the specified warning into an errors. The specifier for a
+warning is appended, for example @option{-Werror=switch} turns the
+warnings controlled by @option{-Wswitch} into errors. This switch
+takes a negative form, to be used to negate @option{-Werror} for
+specific warnings, for example @option{-Wno-error=switch} makes
+@option{-Wswitch} warnings not be errors, even when @option{-Werror}
+is in effect. You can use the @option{-fdiagnostics-show-option}
+option to have each controllable warning amended with the option which
+controls it, to determine what to use with this option.
+
+Note that specifying @option{-Werror=}@var{foo} automatically implies
+@option{-W}@var{foo}. However, @option{-Wno-error=}@var{foo} does not
+imply anything.
+
@item -Wstack-protector
+@opindex Wstack-protector
This option is only active when @option{-fstack-protector} is active. It
warns about functions that will not be protected against stack smashing.
+@item -Wstring-literal-comparison
+@opindex Wstring-literal-comparison
+Warn about suspicious comparisons to string literal constants. In C,
+direct comparisons against the memory address of a string literal, such
+as @code{if (x == "abc")}, typically indicate a programmer error, and
+even when intentional, result in unspecified behavior and are not portable.
+Usually these warnings alert that the programmer intended to use
+@code{strcmp}. This warning is enabled by @option{-Wall}.
+
+@item -Woverlength-strings
+@opindex Woverlength-strings
+Warn about string constants which are longer than the ``minimum
+maximum'' length specified in the C standard. Modern compilers
+generally allow string constants which are much longer than the
+standard's minimum limit, but very portable programs should avoid
+using longer strings.
+
+The limit applies @emph{after} string constant concatenation, and does
+not count the trailing NUL@. In C89, the limit was 509 characters; in
+C99, it was raised to 4095. C++98 does not specify a normative
+minimum maximum, so we do not diagnose overlength strings in C++@.
+
+This option is implied by @option{-pedantic}, and can be disabled with
+@option{-Wno-overlength-strings}.
@end table
@node Debugging Options
and inlining decisions.
@end table
-@item -fdump-tree-@var{switch} @r{(C and C++ only)}
-@itemx -fdump-tree-@var{switch}-@var{options} @r{(C and C++ only)}
+@item -fdump-tree-@var{switch}
+@itemx -fdump-tree-@var{switch}-@var{options}
@opindex fdump-tree
Control the dumping at various stages of processing the intermediate
language tree to a file. The file name is generated by appending a switch
-fdelayed-branch @gol
-fguess-branch-probability @gol
-fcprop-registers @gol
--floop-optimize @gol
-fif-conversion @gol
-fif-conversion2 @gol
-ftree-ccp @gol
Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
-@item -frerun-loop-opt
-@opindex frerun-loop-opt
-Run the loop optimizer twice.
-
-Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
-
@item -fgcse
@opindex fgcse
Perform a global common subexpression elimination pass.
pass is performed after reload. The purpose of this pass is to cleanup
redundant spilling.
-@item -floop-optimize
-@opindex floop-optimize
-Perform loop optimizations: move constant expressions out of loops, simplify
-exit test conditions and optionally do strength-reduction as well.
-
-Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
-
-@item -floop-optimize2
-@opindex floop-optimize2
-Perform loop optimizations using the new loop optimizer. The optimizations
-(loop unrolling, peeling and unswitching, loop invariant motion) are enabled
-by separate flags.
-
@item -funsafe-loop-optimizations
@opindex funsafe-loop-optimizations
If given, the loop optimizer will assume that loop indices do not
Perform structural alias analysis on trees. This flag
is enabled by default at @option{-O} and higher.
+@item -fipa-pta
+Perform interprocedural pointer analysis.
+
@item -ftree-sink
Perform forward store motion on trees. This flag is
enabled by default at @option{-O} and higher.
local variables when unrolling a loop which can result in superior code.
@item -fprefetch-loop-arrays
+@itemx -fprefetch-loop-arrays-rtl
@opindex fprefetch-loop-arrays
+@opindex fprefetch-loop-arrays-rtl
If supported by the target machine, generate instructions to prefetch
memory to improve the performance of loops that access large arrays.
Parse the whole compilation unit before starting to produce code.
This allows some extra optimizations to take place but consumes
more memory (in general). There are some compatibility issues
-with @emph{unit-at-at-time} mode:
+with @emph{unit-at-a-time} mode:
@itemize @bullet
@item
enabling @emph{unit-at-a-time} mode may change the order
in which functions, variables, and top-level @code{asm} statements
are emitted, and will likely break code relying on some particular
ordering. The majority of such top-level @code{asm} statements,
-though, can be replaced by @code{section} attributes.
+though, can be replaced by @code{section} attributes. The
+@option{fno-toplevel-reorder} option may be used to keep the ordering
+used in the input file, at the cost of some optimizations.
@item
@emph{unit-at-a-time} mode removes unreferenced static variables
Enabled at levels @option{-O2}, @option{-O3}.
+@item -fno-toplevel-reorder
+Do not reorder top-level functions, variables, and @code{asm}
+statements. Output them in the same order that they appear in the
+input file. When this option is used, unreferenced static variables
+will not be removed. This option is intended to support existing code
+which relies on a particular ordering. For new code, it is better to
+use attributes.
+
@item -fweb
@opindex fweb
Constructs webs as commonly used for register allocation purposes and assign
generally profitable only with profile feedback available.
The following options are enabled: @code{-fbranch-probabilities}, @code{-fvpt},
-@code{-funroll-loops}, @code{-fpeel-loops}, @code{-ftracer},
-@code{-fno-loop-optimize}.
+@code{-funroll-loops}, @code{-fpeel-loops}, @code{-ftracer}
@end table
using C99's @code{FENV_ACCESS} pragma. This command line option
will be used to specify the default state for @code{FENV_ACCESS}.
+@item -frtl-abstract-sequences
+@opindex frtl-abstract-sequences
+It is a size optimization method. This option is to find identical
+sequences of code, which can be turned into pseudo-procedures and
+then replace all occurrences with calls to the newly created
+subroutine. It is kind of an opposite of @option{-finline-functions}.
+This optimization runs at RTL level.
+
@item -fsignaling-nans
@opindex fsignaling-nans
Compile code assuming that IEEE signaling NaNs may generate user-visible
@item -fmove-loop-invariants
@opindex fmove-loop-invariants
-Enables the loop invariant motion pass in the new loop optimizer. Enabled
+Enables the loop invariant motion pass in the RTL loop optimizer. Enabled
at level @option{-O1}
@item -funswitch-loops
of the loop on both branches (modified according to result of the condition).
@item -fprefetch-loop-arrays
+@itemx -fprefetch-loop-arrays-rtl
@opindex fprefetch-loop-arrays
+@opindex fprefetch-loop-arrays-rtl
If supported by the target machine, generate instructions to prefetch
memory to improve the performance of loops that access large arrays.
@item -fstack-protector-all
Like @option{-fstack-protector} except that all functions are protected.
+@item -fsection-anchors
+@opindex fsection-anchors
+Try to reduce the number of symbolic address calculations by using
+shared ``anchor'' symbols to address nearby objects. This transformation
+can help to reduce the number of GOT entries and GOT accesses on some
+targets.
+
+For example, the implementation of the following function @code{foo}:
+
+@smallexample
+static int a, b, c;
+int foo (void) @{ return a + b + c; @}
+@end smallexample
+
+would usually calculate the addresses of all three variables, but if you
+compile it with @option{-fsection-anchors}, it will access the variables
+from a common anchor point instead. The effect is similar to the
+following pseudocode (which isn't valid C):
+
+@smallexample
+int foo (void)
+@{
+ register int *xr = &x;
+ return xr[&a - &x] + xr[&b - &x] + xr[&c - &x];
+@}
+@end smallexample
+
+Not all targets support this option.
+
@item --param @var{name}=@var{value}
@opindex param
In some places, GCC uses various constants to control the amount of
structure accesses for which structure aliasing will consider trying
to track each field. The default is 5
+@item salias-max-array-elements
+The maximum number of elements an array can have and its elements
+still be tracked individually by structure aliasing. The default is 4
+
@item sra-max-structure-size
The maximum structure size, in bytes, at which the scalar replacement
of aggregates (SRA) optimization will perform block copies. The
large units consisting of small inlininable functions however the overall unit
growth limit is needed to avoid exponential explosion of code size. Thus for
smaller units, the size is increased to @option{--param large-unit-insns}
-before aplying @option{--param inline-unit-growth}. The default is 10000
+before applying @option{--param inline-unit-growth}. The default is 10000
@item inline-unit-growth
Specifies maximal overall growth of the compilation unit caused by inlining.
The maximum number of insns in a region to be considered for
interblock scheduling. The default value is 100.
-@item min-sched-prob
-The minimum probability of reaching a source block for interblock
-speculative scheduling. The default value is 40.
+@item min-spec-prob
+The minimum probability (in percents) of reaching a source block
+for interblock speculative scheduling. The default value is 40.
@item max-last-value-rtl
@item max-jump-thread-duplication-stmts
Maximum number of statements allowed in a block that needs to be
duplicated when threading jumps.
+
+@item max-fields-for-field-sensitive
+Maximum number of fields in a structure we will treat in
+a field sensitive manner during pointer analysis.
+
@end table
@end table
@item %I
Substitute any of @option{-iprefix} (made from @env{GCC_EXEC_PREFIX}),
-@option{-isysroot} (made from @env{TARGET_SYSTEM_ROOT}), and
+@option{-isysroot} (made from @env{TARGET_SYSTEM_ROOT}),
@option{-isystem} (made from @env{COMPILER_PATH} and @option{-B} options)
-as necessary.
+and @option{-imultilib} as necessary.
@item %s
Current argument is the name of a library or startup file of some sort.
* DEC Alpha Options::
* DEC Alpha/VMS Options::
* FRV Options::
+* GNU/Linux Options::
* H8/300 Options::
* HPPA Options::
* i386 and x86-64 Options::
* MIPS Options::
* MMIX Options::
* MN10300 Options::
-* MS1 Options::
+* MT Options::
* PDP-11 Options::
* PowerPC Options::
* RS/6000 and PowerPC Options::
@end table
+@node GNU/Linux Options
+@subsection GNU/Linux Options
+
+These @samp{-m} options are defined for GNU/Linux targets:
+
+@table @gcctabopt
+@item -mglibc
+@opindex mglibc
+Use the GNU C library instead of uClibc. This is the default except
+on @samp{*-*-linux-*uclibc*} targets.
+
+@item -muclibc
+@opindex muclibc
+Use uClibc instead of the GNU C library. This is the default on
+@samp{*-*-linux-*uclibc*} targets.
+@end table
+
@node H8/300 Options
@subsection H8/300 Options
for the ABI and the set of available instructions. The choices for
@var{cpu-type} are:
@table @emph
+@item generic
+Produce code optimized for the most common IA32/AMD64/EM64T processors.
+If you know the CPU on which your code will run, then you should use
+the corresponding @option{-mtune} option instead of
+@option{-mtune=generic}. But, if you do not know exactly what CPU users
+of your application will have, then you should use this option.
+
+As new processors are deployed in the marketplace, the behavior of this
+option will change. Therefore, if you upgrade to a newer version of
+GCC, the code generated option will change to reflect the processors
+that were most common when that version of GCC was released.
+
+There is no @option{-march=generic} option because @option{-march}
+indicates the instruction set the compiler can use, and there is no
+generic instruction set applicable to all processors. In contrast,
+@option{-mtune} indicates the processor (or, in this case, collection of
+processors) for which the code is optimized.
@item i386
Original Intel's i386 CPU@.
@item i486
Intel Pentium CPU with no MMX support.
@item pentium-mmx
Intel PentiumMMX CPU based on Pentium core with MMX instruction set support.
-@item i686, pentiumpro
+@item pentiumpro
Intel PentiumPro CPU@.
+@item i686
+Same as @code{generic}, but when used as @code{march} option, PentiumPro
+instruction set will be used, so the code will run on all i686 familly chips.
@item pentium2
Intel Pentium2 CPU based on PentiumPro core with MMX instruction set support.
@item pentium3, pentium3m
@opindex masm=@var{dialect}
Output asm instructions using selected @var{dialect}. Supported
choices are @samp{intel} or @samp{att} (the default one). Darwin does
-not support intel.
+not support @samp{intel}.
@item -mieee-fp
@itemx -mno-ieee-fp
the file containing the CPU detection code should be compiled without
these options.
+@item -msselibm
+@opindex msselibm
+Use special versions of certain libm routines that come with an SSE
+ABI and an SSE implementation. Useful together with @option{-mfpmath=sse}
+to avoid moving values between SSE registers and the x87 FP stack.
+
@item -mpush-args
@itemx -mno-push-args
@opindex mpush-args
Use this option for microcontroller with a 5200 core, including
the MCF5202, MCF5203, MCF5204 and MCF5202.
+@item -mcfv4e
+@opindex mcfv4e
+Generate output for a ColdFire V4e family cpu (e.g.@: 547x/548x).
+This includes use of hardware floating point instructions.
@item -m68020-40
@opindex m68020-40
This option makes symbolic debugging impossible.
@end table
-@node MS1 Options
-@subsection MS1 Options
-@cindex MS1 options
+@node MT Options
+@subsection MT Options
+@cindex MT options
-These @option{-m} options are defined for Morpho MS1 architectures:
+These @option{-m} options are defined for Morpho MT architectures:
@table @gcctabopt
@opindex march
Generate code that will run on @var{cpu-type}, which is the name of a system
representing a certain processor type. Possible values for
-@var{cpu-type} are @samp{MS1-64-001}, @samp{MS1-16-002}, and
-@samp{MS1-16-003}.
-
-When this option is not used, the default is @option{-march=MS1-16-003}.
+@var{cpu-type} are @samp{ms1-64-001}, @samp{ms1-16-002},
+@samp{ms1-16-003} and @samp{ms2}.
-@item -mmul
-@opindex mmul
-Generate multiply instructions.
-
-@item -mno-mul
-@opindex mno-mul
-Do not generate multiply instructions.
+When this option is not used, the default is @option{-march=ms1-16-002}.
@item -mbacc
@opindex mbacc
@option{-mhard-float}, @option{-mmfcrf}, @option{-mmultiple},
@option{-mnew-mnemonics}, @option{-mpopcntb}, @option{-mpower},
@option{-mpower2}, @option{-mpowerpc64}, @option{-mpowerpc-gpopt},
-@option{-mpowerpc-gfxopt}, @option{-mstring}. The particular options
+@option{-mpowerpc-gfxopt}, @option{-mstring}, @option{-mmulhw}.
+The particular options
set for any particular CPU will vary between compiler versions,
depending on what setting seems to produce optimal code for that CPU;
it doesn't necessarily reflect the actual hardware's capabilities. If
@opindex mno-vrsave
Generate VRSAVE instructions when generating AltiVec code.
-@item -mabi=spe
-@opindex mabi=spe
-Extend the current ABI with SPE ABI extensions. This does not change
-the default ABI, instead it adds the SPE ABI extensions to the current
-ABI@.
-
-@item -mabi=no-spe
-@opindex mabi=no-spe
-Disable Booke SPE ABI extensions for the current ABI@.
-
@item -msecure-plt
@opindex msecure-plt
Generate code that allows ld and ld.so to build executables and shared
@itemx -mno-xl-compat
@opindex mxl-compat
@opindex mno-xl-compat
-Produce code that conforms more closely to IBM XLC semantics when using
-AIX-compatible ABI. Pass floating-point arguments to prototyped
-functions beyond the register save area (RSA) on the stack in addition
-to argument FPRs. Do not assume that most significant double in 128
-bit long double value is properly rounded when comparing values.
+Produce code that conforms more closely to IBM XL compiler semantics
+when using AIX-compatible ABI. Pass floating-point arguments to
+prototyped functions beyond the register save area (RSA) on the stack
+in addition to argument FPRs. Do not assume that most significant
+double in 128-bit long double value is properly rounded when comparing
+values and converting to double. Use XL symbol names for long double
+support routines.
The AIX calling convention was extended but not initially documented to
handle an obscure K&R C case of calling a function that takes the
-address of its arguments with fewer arguments than declared. AIX XL
+address of its arguments with fewer arguments than declared. IBM XL
compilers access floating point arguments which do not fit in the
RSA from the stack when a subroutine is compiled without
optimization. Because always storing floating-point arguments on the
stack is inefficient and rarely needed, this option is not enabled by
-default and only is necessary when calling subroutines compiled by AIX
+default and only is necessary when calling subroutines compiled by IBM
XL compilers without optimization.
@item -mpe
accumulate instructions. These instructions are generated by default if
hardware floating is used.
+@item -mmulhw
+@itemx -mno-mulhw
+@opindex mmulhw
+@opindex mno-mulhw
+Generate code that uses (does not use) the half-word multiply and
+multiply-accumulate instructions on the IBM 405 and 440 processors.
+These instructions are generated by default when targetting those
+processors.
+
@item -mno-bit-align
@itemx -mbit-align
@opindex mno-bit-align
@opindex mabi
Extend the current ABI with a particular extension, or remove such extension.
Valid values are @var{altivec}, @var{no-altivec}, @var{spe},
-@var{no-spe}@.
+@var{no-spe}, @var{ibmlongdouble}, @var{ieeelongdouble}@.
+
+@item -mabi=spe
+@opindex mabi=spe
+Extend the current ABI with SPE ABI extensions. This does not change
+the default ABI, instead it adds the SPE ABI extensions to the current
+ABI@.
+
+@item -mabi=no-spe
+@opindex mabi=no-spe
+Disable Booke SPE ABI extensions for the current ABI@.
+
+@item -mabi=ibmlongdouble
+@opindex mabi=ibmlongdouble
+Change the current ABI to use IBM extended precision long double.
+This is a PowerPC 32-bit SYSV ABI option.
+
+@item -mabi=ieeelongdouble
+@opindex mabi=ieeelongdouble
+Change the current ABI to use IEEE extended precision long double.
+This is a PowerPC 32-bit Linux ABI option.
@item -mprototype
@itemx -mno-prototype
@item -msdata-data
@opindex msdata-data
-On System V.4 and embedded PowerPC systems, put small global and static
-data in the @samp{.sdata} section. Put small uninitialized global and
-static data in the @samp{.sbss} section. Do not use register @code{r13}
+On System V.4 and embedded PowerPC systems, put small global
+data in the @samp{.sdata} section. Put small uninitialized global
+data in the @samp{.sbss} section. Do not use register @code{r13}
to address small data however. This is the default behavior unless
other @option{-msdata} options are used.
operations. When @option{-mhard-float} is specified, the compiler
generates IEEE floating-point instructions. This is the default.
+@item -mlong-double-64
+@itemx -mlong-double-128
+@opindex mlong-double-64
+@opindex mlong-double-128
+These switches control the size of @code{long double} type. A size
+of 64bit makes the @code{long double} type equivalent to the @code{double}
+type. This is the default.
+
@item -mbackchain
@itemx -mno-backchain
@opindex mbackchain
option sets flags for both the preprocessor and linker. This option does
not affect the thread safety of object code produced by the compiler or
that of libraries supplied with it.
+
+@item -pthread
+@opindex pthread
+This is a synonym for @option{-pthreads}.
@end table
@node System V Options
code that is not binary compatible with code generated without that switch.
Use it to conform to a non-default application binary interface.
-@item -fshared-data
-@opindex fshared-data
-Requests that the data and non-@code{const} variables of this
-compilation be shared data rather than private data. The distinction
-makes sense only on certain operating systems, where shared data is
-shared between processes running the same program, while private data
-exists in one copy per process.
-
@item -fno-common
@opindex fno-common
In C, allocate even uninitialized global variables in the data section of the
but not for the Sun 386i. Code generated for the IBM RS/6000 is always
position-independent.
+When this flag is set, the macros @code{__pic__} and @code{__PIC__}
+are defined to 1.
+
@item -fPIC
@opindex fPIC
If supported for the target machine, emit position-independent code,
Position-independent code requires special support, and therefore works
only on certain machines.
+When this flag is set, the macros @code{__pic__} and @code{__PIC__}
+are defined to 2.
+
@item -fpie
@itemx -fPIE
@opindex fpie
An overview of these techniques, their benefits and how to use them
is at @w{@uref{http://gcc.gnu.org/wiki/Visibility}}.
+@item -fopenmp
+@opindex fopenmp
+@cindex openmp parallel
+Enable handling of OpenMP directives @code{#pragma omp} in C/C++ and
+@code{!$omp} in Fortran. When @option{-fopenmp} is specified, the
+compiler generates parallel code according to the OpenMP Application
+Program Interface v2.5 @w{@uref{http://www.openmp.org/}}.
+
@end table
@c man end