-fno-nonansi-builtins -fno-operator-names @gol
-fno-optional-diags -fpermissive @gol
-frepo -fno-rtti -fstats -ftemplate-depth-@var{n} @gol
--fuse-cxa-atexit -fvtable-gc -fno-weak -nostdinc++ @gol
+-fuse-cxa-atexit -fno-weak -nostdinc++ @gol
-fno-default-inline -Wabi -Wctor-dtor-privacy @gol
-Wnon-virtual-dtor -Wreorder @gol
-Weffc++ -Wno-deprecated @gol
@item Objective-C Language Options
@xref{Objective-C Dialect Options,,Options Controlling Objective-C Dialect}.
-@gccoptlist{-fconstant-string-class=@var{class-name} @gol
--fgnu-runtime -fnext-runtime -gen-decls @gol
+@gccoptlist{
+-fconstant-string-class=@var{class-name} @gol
+-fgnu-runtime -fnext-runtime @gol
+-fno-nil-receivers @gol
+-fobjc-exceptions @gol
+-freplace-objc-classes @gol
+-fzero-link @gol
+-gen-decls @gol
-Wno-protocol -Wselector -Wundeclared-selector}
@item Language Independent Options
-w -Wextra -Wall -Waggregate-return @gol
-Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment @gol
-Wconversion -Wno-deprecated-declarations @gol
--Wdisabled-optimization -Wno-div-by-zero -Werror @gol
+-Wdisabled-optimization -Wno-div-by-zero -Wendif-labels @gol
+-Werror -Werror-implicit-function-declaration @gol
-Wfloat-equal -Wformat -Wformat=2 @gol
--Wformat-nonliteral -Wformat-security @gol
--Wimplicit -Wimplicit-int @gol
--Wimplicit-function-declaration @gol
--Werror-implicit-function-declaration @gol
--Wimport -Winline -Winvalid-pch -Wno-endif-labels @gol
--Wno-invalid-offsetof @gol
+-Wno-format-extra-args -Wformat-nonliteral @gol
+-Wformat-security -Wno-format-y2k @gol
+-Wimplicit -Wimplicit-function-declaration -Wimplicit-int @gol
+-Wimport -Wno-import -Winit-self -Winline @gol
+-Wno-invalid-offsetof -Winvalid-pch @gol
-Wlarger-than-@var{len} -Wlong-long @gol
-Wmain -Wmissing-braces @gol
-Wmissing-format-attribute -Wmissing-noreturn @gol
--Wno-multichar -Wno-format-extra-args -Wno-format-y2k @gol
--Wno-import -Wnonnull -Wpacked -Wpadded @gol
+-Wno-multichar -Wnonnull -Wpacked -Wpadded @gol
-Wparentheses -Wpointer-arith -Wredundant-decls @gol
-Wreturn-type -Wsequence-point -Wshadow @gol
-Wsign-compare -Wstrict-aliasing @gol
@item C-only Warning Options
@gccoptlist{-Wbad-function-cast -Wmissing-declarations @gol
--Wmissing-prototypes -Wnested-externs @gol
--Wstrict-prototypes -Wtraditional}
+-Wmissing-prototypes -Wnested-externs -Wold-style-definition @gol
+-Wstrict-prototypes -Wtraditional @gol
+-Wdeclaration-after-statement}
@item Debugging Options
@xref{Debugging Options,,Options for Debugging Your Program or GCC}.
-fdump-tree-optimized@r{[}-@var{n}@r{]} @gol
-fdump-tree-inlined@r{[}-@var{n}@r{]} @gol
-feliminate-dwarf2-dups -feliminate-unused-debug-types @gol
--fmem-report -fprofile-arcs @gol
+-feliminate-unused-debug-symbols -fmem-report -fprofile-arcs @gol
-frandom-seed=@var{string} -fsched-verbose=@var{n} @gol
-ftest-coverage -ftime-report @gol
-g -g@var{level} -gcoff -gdwarf -gdwarf-1 -gdwarf-1+ -gdwarf-2 @gol
@xref{Optimize Options,,Options that Control Optimization}.
@gccoptlist{-falign-functions=@var{n} -falign-jumps=@var{n} @gol
-falign-labels=@var{n} -falign-loops=@var{n} @gol
--fbranch-probabilities -fcaller-saves -fcprop-registers @gol
+-fbranch-probabilities -fprofile-values -fbranch-target-load-optimize @gol
+-fbranch-target-load-optimize2 -fcaller-saves -fcprop-registers @gol
-fcse-follow-jumps -fcse-skip-blocks -fdata-sections @gol
-fdelayed-branch -fdelete-null-pointer-checks @gol
-fexpensive-optimizations -ffast-math -ffloat-store @gol
-fforce-addr -fforce-mem -ffunction-sections @gol
--fgcse -fgcse-lm -fgcse-sm -floop-optimize -fcrossjumping @gol
--fif-conversion -fif-conversion2 @gol
+-fgcse -fgcse-lm -fgcse-sm -fgcse-las -floop-optimize @gol
+-fcrossjumping -fif-conversion -fif-conversion2 @gol
-finline-functions -finline-limit=@var{n} -fkeep-inline-functions @gol
-fkeep-static-consts -fmerge-constants -fmerge-all-constants @gol
-fmove-all-movables -fnew-ra -fno-branch-count-reg @gol
-freduce-all-givs -fregmove -frename-registers @gol
-freorder-blocks -freorder-functions @gol
-frerun-cse-after-loop -frerun-loop-opt @gol
--fschedule-insns -fschedule-insns2 @gol
+-frounding-math -fschedule-insns -fschedule-insns2 @gol
-fno-sched-interblock -fno-sched-spec -fsched-spec-load @gol
--fsched-spec-load-dangerous -fsched2-use-superblocks @gol
+-fsched-spec-load-dangerous @gol
+-fsched-stalled-insns=@var{n} -sched-stalled-insns-dep=@var{n} @gol
+-fsched2-use-superblocks @gol
-fsched2-use-traces -fsignaling-nans @gol
-fsingle-precision-constant -fssa -fssa-ccp -fssa-dce @gol
-fstrength-reduce -fstrict-aliasing -ftracer -fthread-jumps @gol
-include @var{file} -imacros @var{file} @gol
-iprefix @var{file} -iwithprefix @var{dir} @gol
-iwithprefixbefore @var{dir} -isystem @var{dir} @gol
--M -MM -MF -MG -MP -MQ -MT -nostdinc -P -remap @gol
+-M -MM -MF -MG -MP -MQ -MT -nostdinc @gol
+-P -fworking-directory -remap @gol
-trigraphs -undef -U@var{macro} -Wp,@var{option} @gol
-Xpreprocessor @var{option}}
@item Linker Options
@xref{Link Options,,Options for Linking}.
@gccoptlist{@var{object-file-name} -l@var{library} @gol
--nostartfiles -nodefaultlibs -nostdlib @gol
+-nostartfiles -nodefaultlibs -nostdlib -pie @gol
-s -static -static-libgcc -shared -shared-libgcc -symbolic @gol
-Wl,@var{option} -Xlinker @var{option} @gol
-u @var{symbol}}
-mapp-regs -mbroken-saverestore -mcypress @gol
-mfaster-structs -mflat @gol
-mfpu -mhard-float -mhard-quad-float @gol
--mimpure-text -mlive-g0 -mno-app-regs @gol
+-mimpure-text -mlittle-endian -mlive-g0 -mno-app-regs @gol
-mno-faster-structs -mno-flat -mno-fpu @gol
-mno-impure-text -mno-stack-bias -mno-unaligned-doubles @gol
-msoft-float -msoft-quad-float -msparclite -mstack-bias @gol
@emph{MN10300 Options}
@gccoptlist{-mmult-bug -mno-mult-bug @gol
-mam33 -mno-am33 @gol
+-mam33-2 -mno-am33-2 @gol
-mno-crt0 -mrelax}
@emph{M32R/D Options}
-mno-relocatable -mrelocatable-lib -mno-relocatable-lib @gol
-mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian @gol
-mdynamic-no-pic @gol
+-mprioritize-restricted-insns=@var{priority} @gol
+-msched-costly-dep=@var{dependence_type} @gol
-mcall-sysv -mcall-netbsd @gol
-maix-struct-return -msvr4-struct-return @gol
-mabi=altivec -mabi=no-altivec @gol
-force_flat_namespace -headerpad_max_install_names @gol
-image_base -init -install_name -keep_private_externs @gol
-multi_module -multiply_defined -multiply_defined_unused @gol
--noall_load -nomultidefs -noprebind -noseglinkedit @gol
+-noall_load -nofixprebinding -nomultidefs -noprebind -noseglinkedit @gol
-pagezero_size -prebind -prebind_all_twolevel_modules @gol
-private_bundle -read_only_relocs -sectalign @gol
-sectobjectsymbols -whyload -seg1addr @gol
@gccoptlist{-mabicalls -march=@var{cpu-type} -mtune=@var{cpu=type} @gol
-mcpu=@var{cpu-type} -membedded-data -muninit-const-in-rodata @gol
-membedded-pic -mfp32 -mfp64 -mfused-madd -mno-fused-madd @gol
--mgas -mgp32 -mgp64 @gol
--mgpopt -mhalf-pic -mhard-float -mint64 -mips1 @gol
+-mgas -mgp32 -mgp64 -mhard-float -mint64 -mips1 @gol
-mips2 -mips3 -mips4 -mips32 -mips32r2 -mips64 @gol
-mlong64 -mlong32 -mlong-calls -mmemcpy @gol
--mmips-as -mmips-tfile -mno-abicalls @gol
+-mmips-as -mmips-tfile -mno-abicalls -mxgot @gol
-mno-embedded-data -mno-uninit-const-in-rodata @gol
--mno-embedded-pic -mno-gpopt -mno-long-calls @gol
--mno-memcpy -mno-mips-tfile -mno-rnames -mno-stats @gol
+-mno-embedded-pic -mno-long-calls @gol
+-mno-memcpy -mno-mips-tfile -mno-rnames @gol
-mrnames -msoft-float @gol
-m4650 -msingle-float -mmad @gol
-EL -EB -G @var{num} -nocpp @gol
-mabi=32 -mabi=n32 -mabi=64 -mabi=eabi -mabi-fake-default @gol
--mfix7000 -mno-crt0 -mflush-func=@var{func} -mno-flush-func @gol
+-mfix7000 -mfix-sb1 -mno-fix-sb1 @gol
+-mno-crt0 -mflush-func=@var{func} -mno-flush-func @gol
-mbranch-likely -mno-branch-likely}
@emph{i386 and x86-64 Options}
-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 -m3dnow @gol
+-mmmx -msse -msse2 -mpni -m3dnow @gol
-mthreads -mno-align-stringops -minline-all-stringops @gol
-mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol
-m96bit-long-double -mregparm=@var{num} -momit-leaf-frame-pointer @gol
--mno-red-zone @gol
+-mno-red-zone -mno-tls-direct-seg-refs @gol
-mcmodel=@var{code-model} @gol
-m32 -m64}
-mtda=@var{n} -msda=@var{n} -mzda=@var{n} @gol
-mapp-regs -mno-app-regs @gol
-mdisable-callt -mno-disable-callt @gol
+-mv850e1 @gol
-mv850e @gol
-mv850 -mbig-switch}
@gccoptlist{-mtune=@var{cpu-type} -march=@var{cpu-type} @gol
-mhard-float -msoft-float -mbackchain -mno-backchain @gol
-msmall-exec -mno-small-exec -mmvcle -mno-mvcle @gol
--m64 -m31 -mdebug -mno-debug -mesa -mzarch}
+-m64 -m31 -mdebug -mno-debug -mesa -mzarch -mfused-madd -mno-fused-madd}
@emph{CRIS Options}
@gccoptlist{-mcpu=@var{cpu} -march=@var{cpu} -mtune=@var{cpu} @gol
@gccoptlist{-msim}
@emph{Xtensa Options}
-@gccoptlist{-mbig-endian -mlittle-endian @gol
--mdensity -mno-density @gol
--mconst16 -mno-const16 @gol
--mabs -mno-abs @gol
--maddx -mno-addx @gol
--mmac16 -mno-mac16 @gol
--mmul16 -mno-mul16 @gol
--mmul32 -mno-mul32 @gol
--mnsa -mno-nsa @gol
--mminmax -mno-minmax @gol
--msext -mno-sext @gol
--mbooleans -mno-booleans @gol
--mhard-float -msoft-float @gol
+@gccoptlist{-mconst16 -mno-const16 @gol
-mfused-madd -mno-fused-madd @gol
-mtext-section-literals -mno-text-section-literals @gol
-mtarget-align -mno-target-align @gol
-fasynchronous-unwind-tables @gol
-finhibit-size-directive -finstrument-functions @gol
-fno-common -fno-ident -fno-gnu-linker @gol
--fpcc-struct-return -fpic -fPIC @gol
+-fpcc-struct-return -fpic -fPIC -fpie -fPIE @gol
-freg-struct-return -fshared-data -fshort-enums @gol
-fshort-double -fshort-wchar @gol
-fverbose-asm -fpack-struct -fstack-check @gol
@section Options Controlling the Kind of Output
Compilation can involve up to four stages: preprocessing, compilation
-proper, assembly and linking, always in that order. The first three
-stages apply to an individual source file, and end by producing an
-object file; linking combines all the object files (those newly
-compiled, and those specified as input) into an executable file.
+proper, assembly and linking, always in that order. GCC is capable of
+preprocessing and compiling several files either into several
+assembler input files, or into one assembler input file; then each
+assembler input file produces an object file, and linking combines all
+the object files (those newly compiled, and those specified as input)
+into an executable file.
@cindex file name suffix
For any given input file, the file name suffix determines what kind of
sort of output is being produced, whether it be an executable file,
an object file, an assembler file or preprocessed C code.
-Since only one output file can be specified, it does not make sense to
-use @option{-o} when compiling more than one input file, unless you are
-producing an executable file as output.
+If you specify @option{-o} when compiling more than one input file, or
+you are producing an executable file as output, all the source files
+on the command line will be compiled at once.
If @option{-o} is not specified, the default is to put an executable file
in @file{a.out}, the object file for @file{@var{source}.@var{suffix}} in
@item -fpermissive
@opindex fpermissive
-Downgrade messages about nonconformant code from errors to warnings. By
-default, G++ effectively sets @option{-pedantic-errors} without
-@option{-pedantic}; this option reverses that. This behavior and this
-option are superseded by @option{-pedantic}, which works as it does for GNU C@.
+Downgrade some diagnostics about nonconformant code from errors to
+warnings. Thus, using @option{-fpermissive} will allow some
+nonconforming code to compile.
@item -frepo
@opindex frepo
destructors, but will only work if your C library supports
@code{__cxa_atexit}.
-@item -fvtable-gc
-@opindex fvtable-gc
-Emit special relocations for vtables and virtual function references
-so that the linker can identify unused virtual functions and zero out
-vtable slots that refer to them. This is most useful with
-@option{-ffunction-sections} and @option{-Wl,--gc-sections}, in order to
-also discard the functions themselves.
-
-This optimization requires GNU as and GNU ld. Not all systems support
-this option. @option{-Wl,--gc-sections} is ignored without @option{-static}.
-
@item -fno-weak
@opindex fno-weak
Do not use weak symbol support, even if it is provided by the linker.
@item -Wctor-dtor-privacy @r{(C++ only)}
@opindex Wctor-dtor-privacy
-Warn when a class seems unusable, because all the constructors or
-destructors in a class are private and the class has no friends or
+Warn when a class seems unusable because all the constructors or
+destructors in that class are private, and it has neither friends nor
public static member functions.
@item -Wnon-virtual-dtor @r{(C++ only)}
@opindex Wnon-virtual-dtor
-Warn when a class declares a non-virtual destructor that should probably
-be virtual, because it looks like the class will be used polymorphically.
+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}.
@item -Wreorder @r{(C++ only)}
@};
@end smallexample
-Here the compiler will warn that the member initializers for @samp{i}
-and @samp{j} will be rearranged to match the declaration order of the
-members. This warning is enabled by @option{-Wall}.
+The compiler will rearrange the member initializers for @samp{i}
+and @samp{j} to match the declaration order of the members, emitting
+a warning to that effect. This warning is enabled by @option{-Wall}.
@end table
The following @option{-W@dots{}} options are not affected by @option{-Wall}.
@end itemize
-and about violations of the following style guidelines from Scott Meyers'
-@cite{More Effective C++} book:
+Also warn about violations of the following style guidelines from
+Scott Meyers' @cite{More Effective C++} book:
@itemize @bullet
@item
@end itemize
-If you use this option, you should be aware that the standard library
-headers do not obey all of these guidelines; you can use @samp{grep -v}
+When selecting this option, be aware that the standard library
+headers do not obey all of these guidelines; use @samp{grep -v}
to filter out those warnings.
@item -Wno-deprecated @r{(C++ only)}
@item -Wno-non-template-friend @r{(C++ only)}
@opindex Wno-non-template-friend
Disable warnings when non-templatized friend functions are declared
-within a template. With the advent of explicit template specification
+within a template. Since the advent of explicit template specification
support in G++, if the name of the friend is an unqualified-id (i.e.,
@samp{friend foo(int)}), the C++ language specification demands that the
friend declare or define an ordinary, nontemplate function. (Section
could be interpreted as a particular specialization of a templatized
function. Because this non-conforming behavior is no longer the default
behavior for G++, @option{-Wnon-template-friend} allows the compiler to
-check existing code for potential trouble spots, and is on by default.
+check existing code for potential trouble spots and is on by default.
This new compiler behavior can be turned off with
@option{-Wno-non-template-friend} which keeps the conformant compiler code
but disables the helpful warning.
Warn if an old-style (C-style) cast to a non-void type is used within
a C++ program. The new-style casts (@samp{static_cast},
@samp{reinterpret_cast}, and @samp{const_cast}) are less vulnerable to
-unintended effects, and much easier to grep for.
+unintended effects and much easier to search for.
@item -Woverloaded-virtual @r{(C++ only)}
@opindex Woverloaded-virtual
@end smallexample
the @code{A} class version of @code{f} is hidden in @code{B}, and code
-like this:
+like:
@smallexample
B* b;
@item -Wsign-promo @r{(C++ only)}
@opindex Wsign-promo
Warn when overload resolution chooses a promotion from unsigned or
-enumeral type to a signed type over a conversion to an unsigned type of
+enumeral type to a signed type, over a conversion to an unsigned type of
the same size. Previous versions of G++ would try to preserve
unsignedness, but the standard mandates the current behavior.
@cindex compiler options, Objective-C
@cindex Objective-C options, command line
@cindex options, Objective-C
+(NOTE: This manual does not describe the Objective-C language itself. See
+@w{@uref{http://gcc.gnu.org/readings.html}} for references.)
+
This section describes the command-line options that are only meaningful
-for Objective-C programs; but you can also use most of the GNU compiler
+for Objective-C programs, but you can also use most of the GNU compiler
options regardless of what language your program is in. For example,
you might compile a file @code{some_class.m} like this:
@end example
@noindent
-In this example, only @option{-fgnu-runtime} is an option meant only for
+In this example, @option{-fgnu-runtime} is an option meant only for
Objective-C programs; you can use the other options with any language
supported by GCC@.
@opindex fconstant-string-class
Use @var{class-name} as the name of the class to instantiate for each
literal string specified with the syntax @code{@@"@dots{}"}. The default
-class name is @code{NXConstantString}.
+class name is @code{NXConstantString} if the GNU runtime is being used, and
+@code{NSConstantString} if the NeXT runtime is being used (see below). The
+@option{-fconstant-cfstrings} option, if also present, will override the
+@option{-fconstant-string-class} setting and cause @code{@@"@dots{}"} literals
+to be laid out as constant CoreFoundation strings.
@item -fgnu-runtime
@opindex fgnu-runtime
@code{__NEXT_RUNTIME__} is predefined if (and only if) this option is
used.
+@item -fno-nil-receivers
+@opindex -fno-nil-receivers
+Assume that all Objective-C message dispatches (e.g.,
+@code{[receiver message:arg]}) in this translation unit ensure that the receiver
+is not @code{nil}. This allows for more efficient entry points in the runtime to be
+used. Currently, this option is only available in conjunction with
+the NeXT runtime on Mac OS X 10.3 and later.
+
+@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.
+
+@smallexample
+ @@try @{
+ @dots{}
+ @@throw expr;
+ @dots{}
+ @}
+ @@catch (AnObjCClass *exc) @{
+ @dots{}
+ @@throw expr;
+ @dots{}
+ @@throw;
+ @dots{}
+ @}
+ @@catch (AnotherClass *exc) @{
+ @dots{}
+ @}
+ @@catch (id allOthers) @{
+ @dots{}
+ @}
+ @@finally @{
+ @dots{}
+ @@throw expr;
+ @dots{}
+ @}
+@end smallexample
+
+The @code{@@throw} statement may appear anywhere in an Objective-C or
+Objective-C++ program; when used inside of a @code{@@catch} block, the
+@code{@@throw} may appear without an argument (as shown above), in which case
+the object caught by the @code{@@catch} will be rethrown.
+
+Note that only (pointers to) Objective-C objects may be thrown and
+caught using this scheme. When an object is thrown, it will be caught
+by the nearest @code{@@catch} clause capable of handling objects of that type,
+analogously to how @code{catch} blocks work in C++ and Java. A
+@code{@@catch(id @dots{})} clause (as shown above) may also be provided to catch
+any and all Objective-C exceptions not caught by previous @code{@@catch}
+clauses (if any).
+
+The @code{@@finally} clause, if present, will be executed upon exit from the
+immediately preceding @code{@@try @dots{} @@catch} section. This will happen
+regardless of whether any exceptions are thrown, caught or rethrown
+inside the @code{@@try @dots{} @@catch} section, analogously to the behavior
+of the @code{finally} clause in Java.
+
+There are several caveats to using the new exception mechanism:
+
+@itemize @bullet
+@item
+Although currently designed to be binary compatible with @code{NS_HANDLER}-style
+idioms provided by the @code{NSException} class, the new
+exceptions can only be used on Mac OS X 10.3 (Panther) and later
+systems, due to additional functionality needed in the (NeXT) Objective-C
+runtime.
+
+@item
+As mentioned above, the new exceptions do not support handling
+types other than Objective-C objects. Furthermore, when used from
+Objective-C++, the Objective-C exception model does not interoperate with C++
+exceptions at this time. This means you cannot @code{@@throw} an exception
+from Objective-C and @code{catch} it in C++, or vice versa
+(i.e., @code{throw @dots{} @@catch}).
+@end itemize
+
+The @option{-fobjc-exceptions} switch also enables the use of synchronization
+blocks for thread-safe execution:
+
+@smallexample
+ @@synchronized (ObjCClass *guard) @{
+ @dots{}
+ @}
+@end smallexample
+
+Upon entering the @code{@@synchronized} block, a thread of execution shall
+first check whether a lock has been placed on the corresponding @code{guard}
+object by another thread. If it has, the current thread shall wait until
+the other thread relinquishes its lock. Once @code{guard} becomes available,
+the current thread will place its own lock on it, execute the code contained in
+the @code{@@synchronized} block, and finally relinquish the lock (thereby
+making @code{guard} available to other threads).
+
+Unlike Java, Objective-C does not allow for entire methods to be marked
+@code{@@synchronized}. Note that throwing exceptions out of
+@code{@@synchronized} blocks is allowed, and will cause the guarding object
+to be unlocked properly.
+
+@item -freplace-objc-classes
+@opindex -freplace-objc-classes
+Emit a special marker instructing @command{ld(1)} not to statically link in
+the resulting object file, and allow @command{dyld(1)} to load it in at
+run time instead. This is used in conjunction with the Fix-and-Continue
+debugging mode, where the object file in question may be recompiled and
+dynamically reloaded in the course of program execution, without the need
+to restart the program itself. Currently, Fix-and-Continue functionality
+is only available in conjunction with the NeXT runtime on Mac OS X 10.3
+and later.
+
+@item -fzero-link
+@opindex -fzero-link
+When compiling for the NeXT runtime, the compiler ordinarily replaces calls
+to @code{objc_getClass("@dots{}")} (when the name of the class is known at
+compile time) with static class references that get initialized at load time,
+which improves run-time performance. Specifying the @option{-fzero-link} flag
+suppresses this behavior and causes calls to @code{objc_getClass("@dots{}")}
+to be retained. This is useful in Zero-Link debugging mode, since it allows
+for individual class implementations to be modified during program execution.
+
@item -gen-decls
@opindex gen-decls
Dump interface declarations for all classes seen in the source file to a
Warn if multiple methods of different types for the same selector are
found during compilation. The check is performed on the list of methods
in the final stage of compilation. Additionally, a check is performed
-that for each selector appearing in a @code{@@selector(@dots{})}
-expression, a corresponding method with that selector has been found
+for each selector appearing in a @code{@@selector(@dots{})}
+expression, and a corresponding method for that selector has been found
during compilation. Because these checks scan the method table only at
the end of compilation, these warnings are not produced if the final
stage of compilation is not reached, for example because an error is
@opindex Wundeclared-selector
Warn if a @code{@@selector(@dots{})} expression referring to an
undeclared selector is found. A selector is considered undeclared if no
-method with that name has been declared (explicitly, in an
-@code{@@interface} or @code{@@protocol} declaration, or implicitly, in
-an @code{@@implementation} section) before the
-@code{@@selector(@dots{})} expression. This option always performs its
-checks as soon as a @code{@@selector(@dots{})} expression is found
-(while @code{-Wselector} only performs its checks in the final stage of
-compilation), and so additionally enforces the coding style convention
+method with that name has been declared before the
+@code{@@selector(@dots{})} expression, either explicitly in an
+@code{@@interface} or @code{@@protocol} declaration, or implicitly in
+an @code{@@implementation} section. This option always performs its
+checks as soon as a @code{@@selector(@dots{})} expression is found,
+while @code{-Wselector} only performs its checks in the final stage of
+compilation. This also enforces the coding style convention
that methods and selectors must be declared before being used.
@c not documented because only avail via -Wp
@item -Wnonnull
@opindex Wnonnull
-Enable warning about passing a null pointer for arguments marked as
+Warn about passing a null pointer for arguments marked as
requiring a non-null value by the @code{nonnull} function attribute.
@option{-Wnonnull} is included in @option{-Wall} and @option{-Wformat}. It
can be disabled with the @option{-Wno-nonnull} option.
+@item -Winit-self @r{(C, C++, and Objective-C only)}
+@opindex Winit-self
+Warn about uninitialized variables which are initialized with themselves.
+Note this option can only be used with the @option{-Wuninitialized} option,
+which in turn only works with @option{-O1} and above.
+
+For example, GCC will warn about @code{i} being uninitialized in the
+following snippet only when @option{-Winit-self} has been specified:
+@smallexample
+@group
+int f()
+@{
+ int i = i;
+ return i;
+@}
+@end group
+@end smallexample
+
@item -Wimplicit-int
@opindex Wimplicit-int
Warn when a declaration does not specify a type.
when optimizing. If you don't specify @option{-O}, you simply won't
get these warnings.
+If you want to warn about code which uses the uninitialized value of the
+variable in its own initializer, use the @option{-Winit-self} option.
+
These warnings occur only for variables that are candidates for
register allocation. Therefore, they do not occur for a variable that
is declared @code{volatile}, or whose address is taken, or whose size
traditional C compatibility.
@end itemize
+@item -Wdeclaration-after-statement @r{(C only)}
+@opindex Wdeclaration-after-statement
+Warn when a declaration is found after a statement in a block. This
+construct, known from C++, was introduced with ISO C99 and is by default
+allowed in GCC@. It is not supported by ISO C90 and was not supported by
+GCC versions before GCC 3.0. @xref{Mixed Declarations}.
+
@item -Wundef
@opindex Wundef
Warn if an undefined identifier is evaluated in an @samp{#if} directive.
a warning if preceded by a declaration which specifies the argument
types.)
+@item -Wold-style-definition @r{(C only)}
+@opindex Wold-style-definition
+Warn if an old-style function definition is used. A warning is given
+even if there is a previous prototype.
+
@item -Wmissing-prototypes @r{(C only)}
@opindex Wmissing-prototypes
Warn if a global function is defined without a previous prototype
@item -Winline
@opindex Winline
Warn if a function can not be inlined and it was declared as inline.
+Even with this option, the compiler will not warn about failures to
+inline functions declared in system headers.
+
+The compiler uses a variety of heuristics to determine whether or not
+to inline a function. For example, the compiler takes into account
+the size of the function being inlined and the the amount of inlining
+that has already been done in the current function. Therefore,
+seemingly insignificant changes in the source program can cause the
+warnings produced by @option{-Winline} to appear or disappear.
@item -Wno-invalid-offsetof @r{(C++ only)}
@opindex Wno-invalid-offsetof
produces stabs debugging output which is not understood by DBX or SDB@.
On System V Release 4 systems this option requires the GNU assembler.
+@item -feliminate-unused-debug-symbols
+@opindex feliminate-unused-debug-symbols
+Produce debugging information in stabs format (if that is supported),
+for only symbols that are actually used.
+
@item -gstabs+
@opindex gstabs+
Produce debugging information in stabs format (if that is supported),
execution the program records how many times each branch and call is
executed and how many times it is taken or returns. When the compiled
program exits it saves this data to a file called
-@file{@var{auxname}.da} for each source file. The data may be used for
+@file{@var{auxname}.gcda} for each source file. The data may be used for
profile-directed optimizations (@option{-fbranch-probabilities}), or for
test coverage analysis (@option{-ftest-coverage}). Each object file's
@var{auxname} is generated from the name of the output file, if
explicitly specified and it is not the final executable, otherwise it is
the basename of the source file. In both cases any suffix is removed
-(e.g. @file{foo.da} for input file @file{dir/foo.c}, or
-@file{dir/foo.da} for output file specified as @option{-o dir/foo.o}).
+(e.g. @file{foo.gcda} for input file @file{dir/foo.c}, or
+@file{dir/foo.gcda} for output file specified as @option{-o dir/foo.o}).
@itemize
@item
For test coverage analysis, use @command{gcov} to produce human readable
-information from the @file{.bbg} and @file{.da} files. Refer to the
+information from the @file{.gcno} and @file{.gcda} files. Refer to the
@command{gcov} documentation for further information.
@end itemize
@need 2000
@item -ftest-coverage
@opindex ftest-coverage
-Produce a graph file that the @command{gcov} code-coverage utility
+Produce a notes file that the @command{gcov} code-coverage utility
(@pxref{Gcov,, @command{gcov}---a Test Coverage Program}) can use to
-show program coverage. Each source file's data file is called
-@file{@var{auxname}.bbg}. Refer to the @option{-fprofile-arcs} option
+show program coverage. Each source file's note file is called
+@file{@var{auxname}.gcno}. Refer to the @option{-fprofile-arcs} option
above for a description of @var{auxname} and instructions on how to
generate test coverage data. Coverage data will match the source files
more closely, if you do not optimize.
Annotate the assembler output with miscellaneous debugging information.
@item b
@opindex db
-Dump after computing branch probabilities, to @file{@var{file}.14.bp}.
+Dump after computing branch probabilities, to @file{@var{file}.16.bp}.
@item B
@opindex dB
Dump after block reordering, to @file{@var{file}.32.bbro}.
@item c
@opindex dc
-Dump after instruction combination, to the file @file{@var{file}.19.combine}.
+Dump after instruction combination, to the file @file{@var{file}.22.combine}.
@item C
@opindex dC
-Dump after the first if conversion, to the file @file{@var{file}.15.ce1}.
+Dump after the first if conversion, to the file @file{@var{file}.17.ce1}.
+Also dump after the second if conversion, to the file @file{@var{file}.23.ce2}.
@item d
@opindex dd
-Dump after delayed branch scheduling, to @file{@var{file}.34.dbr}.
+Dump after branch target load optimization, to to @file{@var{file}.34.btl}.
+Also dump after delayed branch scheduling, to @file{@var{file}.37.dbr}.
@item D
@opindex dD
Dump all macro definitions, at the end of preprocessing, in addition to
normal output.
@item e
@opindex de
-Dump after SSA optimizations, to @file{@var{file}.04.ssa} and
-@file{@var{file}.07.ussa}.
+Dump after SSA optimizations, to @file{@var{file}.05.ssa} and
+@file{@var{file}.010.ussa}.
@item E
@opindex dE
-Dump after the second if conversion, to @file{@var{file}.29.ce3}.
+Dump after the second if conversion, to @file{@var{file}.33.ce3}.
@item f
@opindex df
-Dump after life analysis, to @file{@var{file}.18.life}.
+Dump after control and data flow analysis, to @file{@var{file}.15.cfg}.
+Also dump after life analysis, to @file{@var{file}.21.life}.
@item F
@opindex dF
-Dump after purging @code{ADDRESSOF} codes, to @file{@var{file}.10.addressof}.
+Dump after purging @code{ADDRESSOF} codes, to @file{@var{file}.11.addressof}.
@item g
@opindex dg
-Dump after global register allocation, to @file{@var{file}.24.greg}.
-@item h
-@opindex dh
-Dump after finalization of EH handling code, to @file{@var{file}.02.eh}.
-@item k
-@opindex dk
-Dump after reg-to-stack conversion, to @file{@var{file}.31.stack}.
-@item o
-@opindex do
-Dump after post-reload optimizations, to @file{@var{file}.25.postreload}.
+Dump after global register allocation, to @file{@var{file}.27.greg}.
@item G
@opindex dG
-Dump after GCSE, to @file{@var{file}.11.gcse}.
+Dump after GCSE, to @file{@var{file}.12.gcse}.
+Also dump after jump bypassing and control flow optimizations, to
+@file{@var{file}.14.bypass}.
+@item h
+@opindex dh
+Dump after finalization of EH handling code, to @file{@var{file}.03.eh}.
@item i
@opindex di
-Dump after sibling call optimizations, to @file{@var{file}.01.sibling}.
+Dump after sibling call optimizations, to @file{@var{file}.02.sibling}.
@item j
@opindex dj
-Dump after the first jump optimization, to @file{@var{file}.03.jump}.
+Dump after the first jump optimization, to @file{@var{file}.04.jump}.
@item k
@opindex dk
-Dump after conversion from registers to stack, to @file{@var{file}.31.stack}.
+Dump after conversion from registers to stack, to @file{@var{file}.36.stack}.
@item l
@opindex dl
-Dump after local register allocation, to @file{@var{file}.23.lreg}.
+Dump after local register allocation, to @file{@var{file}.26.lreg}.
@item L
@opindex dL
-Dump after loop optimization passes, to @file{@var{file}.12.loop} and
-@file{@var{file}.18.loop2}.
+Dump after loop optimization passes, to @file{@var{file}.13.loop} and
+@file{@var{file}.19.loop2}.
@item M
@opindex dM
Dump after performing the machine dependent reorganization pass, to
-@file{@var{file}.33.mach}.
+@file{@var{file}.37.mach}.
@item n
@opindex dn
-Dump after register renumbering, to @file{@var{file}.28.rnreg}.
+Dump after register renumbering, to @file{@var{file}.31.rnreg}.
@item N
@opindex dN
-Dump after the register move pass, to @file{@var{file}.21.regmove}.
+Dump after the register move pass, to @file{@var{file}.24.regmove}.
+@item o
+@opindex do
+Dump after post-reload optimizations, to @file{@var{file}.28.postreload}.
@item r
@opindex dr
-Dump after RTL generation, to @file{@var{file}.00.rtl}.
+Dump after RTL generation, to @file{@var{file}.01.rtl}.
@item R
@opindex dR
-Dump after the second scheduling pass, to @file{@var{file}.30.sched2}.
+Dump after the second scheduling pass, to @file{@var{file}.35.sched2}.
@item s
@opindex ds
Dump after CSE (including the jump optimization that sometimes follows
-CSE), to @file{@var{file}.09.cse}.
+CSE), to @file{@var{file}.019.cse}.
@item S
@opindex dS
-Dump after the first scheduling pass, to @file{@var{file}.22.sched}.
+Dump after the first scheduling pass, to @file{@var{file}.25.sched}.
@item t
@opindex dt
Dump after the second CSE pass (including the jump optimization that
-sometimes follows CSE), to @file{@var{file}.17.cse2}.
+sometimes follows CSE), to @file{@var{file}.20.cse2}.
+@item T
+@opindex dT
+Dump after running tracer, to @file{@var{file}.18.tracer}.
@item u
@opindex du
-Dump after null pointer elimination pass to @file{@var{file}.08.null}.
+Dump after null pointer elimination pass to @file{@var{file}.018.null}.
+@item U
+@opindex dU
+Dump callgraph and unit-at-a-time optimization @file{@var{file}.00.unit}.
@item w
@opindex dw
-Dump after the second flow pass, to @file{@var{file}.26.flow2}.
+Dump after the second flow pass, to @file{@var{file}.29.flow2}.
+@item W
+@opindex dW
+Dump after SSA conditional constant propagation, to
+@file{@var{file}.06.ssaccp}.
@item X
@opindex dX
-Dump after SSA dead code elimination, to @file{@var{file}.06.ssadce}.
+Dump after SSA dead code elimination, to @file{@var{file}.07.ssadce}.
@item z
@opindex dz
-Dump after the peephole pass, to @file{@var{file}.27.peephole2}.
+Dump after the peephole pass, to @file{@var{file}.30.peephole2}.
@item a
@opindex da
Produce all the dumps listed above.
@item v
@opindex dv
For each of the other indicated dump files (except for
-@file{@var{file}.00.rtl}), dump a representation of the control flow graph
+@file{@var{file}.01.rtl}), dump a representation of the control flow graph
suitable for viewing with VCG to @file{@var{file}.@var{pass}.vcg}.
@item x
@opindex dx
@item -frandom-seed=@var{string}
@opindex frandom-string
This option provides a seed that GCC uses when it would otherwise use
-random numbers. At present, this is used to generate certain symbol names
-that have to be different in every compiled file.
+random numbers. It is used to generate certain symbol names
+that have to be different in every compiled file. It is also used to
+place unique stamps in coverage data files and the object files that
+produce them. You can use the @option{-frandom-seed} option to produce
+reproducibly identical object files.
The @var{string} should be different for every file you compile.
the performance and/or code size at the expense of compilation time
and possibly the ability to debug the program.
+The compiler performs optimisation based on the knowledge it has of
+the program. Using the @option{-funit-at-a-time} flag will allow the
+compiler to consider information gained from later functions in the
+file when compiling a function. Compiling multiple files at once to a
+single output file (and using @option{-funit-at-a-time}) will allow
+the compiler to use information gained from all of the files when
+compiling each of them.
+
Not all optimizations are controlled directly by a flag. Only
optimizations that have a flag are listed.
-fstrength-reduce @gol
-fcse-follow-jumps -fcse-skip-blocks @gol
-frerun-cse-after-loop -frerun-loop-opt @gol
--fgcse -fgcse-lm -fgcse-sm @gol
+-fgcse -fgcse-lm -fgcse-sm -fgcse-las @gol
-fdelete-null-pointer-checks @gol
-fexpensive-optimizations @gol
-fregmove @gol
-fpeephole2 @gol
-freorder-blocks -freorder-functions @gol
-fstrict-aliasing @gol
+-funit-at-a-time -fweb @gol
-falign-functions -falign-jumps @gol
-falign-loops -falign-labels}
@opindex O3
Optimize yet more. @option{-O3} turns on all optimizations specified by
@option{-O2} and also turns on the @option{-finline-functions},
-@option{-funit-at-a-time} and @option{-frename-registers} options.
+@option{-fweb} and @option{-frename-registers} options.
@item -O0
@opindex O0
@item -fgcse-sm
@opindex fgcse-sm
-When @option{-fgcse-sm} is enabled, A store motion pass is run after global common
-subexpression elimination. This pass will attempt to move stores out of loops.
-When used in conjunction with @option{-fgcse-lm}, loops containing a load/store sequence
-can be changed to a load before the loop and a store after the loop.
+When @option{-fgcse-sm} is enabled, a store motion pass is run after
+global common subexpression elimination. This pass will attempt to move
+stores out of loops. When used in conjunction with @option{-fgcse-lm},
+loops containing a load/store sequence can be changed to a load before
+the loop and a store after the loop.
+
+Enabled by default when gcse is enabled.
+
+@item -fgcse-las
+@opindex fgcse-las
+When @option{-fgcse-las} is enabled, the global common subexpression
+elimination pass eliminates redundant loads that come after stores to the
+same memory location (both partial and full redundancies).
Enabled by default when gcse is enabled.
sense when scheduling before register allocation, i.e.@: with
@option{-fschedule-insns} or at @option{-O2} or higher.
+@item -fsched-stalled-insns=@var{n}
+@opindex fsched-stalled-insns
+Define how many insns (if any) can be moved prematurely from the queue
+of stalled insns into the ready list, during the second scheduling pass.
+
+@item -fsched-stalled-insns-dep=@var{n}
+@opindex fsched-stalled-insns-dep
+Define how many insn groups (cycles) will be examined for a dependency
+on a stalled insn that is candidate for premature removal from the queue
+of stalled insns. Has an effect only during the second scheduling pass,
+and only if @option{-fsched-stalled-insns} is used and its value is not zero.
+
@item -fsched2-use-superblocks
@opindex fsched2-use-superblocks
-When schedulilng after register allocation, do use superblock scheduling
+When scheduling after register allocation, do use superblock scheduling
algorithm. Superblock scheduling allows motion across basic block boundaries
resulting on faster schedules. This option is experimental, as not all machine
descriptions used by GCC model the CPU closely enough to avoid unreliable
Reorder basic blocks in the compiled function in order to reduce number of
taken branches and improve code locality.
-Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
+Enabled at levels @option{-O2}, @option{-O3}.
@item -freorder-functions
@opindex freorder-functions
Some assemblers only support this flag when @var{n} is a power of two;
in that case, it is rounded up.
-If @var{n} is not specified, use a machine-dependent default.
+If @var{n} is not specified or is zero, use a machine-dependent default.
Enabled at levels @option{-O2}, @option{-O3}.
make code slower, because it must insert dummy operations for when the
branch target is reached in the usual flow of the code.
+@option{-fno-align-labels} and @option{-falign-labels=1} are
+equivalent and mean that labels will not be aligned.
+
If @option{-falign-loops} or @option{-falign-jumps} are applicable and
are greater than this value, then their values are used instead.
-If @var{n} is not specified, use a machine-dependent default which is
-very likely to be @samp{1}, meaning no alignment.
+If @var{n} is not specified or is zero, use a machine-dependent default
+which is very likely to be @samp{1}, meaning no alignment.
Enabled at levels @option{-O2}, @option{-O3}.
executed many times, which will make up for any execution of the dummy
operations.
-If @var{n} is not specified, use a machine-dependent default.
+@option{-fno-align-loops} and @option{-falign-loops=1} are
+equivalent and mean that loops will not be aligned.
+
+If @var{n} is not specified or is zero, use a machine-dependent default.
Enabled at levels @option{-O2}, @option{-O3}.
bytes like @option{-falign-functions}. In this case, no dummy operations
need be executed.
-If @var{n} is not specified, use a machine-dependent default.
+@option{-fno-align-jumps} and @option{-falign-jumps=1} are
+equivalent and mean that loops will not be aligned.
+
+If @var{n} is not specified or is zero, use a machine-dependent default.
Enabled at levels @option{-O2}, @option{-O3}.
make debugging impossible, since variables will no longer stay in
a ``home register''.
+@item -fweb
+@opindex fweb
+Constructs webs as commonly used for register allocation purposes and assign
+each web individual pseudo register. This allows our register allocation pass
+to operate on pseudos directly, but also strengthens several other optimization
+passes, such as CSE, loop optimizer and trivial dead code remover. It can,
+however, make debugging impossible, since variables will no longer stay in a
+``home register''.
+
Enabled at levels @option{-O3}.
@item -fno-cprop-registers
@item -ffast-math
@opindex ffast-math
Sets @option{-fno-math-errno}, @option{-funsafe-math-optimizations}, @*
-@option{-fno-trapping-math}, @option{-ffinite-math-only} and @*
-@option{-fno-signaling-nans}.
+@option{-fno-trapping-math}, @option{-ffinite-math-only},
+@option{-fno-rounding-math} and @option{-fno-signaling-nans}.
This option causes the preprocessor macro @code{__FAST_MATH__} to be defined.
The default is @option{-ftrapping-math}.
+@item -frounding-math
+@opindex frounding-math
+Disable transformations and optimizations that assume default floating
+point rounding behavior. This is round-to-zero for all floating point
+to integer conversions, and round-to-nearest for all other arithmetic
+truncations. This option should be specified for programs that change
+the FP rounding mode dynamically, or that may be executed with a
+non-default rounding mode. This option disables constant folding of
+floating point expressions at compile-time (which may be affected by
+rounding mode) and arithmetic transformations that are unsafe in the
+presence of sign-dependent rounding modes.
+
+The default is @option{-fno-rounding-math}.
+
+This option is experimental and does not currently guarantee to
+disable all GCC optimizations that are affected by rounding mode.
+Future versions of gcc may provide finer control of this setting
+using C99's @code{FENV_ACCESS} pragma. This command line option
+will be used to specify the default state for @code{FENV_ACCESS}.
+
@item -fsignaling-nans
@opindex fsignaling-nans
Compile code assuming that IEEE signaling NaNs may generate user-visible
@option{-fbranch-probabilities}, to improve optimizations based on
the number of times each branch was taken. When the program
compiled with @option{-fprofile-arcs} exits it saves arc execution
-counts to a file called @file{@var{sourcename}.da} for each source
+counts to a file called @file{@var{sourcename}.gcda} for each source
file The information in this data file is very dependent on the
structure of the generated code, so you must use the same source code
and the same optimization options for both compilations.
branch is mostly to take, the @samp{REG_BR_PROB} values are used to
exactly determine which path is taken more often.
+@item -fprofile-values
+@opindex fprofile-values
+If combined with @option{-fprofile-arcs}, it adds code so that some
+data about values of expressions in the program is gathered.
+
+With @option{-fbranch-probabilities}, it reads back the data gathered
+from profiling values of expressions and adds @samp{REG_VALUE_PROFILE}
+notes to instructions for their later usage in optimizations.
+
@item -fnew-ra
@opindex fnew-ra
Use a graph coloring register allocator. Currently this option is meant
@item -funit-at-a-time
@opindex funit-at-a-time
-Parse the whole compilation unit before starting to produce code. This allows some
-extra optimizations to take place but consumes more memory.
+Parse the whole compilation unit before starting to produce code.
+This allows some extra optimizations to take place but consumes more
+memory.
@item -funroll-loops
@opindex funroll-loops
Perform aggressive dead-code elimination in SSA form. Requires @option{-fssa}.
Like @option{-fssa}, this is an experimental feature.
+@item -fbranch-target-load-optimize
+@opindex fbranch-target-load-optimize
+Perform branch target register load optimization before prologue / epilogue
+threading.
+The use of target registers can typically be exposed only during reload,
+thus hoisting loads out of loops and doing inter-block scheduling needs
+a separate optimization pass.
+
+@item -fbranch-target-load-optimize2
+@opindex fbranch-target-load-optimize2
+Perform branch target register load optimization after prologue / epilogue
+threading.
+
internal representation) in a single function that the tree inliner
will consider for inlining. This only affects functions declared
inline and methods implemented in a class declaration (C++).
-The default value is 300.
+The default value is 500.
@item max-inline-insns-auto
When you use @option{-finline-functions} (included in @option{-O3}),
by the compiler will be investigated. To those functions, a different
(more restrictive) limit compared to functions declared inline can
be applied.
-The default value is 300.
+The default value is 150.
@item max-inline-insns
The tree inliner does decrease the allowable size for single functions
compile-time resource (CPU time, memory) requirements and result in
larger binaries. Very high values are not advisable, as too large
binaries may adversely affect runtime performance.
-The default value is 600.
+The default value is 200.
@item max-inline-slope
After exceeding the maximum number of inlined instructions by repeated
inlining, a linear function is used to decrease the allowable size
for single functions. The slope of that function is the negative
reciprocal of the number specified here.
+This parameter is ignored when @option{-funit-at-a-time} is used.
The default value is 32.
@item min-inline-insns
after exceeding the limit. To avoid too much throttling, a minimum for
this function is specified here to allow repeated inlining for very small
functions even when a lot of repeated inlining already has been done.
-The default value is 130.
+This parameter is ignored when @option{-funit-at-a-time} is used.
+The default value is 10.
+
+@item large-function-insns
+The limit specifying really large functions. For functions greater than this
+limit inlining is constrained by @option{--param large-function-growth}.
+This parameter is useful primarily to avoid extreme compilation time caused by non-linear
+algorithms used by the backend.
+This parameter is ignored when @option{-funit-at-a-time} is not used.
+The default value is 30000.
+
+@item large-function-growth
+Specifies maximal growth of large functtion caused by inlining in percents.
+This parameter is ignored when @option{-funit-at-a-time} is not used.
+The default value is 200.
+
+@item inline-unit-growth
+Specifies maximal overall growth of the compilation unit caused by inlining.
+This parameter is ignored when @option{-funit-at-a-time} is not used.
+The default value is 150.
@item max-inline-insns-rtl
For languages that use the RTL inliner (this happens at a later stage
for compilation with profile feedback needs to be more conservative (higher) in
order to make tracer effective.
+@item max-cse-path-length
+
+Maximum number of basic blocks on path that cse considers.
+
@item ggc-min-expand
GCC uses a garbage collector to manage its own memory allocation. This
@itemx reorder-blocks-duplicate-feedback
Used by basic block reordering pass to decide whether to use unconditional
-branch or duplicate the code on it's destination. Code is duplicated when it's
+branch or duplicate the code on its destination. Code is duplicated when its
estimated size is smaller than this value multiplied by the estimated size of
unconditional jump in the hot spots of the program.
constructors will be called; @pxref{Collect2,,@code{collect2}, gccint,
GNU Compiler Collection (GCC) Internals}.)
+@item -pie
+@opindex pie
+Produce a position independent executable on targets which support it.
+For predictable results, you must also specify the same set of options
+that were used to generate code (@option{-fpie}, @option{-fPIE},
+or model suboptions) when you specify this option.
+
@item -s
@opindex s
Remove all symbol table and relocation information from the executable.
For each subprogram to be run, the compiler driver first tries the
@option{-B} prefix, if any. If that name is not found, or if @option{-B}
was not specified, the driver tries two standard prefixes, which are
-@file{/usr/lib/gcc/} and @file{/usr/local/lib/gcc-lib/}. If neither of
+@file{/usr/lib/gcc/} and @file{/usr/local/lib/gcc/}. If neither of
those results in a file name that is found, the unmodified program
name is searched for using the directories specified in your
@env{PATH} environment variable.
@item %@{S:X; T:Y; :D@}
-If @code{S} was given to GCC, substitues @code{X}; else if @code{T} was
-given to GCC, substitues @code{Y}; else substitutes @code{D}. There can
+If @code{S} was given to GCC, substitutes @code{X}; else if @code{T} was
+given to GCC, substitutes @code{Y}; else substitutes @code{D}. There can
be as many clauses as you need. This may be combined with @code{.},
@code{!}, @code{|}, and @code{*} as needed.
acknowledges that their resulting code will not be directly in line with
the rules of the ABI@.
+@item -mimpure-text
+@opindex mimpure-text
+@option{-mimpure-text}, used in addition to @option{-shared}, tells
+the compiler to not pass @option{-z text} to the linker when linking a
+shared object. Using this option, you can link position-dependent
+code into a shared object.
+
+@option{-mimpure-text} suppresses the ``relocations remain against
+allocatable but non-writable sections'' linker error message.
+However, the necessary relocations will trigger copy-on-write, and the
+shared object is not actually shared across processes. Instead of
+using @option{-mimpure-text}, you should compile all source code with
+@option{-fpic} or @option{-fPIC}.
+
+This option is only available on SunOS and Solaris.
+
@item -mv8
@itemx -msparclite
@opindex mv8
@table @gcctabopt
@item -mlittle-endian
@opindex mlittle-endian
-Generate code for a processor running in little-endian mode.
+Generate code for a processor running in little-endian mode. It is only
+available for a few configurations and most notably not on Solaris.
@item -m32
@itemx -m64
@samp{strongarm}, @samp{strongarm110}, @samp{strongarm1100},
@samp{arm8}, @samp{arm810}, @samp{arm9}, @samp{arm9e}, @samp{arm920},
@samp{arm920t}, @samp{arm940t}, @samp{arm9tdmi}, @samp{arm10tdmi},
-@samp{arm1020t}, @samp{xscale}, @samp{ep9312}.
+@samp{arm1020t}, @samp{xscale}, @samp{iwmmxt}, @samp{ep9312}.
@itemx -mtune=@var{name}
@opindex mtune
assembly code. This option can be used in conjunction with or instead
of the @option{-mcpu=} option. Permissible names are: @samp{armv2},
@samp{armv2a}, @samp{armv3}, @samp{armv3m}, @samp{armv4}, @samp{armv4t},
-@samp{armv5}, @samp{armv5t}, @samp{armv5te}, @samp{ep9312}.
+@samp{armv5}, @samp{armv5t}, @samp{armv5te}, @samp{iwmmxt}, @samp{ep9312}.
@item -mfpe=@var{number}
@itemx -mfp=@var{number}
unless stack-checking is enabled, when R9 is used.
@item -mcirrus-fix-invalid-insns
-@opindex -mcirrus-fix-invalid-insns
-@opindex -mno-cirrus-fix-invalid-insns
+@opindex mcirrus-fix-invalid-insns
+@opindex mno-cirrus-fix-invalid-insns
Insert NOPs into the instruction stream to in order to work around
problems with invalid Maverick instruction combinations. This option
is only valid if the @option{-mcpu=ep9312} option has been used to
resulting code is suitable for applications, but not shared
libraries.
+@item -mprioritize-restricted-insns=@var{priority}
+@opindex mprioritize-restricted-insns
+This option controls the priority that is assigned to
+dispatch-slot restricted instructions during the second scheduling
+pass. The argument @var{priority} takes the value @var{0/1/2} to assign
+@var{no/highest/second-highest} priority to dispatch slot restricted
+instructions.
+
+@item -msched-costly-dep=@var{dependence_type}
+@opindex msched-costly-dep
+This option controls which dependences are considered costly
+by the target during instruction scheduling. The argument
+@var{dependence_type} takes one of the following values:
+@var{no}: no dependence is costly,
+@var{all}: all dependences are costly,
+@var{true_store_to_load}: a true dependence from store to load is costly,
+@var{store_to_load}: any dependence from store to load is costly,
+@var{number}: any dependence which latency >= @var{number} is costly.
+
@item -mcall-sysv
@opindex mcall-sysv
On System V.4 and embedded PowerPC systems compile code using calling
@item -multiply_defined
@item -multiply_defined_unused
@item -noall_load
+@item -nofixprebinding
@item -nomultidefs
@item -noprebind
@item -noseglinkedit
@opindex multiply_defined
@opindex multiply_defined_unused
@opindex noall_load
+@opindex nofixprebinding
@opindex nomultidefs
@opindex noprebind
@opindex noseglinkedit
@samp{4kc}, @samp{4kp}, @samp{5kc}, @samp{20kc},
@samp{m4k},
@samp{r2000}, @samp{r3000}, @samp{r3900}, @samp{r4000}, @samp{r4400},
-@samp{r4600}, @samp{r4650}, @samp{r6000}, @samp{r8000},
+@samp{r4600}, @samp{r4650}, @samp{r6000}, @samp{r8000}, @samp{rm7000},
+@samp{rm9000},
@samp{orion},
@samp{sb1},
-@samp{vr4100}, @samp{vr4300}, and @samp{vr5000}.
+@samp{vr4100}, @samp{vr4111}, @samp{vr4120}, @samp{vr4300},
+@samp{vr5000}, @samp{vr5400} and @samp{vr5500}.
The special value @samp{from-abi} selects the
most compatible architecture for the selected ABI (that is,
@samp{mips1} for 32-bit ABIs and @samp{mips3} for 64-bit ABIs)@.
instead of @var{$4}). The only known assembler that supports this option
is the Algorithmics assembler.
-@item -mgpopt
-@itemx -mno-gpopt
-@opindex mgpopt
-@opindex mno-gpopt
-The @option{-mgpopt} switch says to write all of the data declarations
-before the instructions in the text section, this allows the MIPS
-assembler to generate one word memory references instead of using two
-words for short global or static data items. This is on by default if
-optimization is selected.
-
@item -mmemcpy
@itemx -mno-memcpy
@opindex mmemcpy
@samp{.cpload}, and @samp{.cprestore} that some System V.4 ports use for
position independent code.
+@item -mxgot
+@itemx -mno-xgot
+@opindex mxgot
+@opindex mno-xgot
+Lift (or do not lift) the usual restrictions on the size of the global
+offset table.
+
+GCC normally uses a single instruction to load values from the GOT.
+While this is relatively efficient, it will only work if the GOT
+is smaller than about 64k. Anything larger will cause the linker
+to report an error such as:
+
+@cindex relocation truncated to fit (MIPS)
+@smallexample
+relocation truncated to fit: R_MIPS_GOT16 foobar
+@end smallexample
+
+If this happens, you should recompile your code with @option{-mxgot}.
+It should then work with very large GOTs, although it will also be
+less efficient, since it will take three instructions to fetch the
+value of a global symbol.
+
+Note that some linkers can create multiple GOTs. If you have such a
+linker, you should only need to use @option{-mxgot} when a single object
+file accesses more than 64k's worth of GOT entries. Very few do.
+
+These options have no effect unless GCC is generating position
+independent code.
+
@item -mlong-calls
@itemx -mno-long-calls
@opindex mlong-calls
You need to use this switch, if you call outside of the current
512 megabyte segment to functions that are not through pointers.
-@item -mhalf-pic
-@itemx -mno-half-pic
-@opindex mhalf-pic
-@opindex mno-half-pic
-Put pointers to extern references into the data section and load them
-up, rather than put the references in the text section.
-
@item -membedded-pic
@itemx -mno-embedded-pic
@opindex membedded-pic
@opindex mno-mips16
Enable 16-bit instructions.
-@item -mentry
-@opindex mentry
-Use the entry and exit pseudo ops. This option can only be used with
-@option{-mips16}.
-
@item -EL
@opindex EL
Compile code for the processor in little endian mode.
the read of the destination register of an mfhi or mflo instruction
occurs in the following two instructions.
+@item -mfix-sb1
+@itemx -mno-fix-sb1
+@opindex mfix-sb1
+Work around certain SB-1 CPU core errata.
+(This flag currently works around the SB-1 revision 2
+``F1'' and ``F2'' floating point errata.)
+
@item -no-crt0
@opindex no-crt0
Do not include the default crt0.
This is the default choice for x86-64 compiler.
+@item pni
+Use all SSE extensions enabled by @option{-msse2} as well as the new
+SSE extensions in Prescott New Instructions. @option{-mpni} also
+enables 2 builtin functions, @code{__builtin_ia32_monitor} and
+@code{__builtin_ia32_mwait}, for new instructions @code{monitor} and
+@code{mwait}.
+
@item sse,387
Attempt to utilize both instruction sets at once. This effectively double the
amount of available registers and on chips with separate execution units for
and will not be binary compatible with structures in code compiled
without that switch.
+@item -m96bit-long-double
@item -m128bit-long-double
+@opindex m96bit-long-double
@opindex m128bit-long-double
-Control the size of @code{long double} type. i386 application binary interface
-specify the size to be 12 bytes, while modern architectures (Pentium and newer)
-prefer @code{long double} aligned to 8 or 16 byte boundary. This is
-impossible to reach with 12 byte long doubles in the array accesses.
+These switches control the size of @code{long double} type. The i386
+application binary interface specifies the size to be 96 bits,
+so @option{-m96bit-long-double} is the default in 32 bit mode.
+
+Modern architectures (Pentium and newer) would prefer @code{long double}
+to be aligned to an 8 or 16 byte boundary. In arrays or structures
+conforming to the ABI, this would not be possible. So specifying a
+@option{-m128bit-long-double} will align @code{long double}
+to a 16 byte boundary by padding the @code{long double} with an additional
+32 bit zero.
+
+In the x86-64 compiler, @option{-m128bit-long-double} is the default choice as
+its ABI specifies that @code{long double} is to be aligned on 16 byte boundary.
+
+Notice that neither of these options enable any extra precision over the x87
+standard of 80 bits for a @code{long double}.
-@strong{Warning:} if you use the @option{-m128bit-long-double} switch, the
+@strong{Warning:} if you override the default value for your target ABI, the
structures and arrays containing @code{long double} will change their size as
well as function calling convention for function taking @code{long double}
-will be modified.
+will be modified. Hence they will not be binary compatible with arrays or
+structures in code compiled without that switch.
-@item -m96bit-long-double
-@opindex m96bit-long-double
-Set the size of @code{long double} to 96 bits as required by the i386
-application binary interface. This is the default.
@item -msvr3-shlib
@itemx -mno-svr3-shlib
@itemx -mno-sse
@item -msse2
@itemx -mno-sse2
+@item -mpni
+@itemx -mno-pni
@item -m3dnow
@itemx -mno-3dnow
@opindex mmmx
makes an extra register available in leaf functions. The option
@option{-fomit-frame-pointer} removes the frame pointer for all functions
which might make debugging harder.
+
+@item -mtls-direct-seg-refs
+@itemx -mno-tls-direct-seg-refs
+@opindex mtls-direct-seg-refs
+Controls whether TLS variables may be accessed with offsets from the
+TLS segment register (@code{%gs} for 32-bit, @code{%fs} for 64-bit),
+or whether the thread base pointer must be added. Whether or not this
+is legal depends on the operating system, and whether it maps the
+segment to cover the entire TLS area.
+
+For systems that use GNU libc, the default is on.
@end table
These @samp{-m} switches are supported in addition to the above
@item -mhitachi
@opindex mhitachi
-Comply with the calling conventions defined by Hitachi.
+Comply with the calling conventions defined by Renesas.
@item -mnomacsave
@opindex mnomacsave
@itemx -mprolog-function
@opindex mno-prolog-function
@opindex mprolog-function
-Do not use (do use) external functions to save and restore registers at
-the prolog and epilog of a function. The external functions are slower,
-but use less code space if more than one function saves the same number
-of registers. The @option{-mprolog-function} option is on by default if
-you optimize.
+Do not use (do use) external functions to save and restore registers
+at the prologue and epilogue of a function. The external functions
+are slower, but use less code space if more than one function saves
+the same number of registers. The @option{-mprolog-function} option
+is on by default if you optimize.
@item -mspace
@opindex mspace
table.
@item -mapp-regs
-@opindex -mapp-regs
+@opindex mapp-regs
This option will cause r2 and r5 to be used in the code generated by
the compiler. This setting is the default.
@item -mno-app-regs
-@opindex -mno-app-regs
+@opindex mno-app-regs
This option will cause r2 and r5 to be treated as fixed registers.
+@item -mv850e1
+@opindex mv850e1
+Specify that the target processor is the V850E1. The preprocessor
+constants @samp{__v850e1__} and @samp{__v850e__} will be defined if
+this option is used.
+
@item -mv850e
-@opindex -mv850e
+@opindex mv850e
Specify that the target processor is the V850E. The preprocessor
constant @samp{__v850e__} will be defined if this option is used.
-If neither @option{-mv850} nor @option{-mv850e} are defined
-then a default target processor will be chosen and the relevant
-@samp{__v850*__} preprocessor constant will be defined.
+If neither @option{-mv850} nor @option{-mv850e} nor @option{-mv850e1}
+are defined then a default target processor will be chosen and the
+relevant @samp{__v850*__} preprocessor constant will be defined.
The preprocessor constants @samp{__v850} and @samp{__v851__} are always
defined, regardless of which processor variant is the target.
@item -mdisable-callt
-@opindex -mdisable-callt
+@opindex mdisable-callt
This option will suppress generation of the CALLT instruction for the
-v850e flavors of the v850 architecture. The default is
+v850e and v850e1 flavors of the v850 architecture. The default is
@option{-mno-disable-callt} which allows the CALLT instruction to be used.
@end table
When @option{-mesa} is specified, generate code using the
instructions available on ESA/390. Note that @option{-mesa} is
not possible with @option{-m64}.
-For the @samp{s390} targets, the default is @option{-mesa},
-while the @samp{s390x} targets default to @option{-mzarch}.
+When generating code compliant to the Linux for S/390 ABI,
+the default is @option{-mesa}. When generating code compliant
+to the Linux for zSeries ABI, the default is @option{-mzarch}.
@item -mmvcle
@itemx -mno-mvcle
Print (or do not print) additional debug information when compiling.
The default is to not print debug information.
-@item -march=@var{arch}
+@item -march=@var{cpu-type}
@opindex march
-Generate code that will run on @var{arch}, which is the name of system
+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{g5}, @samp{g6} and @samp{z900}.
+@var{cpu-type} are @samp{g5}, @samp{g6}, @samp{z900}, and @samp{z990}.
+When generating code using the instructions available on z/Architecture,
+the default is @option{-march=z900}. Otherwise, the default is
+@option{-march=g5}.
-@item -mtune=@var{arch}
+@item -mtune=@var{cpu-type}
@opindex mtune
Tune to @var{cpu-type} everything applicable about the generated code,
- except for the ABI and the set of available instructions.
-The list of @var{arch} values is the same as for @option{-march}.
+except for the ABI and the set of available instructions.
+The list of @var{cpu-type} values is the same as for @option{-march}.
+The default is the value used for @option{-march}.
+@item -mfused-madd
+@itemx -mno-fused-madd
+@opindex mfused-madd
+@opindex mno-fused-madd
+Generate code that uses (does not use) the floating point multiply and
+accumulate instructions. These instructions are generated by default if
+hardware floating point is used.
@end table
@node CRIS Options
@subsection Xtensa Options
@cindex Xtensa Options
-The Xtensa architecture is designed to support many different
-configurations. The compiler's default options can be set to match a
-particular Xtensa configuration by copying a configuration file into the
-GCC sources when building GCC@. The options below may be used to
-override the default options.
+These options are supported for Xtensa targets:
@table @gcctabopt
-@item -mbig-endian
-@itemx -mlittle-endian
-@opindex mbig-endian
-@opindex mlittle-endian
-Specify big-endian or little-endian byte ordering for the target Xtensa
-processor.
-
-@item -mdensity
-@itemx -mno-density
-@opindex mdensity
-@opindex mno-density
-Enable or disable use of the optional Xtensa code density instructions.
-
@item -mconst16
@itemx -mno-const16
@opindex mconst16
instructions. The use of @code{CONST16} is enabled by default only if
the @code{L32R} instruction is not available.
-@item -mabs
-@itemx -mno-abs
-@opindex mabs
-@opindex mno-abs
-Enable or disable use of the Xtensa @code{ABS} instruction for absolute
-value operations.
-
-@item -maddx
-@itemx -mno-addx
-@opindex maddx
-@opindex mno-addx
-Enable or disable use of the Xtensa @code{ADDX} and @code{SUBX}
-instructions.
-
-@item -mmac16
-@itemx -mno-mac16
-@opindex mmac16
-@opindex mno-mac16
-Enable or disable use of the Xtensa MAC16 option. When enabled, GCC
-will generate MAC16 instructions from standard C code, with the
-limitation that it will use neither the MR register file nor any
-instruction that operates on the MR registers. When this option is
-disabled, GCC will translate 16-bit multiply/accumulate operations to a
-combination of core instructions and library calls, depending on whether
-any other multiplier options are enabled.
-
-@item -mmul16
-@itemx -mno-mul16
-@opindex mmul16
-@opindex mno-mul16
-Enable or disable use of the 16-bit integer multiplier option. When
-enabled, the compiler will generate 16-bit multiply instructions for
-multiplications of 16 bits or smaller in standard C code. When this
-option is disabled, the compiler will either use 32-bit multiply or
-MAC16 instructions if they are available or generate library calls to
-perform the multiply operations using shifts and adds.
-
-@item -mmul32
-@itemx -mno-mul32
-@opindex mmul32
-@opindex mno-mul32
-Enable or disable use of the 32-bit integer multiplier option. When
-enabled, the compiler will generate 32-bit multiply instructions for
-multiplications of 32 bits or smaller in standard C code. When this
-option is disabled, the compiler will generate library calls to perform
-the multiply operations using either shifts and adds or 16-bit multiply
-instructions if they are available.
-
-@item -mnsa
-@itemx -mno-nsa
-@opindex mnsa
-@opindex mno-nsa
-Enable or disable use of the optional normalization shift amount
-(@code{NSA}) instructions to implement the built-in @code{ffs} function.
-
-@item -mminmax
-@itemx -mno-minmax
-@opindex mminmax
-@opindex mno-minmax
-Enable or disable use of the optional minimum and maximum value
-instructions.
-
-@item -msext
-@itemx -mno-sext
-@opindex msext
-@opindex mno-sext
-Enable or disable use of the optional sign extend (@code{SEXT})
-instruction.
-
-@item -mbooleans
-@itemx -mno-booleans
-@opindex mbooleans
-@opindex mno-booleans
-Enable or disable support for the boolean register file used by Xtensa
-coprocessors. This is not typically useful by itself but may be
-required for other options that make use of the boolean registers (e.g.,
-the floating-point option).
-
-@item -mhard-float
-@itemx -msoft-float
-@opindex mhard-float
-@opindex msoft-float
-Enable or disable use of the floating-point option. When enabled, GCC
-generates floating-point instructions for 32-bit @code{float}
-operations. When this option is disabled, GCC generates library calls
-to emulate 32-bit floating-point operations using integer instructions.
-Regardless of this option, 64-bit @code{double} operations are always
-emulated with calls to library functions.
-
@item -mfused-madd
@itemx -mno-fused-madd
@opindex mfused-madd
@opindex fwrapv
This option instructs the compiler to assume that signed arithmetic
overflow of addition, subtraction and multiplication wraps around
-using twos-complement representation. This flag enables some optimzations
+using twos-complement representation. This flag enables some optimizations
and disables other. This option is enabled by default for the Java
front-end, as required by the Java language specification.
Position-independent code requires special support, and therefore works
only on certain machines.
+@item -fpie
+@itemx -fPIE
+@opindex fpie
+@opindex fPIE
+These options are similar to @option{-fpic} and @option{-fPIC}, but
+generated position independent code can be only linked into executables.
+Usually these options are used when @option{-pie} GCC option will be
+used during linking.
+
@item -ffixed-@var{reg}
@opindex ffixed
Treat the register named @var{reg} as a fixed register; generated code
tries looking in the usual places for the subprogram.
The default value of @env{GCC_EXEC_PREFIX} is
-@file{@var{prefix}/lib/gcc-lib/} where @var{prefix} is the value
+@file{@var{prefix}/lib/gcc/} where @var{prefix} is the value
of @code{prefix} when you ran the @file{configure} script.
Other prefixes specified with @option{-B} take precedence over this prefix.
In addition, the prefix is used in an unusual way in finding the
directories to search for header files. For each of the standard
-directories whose name normally begins with @samp{/usr/local/lib/gcc-lib}
+directories whose name normally begins with @samp{/usr/local/lib/gcc}
(more precisely, with the value of @env{GCC_INCLUDE_DIR}), GCC tries
replacing that beginning with the specified prefix to produce an
alternate directory name. Thus, with @option{-Bfoo/}, GCC will search