@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-@c 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+@c 2000, 2001, 2002, 2003, 2004, 2005 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 COPYRIGHT
Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
-1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 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
@c man end
@c man begin BUGS
For instructions on reporting bugs, see
-@w{@uref{http://gcc.gnu.org/bugs.html}}. Use of the @command{gccbug}
-script to report bugs is recommended.
+@w{@uref{http://gcc.gnu.org/bugs.html}}.
@c man end
@c man begin AUTHOR
See the Info entry for @command{gcc}, or
* Invoking G++:: Compiling C++ programs.
* C Dialect Options:: Controlling the variant of C language compiled.
* C++ Dialect Options:: Variations on C++.
-* Objective-C Dialect Options:: Variations on Objective-C.
+* Objective-C and Objective-C++ Dialect Options:: Variations on Objective-C
+ and Objective-C++.
* Language Independent Options:: Controlling how diagnostics should be
formatted.
* Warning Options:: How picky should the compiler be?
-fno-nonansi-builtins -fno-operator-names @gol
-fno-optional-diags -fpermissive @gol
-frepo -fno-rtti -fstats -ftemplate-depth-@var{n} @gol
--fuse-cxa-atexit -fno-weak -nostdinc++ @gol
--fno-default-inline -Wabi -Wctor-dtor-privacy @gol
+-fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol
+-fno-default-inline -fvisibility-inlines-hidden @gol
+-Wabi -Wctor-dtor-privacy @gol
-Wnon-virtual-dtor -Wreorder @gol
-Weffc++ -Wno-deprecated @gol
-Wno-non-template-friend -Wold-style-cast @gol
-Woverloaded-virtual -Wno-pmf-conversions @gol
-Wsign-promo -Wsynth}
-@item Objective-C Language Options
-@xref{Objective-C Dialect Options,,Options Controlling Objective-C Dialect}.
+@item Objective-C and Objective-C++ Language Options
+@xref{Objective-C and Objective-C++ Dialect Options,,Options Controlling
+Objective-C and Objective-C++ Dialects}.
@gccoptlist{
-fconstant-string-class=@var{class-name} @gol
-fgnu-runtime -fnext-runtime @gol
-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 -Wendif-labels @gol
+-Wdisabled-optimization -Wno-div-by-zero -Wno-endif-labels @gol
-Werror -Werror-implicit-function-declaration @gol
-Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
-Wno-format-extra-args -Wformat-nonliteral @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
+-Wmain -Wmissing-braces -Wmissing-field-initializers @gol
-Wmissing-format-attribute -Wmissing-include-dirs @gol
-Wmissing-noreturn @gol
-Wno-multichar -Wnonnull -Wpacked -Wpadded @gol
@gccoptlist{-Wbad-function-cast -Wmissing-declarations @gol
-Wmissing-prototypes -Wnested-externs -Wold-style-definition @gol
-Wstrict-prototypes -Wtraditional @gol
--Wdeclaration-after-statement}
+-Wdeclaration-after-statement -Wno-pointer-sign}
@item Debugging Options
@xref{Debugging Options,,Options for Debugging Your Program or GCC}.
@gccoptlist{-d@var{letters} -dumpspecs -dumpmachine -dumpversion @gol
-fdump-unnumbered -fdump-translation-unit@r{[}-@var{n}@r{]} @gol
-fdump-class-hierarchy@r{[}-@var{n}@r{]} @gol
+-fdump-ipa-all -fdump-ipa-cgraph @gol
-fdump-tree-all @gol
-fdump-tree-original@r{[}-@var{n}@r{]} @gol
-fdump-tree-optimized@r{[}-@var{n}@r{]} @gol
-fdump-tree-phiopt@r{[}-@var{n}@r{]} @gol
-fdump-tree-forwprop@r{[}-@var{n}@r{]} @gol
-fdump-tree-copyrename@r{[}-@var{n}@r{]} @gol
--fdump-tree-nrv @gol
+-fdump-tree-nrv -fdump-tree-vect @gol
-fdump-tree-sra@r{[}-@var{n}@r{]} @gol
-fdump-tree-fre@r{[}-@var{n}@r{]} @gol
+-ftree-vectorizer-verbose=@var{n} @gol
-feliminate-dwarf2-dups -feliminate-unused-debug-types @gol
-feliminate-unused-debug-symbols -fmem-report -fprofile-arcs -ftree-based-profiling @gol
-frandom-seed=@var{string} -fsched-verbose=@var{n} @gol
-floop-optimize -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
--fmodulo-sched -fmove-all-movables -fnew-ra -fno-branch-count-reg @gol
+-fmodulo-sched -fno-branch-count-reg @gol
-fno-default-inline -fno-defer-pop -floop-optimize2 -fmove-loop-invariants @gol
-fno-function-cse -fno-guess-branch-probability @gol
-fno-inline -fno-math-errno -fno-peephole -fno-peephole2 @gol
-fomit-frame-pointer -foptimize-register-move @gol
-foptimize-sibling-calls -fprefetch-loop-arrays @gol
-fprofile-generate -fprofile-use @gol
--freduce-all-givs -fregmove -frename-registers @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
-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 @gol
+-fsched2-use-traces -freschedule-modulo-scheduled-loops @gol
+-fsignaling-nans -fsingle-precision-constant -fspeculative-prefetching @gol
-fstrength-reduce -fstrict-aliasing -ftracer -fthread-jumps @gol
-funroll-all-loops -funroll-loops -fpeel-loops @gol
--funswitch-loops -fold-unroll-loops -fold-unroll-all-loops @gol
+-fsplit-ivs-in-unroller -funswitch-loops @gol
+-fvariable-expansion-in-unroller @gol
-ftree-pre -ftree-ccp -ftree-dce -ftree-loop-optimize @gol
--ftree-lim @gol
+-ftree-loop-linear -ftree-loop-im -ftree-loop-ivcanon -fivopts @gol
-ftree-dominator-opts -ftree-dse -ftree-copyrename @gol
--ftree-ch -ftree-sra -ftree-ter -ftree-lrs -ftree-fre @gol
+-ftree-ch -ftree-sra -ftree-ter -ftree-lrs -ftree-fre -ftree-vectorize @gol
--param @var{name}=@var{value}
-O -O0 -O1 -O2 -O3 -Os}
@gccoptlist{-all_load -allowable_client -arch -arch_errors_fatal @gol
-arch_only -bind_at_load -bundle -bundle_loader @gol
-client_name -compatibility_version -current_version @gol
+-dead_strip @gol
-dependency-file -dylib_file -dylinker_install_name @gol
-dynamic -dynamiclib -exported_symbols_list @gol
-filelist -flat_namespace -force_cpusubtype_ALL @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 -nofixprebinding -nomultidefs -noprebind -noseglinkedit @gol
+-noall_load -no_dead_strip_inits_and_terms @gol
+-nofixprebinding -nomultidefs -noprebind -noseglinkedit @gol
-pagezero_size -prebind -prebind_all_twolevel_modules @gol
-private_bundle -read_only_relocs -sectalign @gol
-sectobjectsymbols -whyload -seg1addr @gol
-sectcreate -sectobjectsymbols -sectorder @gol
+-segaddr -segs_read_only_addr -segs_read_write_addr @gol
-seg_addr_table -seg_addr_table_filename -seglinkedit @gol
-segprot -segs_read_only_addr -segs_read_write_addr @gol
-single_module -static -sub_library -sub_umbrella @gol
-twolevel_namespace -umbrella -undefined @gol
-unexported_symbols_list -weak_reference_mismatches @gol
--whatsloaded -F}
+-whatsloaded -F -gused -gfull -mone-byte-bool}
@emph{DEC Alpha Options}
@gccoptlist{-mno-fp-regs -msoft-float -malpha-as -mgas @gol
-malloc-cc -mfixed-cc -mdword -mno-dword @gol
-mdouble -mno-double @gol
-mmedia -mno-media -mmuladd -mno-muladd @gol
--mfdpic -minline-plt -mgprel-ro -multilib-library-pic -mlinked-fp @gol
--mlibrary-pic -macc-4 -macc-8 @gol
+-mfdpic -minline-plt -mgprel-ro -multilib-library-pic @gol
+-mlinked-fp -mlong-calls -malign-labels @gol
+-mlibrary-pic -macc-4 -macc-8 @gol
-mpack -mno-pack -mno-eflags -mcond-move -mno-cond-move @gol
-mscc -mno-scc -mcond-exec -mno-cond-exec @gol
-mvliw-branch -mno-vliw-branch @gol
-mmulti-cond-exec -mno-multi-cond-exec -mnested-cond-exec @gol
-mno-nested-cond-exec -mtomcat-stats @gol
+-mTLS -mtls @gol
-mcpu=@var{cpu}}
@emph{H8/300 Options}
@gccoptlist{-march=@var{architecture-type} @gol
-mbig-switch -mdisable-fpregs -mdisable-indexing @gol
-mfast-indirect-calls -mgas -mgnu-ld -mhp-ld @gol
+-mfixed-range=@var{register-range} @gol
-mjump-in-delay -mlinker-opt -mlong-calls @gol
-mlong-load-store -mno-big-switch -mno-disable-fpregs @gol
-mno-disable-indexing -mno-fast-indirect-calls -mno-gas @gol
-mno-space-regs -msoft-float -mpa-risc-1-0 @gol
-mpa-risc-1-1 -mpa-risc-2-0 -mportable-runtime @gol
-mschedule=@var{cpu-type} -mspace-regs -msio -mwsio @gol
--nolibdld -static -threads}
+-munix=@var{unix-std} -nolibdld -static -threads}
@emph{i386 and x86-64 Options}
@gccoptlist{-mtune=@var{cpu-type} -march=@var{cpu-type} @gol
@emph{IA-64 Options}
@gccoptlist{-mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic @gol
--mvolatile-asm-stop -mb-step -mregister-names -mno-sdata @gol
+-mvolatile-asm-stop -mregister-names -mno-sdata @gol
-mconstant-gp -mauto-pic -minline-float-divide-min-latency @gol
-minline-float-divide-max-throughput @gol
-minline-int-divide-min-latency @gol
--minline-int-divide-max-throughput -mno-dwarf2-asm @gol
--mfixed-range=@var{register-range}}
+-minline-int-divide-max-throughput @gol
+-minline-sqrt-min-latency -minline-sqrt-max-throughput @gol
+-mno-dwarf2-asm -mearly-stop-bits @gol
+-mfixed-range=@var{register-range} -mtls-size=@var{tls-size} @gol
+-mtune=@var{cpu-type} -mt -pthread -milp32 -mlp64}
@emph{M32R/D Options}
@gccoptlist{-m32r2 -m32rx -m32r @gol
-mips16 -mno-mips16 -mabi=@var{abi} -mabicalls -mno-abicalls @gol
-mxgot -mno-xgot -mgp32 -mgp64 -mfp32 -mfp64 @gol
-mhard-float -msoft-float -msingle-float -mdouble-float @gol
+-mpaired-single -mips3d @gol
-mint64 -mlong64 -mlong32 @gol
-G@var{num} -membedded-data -mno-embedded-data @gol
-muninit-const-in-rodata -mno-uninit-const-in-rodata @gol
-msplit-addresses -mno-split-addresses @gol
-mexplicit-relocs -mno-explicit-relocs @gol
--mrnames -mno-rnames @gol
-mcheck-zero-division -mno-check-zero-division @gol
+-mdivide-traps -mdivide-breaks @gol
-mmemcpy -mno-memcpy -mlong-calls -mno-long-calls @gol
-mmad -mno-mad -mfused-madd -mno-fused-madd -nocpp @gol
-mfix-r4000 -mno-fix-r4000 -mfix-r4400 -mno-fix-r4400 @gol
-mpowerpc-gfxopt -mno-powerpc-gfxopt @gol
-mnew-mnemonics -mold-mnemonics @gol
-mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc @gol
--m64 -m32 -mxl-call -mno-xl-call -mpe @gol
+-m64 -m32 -mxl-compat -mno-xl-compat -mpe @gol
-malign-power -malign-natural @gol
-msoft-float -mhard-float -mmultiple -mno-multiple @gol
-mstring -mno-string -mupdate -mno-update @gol
-mabi=spe -mabi=no-spe @gol
-misel=yes -misel=no @gol
-mspe=yes -mspe=no @gol
--mfloat-gprs=yes -mfloat-gprs=no @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
-msdata=@var{opt} -mvxworks -mwindiss -G @var{num} -pthread}
@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
-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}
+-mtpf-trace -mno-tpf-trace -mfused-madd -mno-fused-madd @gol
+-mwarn-framesize -mwarn-dynamicstack -mstack-size -mstack-guard}
@emph{SH Options}
@gccoptlist{-m1 -m2 -m2e -m3 -m3e @gol
-m4-nofpu -m4-single-only -m4-single -m4 @gol
+-m4a-nofpu -m4a-single-only -m4a-single -m4a -m4al @gol
-m5-64media -m5-64media-nofpu @gol
-m5-32media -m5-32media-nofpu @gol
-m5-compact -m5-compact-nofpu @gol
-mb -ml -mdalign -mrelax @gol
--mbigtable -mfmovd -mhitachi -mnomacsave @gol
+-mbigtable -mfmovd -mhitachi -mrenesas -mno-renesas -mnomacsave @gol
-mieee -misize -mpadstruct -mspace @gol
-mprefergot -musermode}
-mimpure-text -mno-impure-text -mlittle-endian @gol
-mstack-bias -mno-stack-bias @gol
-munaligned-doubles -mno-unaligned-doubles @gol
--mv8plus -mno-v8plus -mvis -mno-vis}
+-mv8plus -mno-v8plus -mvis -mno-vis
+-threads -pthreads}
@emph{System V Options}
@gccoptlist{-Qy -Qn -YP,@var{paths} -Ym,@var{dir}}
-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
+-fverbose-asm -fpack-struct[=@var{n}] -fstack-check @gol
-fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol
-fargument-alias -fargument-noalias @gol
-fargument-noalias-global -fleading-underscore @gol
-ftls-model=@var{model} @gol
--ftrapv -fwrapv -fbounds-check}
+-ftrapv -fwrapv -fbounds-check @gol
+-fvisibility}
@end table
@menu
or preprocessed source.
* C Dialect Options:: Controlling the variant of C language compiled.
* C++ Dialect Options:: Variations on C++.
-* Objective-C Dialect Options:: Variations on Objective-C.
+* Objective-C and Objective-C++ Dialect Options:: Variations on Objective-C
+ and Objective-C++.
* Language Independent Options:: Controlling how diagnostics should be
formatted.
* Warning Options:: How picky should the compiler be?
C++ source code which should not be preprocessed.
@item @var{file}.m
-Objective-C source code. Note that you must link with the library
-@file{libobjc.a} to make an Objective-C program work.
+Objective-C source code. Note that you must link with the @file{libobjc}
+library to make an Objective-C program work.
@item @var{file}.mi
Objective-C source code which should not be preprocessed.
+@item @var{file}.mm
+@itemx @var{file}.M
+Objective-C++ source code. Note that you must link with the @file{libobjc}
+library to make an Objective-C++ program work. Note that @samp{.M} refers
+to a literal capital M@.
+
+@item @var{file}.mii
+Objective-C++ source code which should not be preprocessed.
+
@item @var{file}.h
-C or C++ header file to be turned into a precompiled header.
+C, C++, Objective-C or Objective-C++ header file to be turned into a
+precompiled header.
@item @var{file}.cc
@itemx @var{file}.cp
name suffix). This option applies to all following input files until
the next @option{-x} option. Possible values for @var{language} are:
@smallexample
-c c-header cpp-output
+c c-header c-cpp-output
c++ c++-header c++-cpp-output
-objective-c objective-c-header objc-cpp-output
+objective-c objective-c-header objective-c-cpp-output
+objective-c++ objective-c++-header objective-c++-cpp-output
assembler assembler-with-cpp
ada
f77 f77-cpp-input ratfor
to pass all the source files to the compiler at once (for those
languages for which the compiler can handle this). This will allow
intermodule analysis (IMA) to be performed by the compiler. Currently the only
-language for which this is supported is C. If you pass source files for
+language for which this is supported is C@. If you pass source files for
multiple languages to the driver, using this option, the driver will invoke
the compiler(s) that support IMA once each, passing each compiler all the
source files appropriate for it. For those languages that do not support
IMA this option will be ignored, and the compiler will be invoked once for
each source file in that language. If you use this option in conjunction
-with -save-temps, the compiler will generate multiple pre-processed files
-(one for each source file), but only one (combined) .o or .s file.
+with @option{-save-temps}, the compiler will generate multiple
+pre-processed files
+(one for each source file), but only one (combined) @file{.o} or
+@file{.s} file.
@item --help
@opindex help
@item --version
@opindex version
-Display the version number and copyrights of the invoked GCC.
+Display the version number and copyrights of the invoked GCC@.
@end table
@node Invoking G++
@cindex options, dialect
The following options control the dialect of C (or languages derived
-from C, such as C++ and Objective-C) that the compiler accepts:
+from C, such as C++, Objective-C and Objective-C++) that the compiler
+accepts:
@table @gcctabopt
@cindex ANSI support
may become inline copy loops. The resulting code is often both smaller
and faster, but since the function calls no longer appear as such, you
cannot set a breakpoint on those calls, nor can you change the behavior
-of the functions by linking with a different library.
+of the functions by linking with a different library. In addition,
+when a function is recognized as a built-in function, GCC may use
+information about that function to warn about problems with calls to
+that function, or to generate more efficient code, even if the
+resulting code still contains calls to that function. For example,
+warnings are given with @option{-Wformat} for bad calls to
+@code{printf}, when @code{printf} is built in, and @code{strlen} is
+known not to modify global memory.
With the @option{-fno-builtin-@var{function}} option
only the built-in function @var{function} is
@opindex fms-extensions
Accept some non-standard constructs used in Microsoft header files.
+Some cases of unnamed fields in structures and unions are only
+accepted with this option. @xref{Unnamed Fields,,Unnamed struct/union
+fields within structs/unions}, for details.
+
@item -trigraphs
@opindex trigraphs
Support ISO C trigraphs. The @option{-ansi} option (and @option{-std}
@opindex no-integrated-cpp
Performs a compilation in two passes: preprocessing and compiling. This
option allows a user supplied "cc1", "cc1plus", or "cc1obj" via the
-@option{-B} option. The user supplied compilation step can then add in
+@option{-B} option. The user supplied compilation step can then add in
an additional preprocessing step after normal preprocessing but before
-compiling. The default is to use the integrated cpp (internal cpp)
+compiling. The default is to use the integrated cpp (internal cpp)
The semantics of this option will change if "cc1", "cc1plus", and
"cc1obj" are merged.
@item -fabi-version=@var{n}
@opindex fabi-version
-Use version @var{n} of the C++ ABI. Version 2 is the version of the
+Use version @var{n} of the C++ ABI@. Version 2 is the version of the
C++ ABI that first appeared in G++ 3.4. Version 1 is the version of
the C++ ABI that first appeared in G++ 3.2. Version 0 will always be
the version that conforms most closely to the C++ ABI specification.
endless recursions during template class instantiation. ANSI/ISO C++
conforming programs must not rely on a maximum depth greater than 17.
+@item -fno-threadsafe-statics
+@opindex fno-threadsafe-statics
+Do not emit the extra code to use the routines specified in the C++
+ABI for thread-safe initialization of local statics. You can use this
+option to reduce code size slightly in code that doesn't need to be
+thread-safe.
+
@item -fuse-cxa-atexit
@opindex fuse-cxa-atexit
Register destructors for objects with static storage duration with the
destructors, but will only work if your C library supports
@code{__cxa_atexit}.
+@item -fvisibility-inlines-hidden
+@opindex fvisibility-inlines-hidden
+Causes all inlined methods to be marked with
+@code{__attribute__ ((visibility ("hidden")))} so that they do not
+appear in the export table of a DSO and do not require a PLT indirection
+when used within the DSO@. Enabling this option can have a dramatic effect
+on load and link times of a DSO as it massively reduces the size of the
+dynamic export table when the library makes heavy use of templates. While
+it can cause bloating through duplication of code within each DSO where
+it is used, often the wastage is less than the considerable space occupied
+by a long symbol name in the export table which is typical when using
+templates and namespaces. For even more savings, combine with the
+@option{-fvisibility=hidden} switch.
+
@item -fno-weak
@opindex fno-weak
Do not use weak symbol support, even if it is provided by the linker.
@item -Wabi @r{(C++ only)}
@opindex Wabi
Warn when G++ generates code that is probably not compatible with the
-vendor-neutral C++ ABI. Although an effort has been made to warn about
+vendor-neutral C++ ABI@. Although an effort has been made to warn about
all such cases, there are probably some cases that are not warned about,
even though G++ is generating incompatible code. There may also be
cases where warnings are emitted even though the code that is generated
(const A&);}, while cfront will use the user-defined @samp{operator =}.
@end table
-@node Objective-C Dialect Options
-@section Options Controlling Objective-C Dialect
+@node Objective-C and Objective-C++ Dialect Options
+@section Options Controlling Objective-C and Objective-C++ Dialects
-@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.)
+@cindex compiler options, Objective-C and Objective-C++
+@cindex Objective-C and Objective-C++ options, command line
+@cindex options, Objective-C and Objective-C++
+(NOTE: This manual does not describe the Objective-C and Objective-C++
+languages themselves. See @xref{Standards,,Language Standards
+Supported by GCC}, 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
-options regardless of what language your program is in. For example,
-you might compile a file @code{some_class.m} like this:
+for Objective-C and Objective-C++ programs, but you can also use most of
+the language-independent GNU compiler options.
+For example, you might compile a file @code{some_class.m} like this:
@smallexample
gcc -g -fgnu-runtime -O -c some_class.m
@noindent
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@.
+Objective-C and Objective-C++ programs; you can use the other options with
+any language supported by GCC@.
+
+Note that since Objective-C is an extension of the C language, Objective-C
+compilations may also use options specific to the C front-end (e.g.,
+@option{-Wtraditional}). Similarly, Objective-C++ compilations may use
+C++-specific options (e.g., @option{-Wabi}).
Here is a list of options that are @emph{only} for compiling Objective-C
-programs:
+and Objective-C++ programs:
@table @gcctabopt
@item -fconstant-string-class=@var{class-name}
@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
+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
every method in the protocol that is not implemented by the class. The
default behavior is to issue a warning for every method not explicitly
implemented in the class, even if a method implementation is inherited
-from the superclass. If you use the @code{-Wno-protocol} option, then
+from the superclass. If you use the @option{-Wno-protocol} option, then
methods inherited from the superclass are considered to be implemented,
and no warning is issued for them.
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
-found during compilation, or because the @code{-fsyntax-only} option is
+found during compilation, or because the @option{-fsyntax-only} option is
being used.
@item -Wundeclared-selector
@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
+while @option{-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.
The following options control the amount and kinds of warnings produced
by GCC; for further, language-specific options also refer to
-@ref{C++ Dialect Options} and @ref{Objective-C Dialect Options}.
+@ref{C++ Dialect Options} and @ref{Objective-C and Objective-C++ Dialect
+Options}.
@table @gcctabopt
@cindex syntax checking
Warn if an array subscript has type @code{char}. This is a common cause
of error, as programmers often forget that this type is signed on some
machines.
+This warning is enabled by @option{-Wall}.
@item -Wcomment
@opindex Wcomment
Warn whenever a comment-start sequence @samp{/*} appears in a @samp{/*}
comment, or whenever a Backslash-Newline appears in a @samp{//} comment.
+This warning is enabled by @option{-Wall}.
@item -Wfatal-errors
@opindex Wfatal-errors
@item -Wformat
@opindex Wformat
+@opindex ffreestanding
+@opindex fno-builtin
Check calls to @code{printf} and @code{scanf}, etc., to make sure that
the arguments supplied have types appropriate to the format string
specified, and that the conversions specified in the format string make
sense. This includes standard functions, and others specified by format
attributes (@pxref{Function Attributes}), in the @code{printf},
@code{scanf}, @code{strftime} and @code{strfmon} (an X/Open extension,
-not in the C standard) families.
+not in the C standard) families (or other target-specific families).
+Which functions are checked without format attributes having been
+specified depends on the standard version selected, and such checks of
+functions without the attribute specified are disabled by
+@option{-ffreestanding} or @option{-fno-builtin}.
The formats are checked against the format features supported by GNU
libc version 2.2. These include all ISO C90 and C99 features, as well
@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)}
+@item -Winit-self @r{(C, C++, Objective-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,
@item -Wimplicit-int
@opindex Wimplicit-int
Warn when a declaration does not specify a type.
+This warning is enabled by @option{-Wall}.
@item -Wimplicit-function-declaration
@itemx -Werror-implicit-function-declaration
@opindex Wimplicit-function-declaration
@opindex Werror-implicit-function-declaration
Give a warning (or error) whenever a function is used before being
-declared.
+declared. The form @option{-Wno-error-implicit-function-declaration}
+is not supported.
+This warning is enabled by @option{-Wall} (as a warning, not an error).
@item -Wimplicit
@opindex Wimplicit
Same as @option{-Wimplicit-int} and @option{-Wimplicit-function-declaration}.
+This warning is enabled by @option{-Wall}.
@item -Wmain
@opindex Wmain
Warn if the type of @samp{main} is suspicious. @samp{main} should be a
function with external linkage, returning int, taking either zero
arguments, two, or three arguments of appropriate types.
+This warning is enabled by @option{-Wall}.
@item -Wmissing-braces
@opindex Wmissing-braces
int b[2][2] = @{ @{ 0, 1 @}, @{ 2, 3 @} @};
@end smallexample
-@item -Wmissing-include-dirs @r{(C, C++, and Objective-C only)}
+This warning is enabled by @option{-Wall}.
+
+@item -Wmissing-include-dirs @r{(C, C++, Objective-C and Objective-C++ only)}
@opindex Wmissing-include-dirs
Warn if a user-supplied include directory does not exist.
Warn if parentheses are omitted in certain contexts, such
as when there is an assignment in a context where a truth value
is expected, or when operators are nested whose precedence people
-often get confused about.
+often get confused about. Only the warning for an assignment used as
+a truth value is supported when compiling C++; the other warnings are
+only supported when compiling C@.
+
+Also warn if a comparison like @samp{x<=y<=z} appears; this is
+equivalent to @samp{(x<=y ? 1 : 0) <= z}, which is a different
+interpretation from that of ordinary mathematical notation.
Also warn about constructions where there may be confusion to which
@code{if} statement an @code{else} branch belongs. Here is an example of
@end group
@end smallexample
+This warning is enabled by @option{-Wall}.
+
@item -Wsequence-point
@opindex Wsequence-point
Warn about code that may have undefined semantics because of violations
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}.
+
@item -Wreturn-type
@opindex Wreturn-type
Warn whenever a function is defined with a return-type that defaults to
@code{int}. Also warn about any @code{return} statement with no
return-value in a function whose return-type is not @code{void}.
+For C, also warn if the return type of a function has a type qualifier
+such as @code{const}. Such a type qualifier has no effect, since the
+value returned by a function is not an lvalue. ISO C prohibits
+qualified @code{void} return types on function definitions, so such
+return types always receive a warning even without this option.
+
For C++, a function without return type always produces a diagnostic
message, even when @option{-Wno-return-type} is specified. The only
exceptions are @samp{main} and functions defined in system headers.
+This warning is enabled by @option{-Wall}.
+
@item -Wswitch
@opindex Wswitch
Warn whenever a @code{switch} statement has an index of enumerated type
enumeration. (The presence of a @code{default} label prevents this
warning.) @code{case} labels outside the enumeration range also
provoke warnings when this option is used.
+This warning is enabled by @option{-Wall}.
@item -Wswitch-default
@opindex Wswitch-switch
@opindex Wtrigraphs
Warn if any trigraphs are encountered that might change the meaning of
the program (trigraphs within comments are not warned about).
+This warning is enabled by @option{-Wall}.
@item -Wunused-function
@opindex Wunused-function
Warn whenever a static function is declared but not defined or a
non\-inline static function is unused.
+This warning is enabled by @option{-Wall}.
@item -Wunused-label
@opindex Wunused-label
Warn whenever a label is declared but not used.
+This warning is enabled by @option{-Wall}.
To suppress this warning use the @samp{unused} attribute
(@pxref{Variable Attributes}).
@opindex Wunused-variable
Warn whenever a local variable or non-constant static variable is unused
aside from its declaration
+This warning is enabled by @option{-Wall}.
To suppress this warning use the @samp{unused} attribute
(@pxref{Variable Attributes}).
@item -Wunused-value
@opindex Wunused-value
Warn whenever a statement computes a result that is explicitly not used.
+This warning is enabled by @option{-Wall}.
To suppress this warning cast the expression to @samp{void}.
you use that never return as @code{noreturn}. @xref{Function
Attributes}.
+This warning is enabled by @option{-Wall}.
+
@item -Wunknown-pragmas
@opindex Wunknown-pragmas
@cindex warning for unknown pragmas
@opindex Wstrict-aliasing
This option is only active when @option{-fstrict-aliasing} is active.
It warns about code which might break the strict aliasing rules that the
-compiler is using for optimization. The warning does not catch all
-cases, but does attempt to catch the more common pitfalls. It is
+compiler is using for optimization. The warning does not catch all
+cases, but does attempt to catch the more common pitfalls. It is
included in @option{-Wall}.
@item -Wstrict-aliasing=2
that are easy to avoid (or modify to prevent the warning), even in
conjunction with macros. This also enables some language-specific
warnings described in @ref{C++ Dialect Options} and
-@ref{Objective-C Dialect Options}.
+@ref{Objective-C and Objective-C++ Dialect Options}.
@end table
The following @option{-W@dots{}} options are not implied by @option{-Wall}.
An unsigned value is compared against zero with @samp{<} or @samp{>=}.
@item
-A comparison like @samp{x<=y<=z} appears; this is equivalent to
-@samp{(x<=y ? 1 : 0) <= z}, which is a different interpretation from
-that of ordinary mathematical notation.
-
-@item
Storage-class specifiers like @code{static} are not the first things in
a declaration. According to the C Standard, this usage is obsolescent.
@item
-The return type of a function has a type qualifier such as @code{const}.
-Such a type qualifier has no effect, since the value returned by a
-function is not an lvalue. (But don't warn about the GNU extension of
-@code{volatile void} return types. That extension will be warned about
-if @option{-pedantic} is specified.)
-
-@item
If @option{-Wall} or @option{-Wunused} is also specified, warn about unused
arguments.
@item
An aggregate has an initializer which does not initialize all members.
-For example, the following code would cause such a warning, because
-@code{x.h} would be implicitly initialized to zero:
-
-@smallexample
-struct s @{ int f, g, h; @};
-struct s x = @{ 3, 4 @};
-@end smallexample
+This warning can be independently controlled by
+@option{-Wmissing-field-initializers}.
@item
A function parameter is declared without a type specifier in K&R-style
@opindex Wundef
Warn if an undefined identifier is evaluated in an @samp{#if} directive.
-@item -Wendif-labels
+@item -Wno-endif-labels
+@opindex Wno-endif-labels
@opindex Wendif-labels
-Warn whenever an @samp{#else} or an @samp{#endif} are followed by text.
+Do not warn whenever an @samp{#else} or an @samp{#endif} are followed by text.
@item -Wshadow
@opindex Wshadow
Use this option to detect global functions that are not declared in
header files.
+@item -Wmissing-field-initializers
+@opindex Wmissing-field-initializers
+@opindex W
+@opindex Wextra
+Warn if a structure's initializer has some fields missing. For
+example, the following code would cause such a warning, because
+@code{x.h} is implicitly zero:
+
+@smallexample
+struct s @{ int f, g, h; @};
+struct s x = @{ 3, 4 @};
+@end smallexample
+
+This option does not warn about designated initializers, so the following
+modification would not trigger a warning:
+
+@smallexample
+struct s @{ int f, g, h; @};
+struct s x = @{ .f = 3, .g = 4 @};
+@end smallexample
+
+This warning is included in @option{-Wextra}. To get other @option{-Wextra}
+warnings without this one, use @samp{-Wextra -Wno-missing-field-initializers}.
+
@item -Wmissing-noreturn
@opindex Wmissing-noreturn
Warn about functions which might be candidates for attribute @code{noreturn}.
complex; GCC will refuse to optimize programs when the optimization
itself is likely to take inordinate amounts of time.
+@item -Wno-pointer-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@.
+
@item -Werror
@opindex Werror
Make all warnings into errors.
@item -g
@opindex g
Produce debugging information in the operating system's native format
-(stabs, COFF, XCOFF, or DWARF)@. GDB can work with this debugging
+(stabs, COFF, XCOFF, or DWARF 2)@. GDB can work with this debugging
information.
On most systems that use stabs format, @option{-g} enables use of extra
to generate the extra information, use @option{-gstabs+}, @option{-gstabs},
@option{-gxcoff+}, @option{-gxcoff}, or @option{-gvms} (see below).
-Unlike most other C compilers, GCC allows you to use @option{-g} with
+GCC allows you to use @option{-g} with
@option{-O}. The shortcuts taken by optimized code may occasionally
produce surprising results: some variables you declared may not exist
at all; flow of control may briefly move where you did not expect it;
@item -gdwarf-2
@opindex gdwarf-2
Produce debugging information in DWARF version 2 format (if that is
-supported). This is the format used by DBX on IRIX 6.
+supported). This is the format used by DBX on IRIX 6. With this
+option, GCC uses features of DWARF version 3 when they are useful;
+version 3 is upward compatible with version 2, but may still cause
+problems for older debuggers.
@item -gvms
@opindex gvms
present in the program. Some debuggers support macro expansion when
you use @option{-g3}.
-Note that in order to avoid confusion between DWARF1 debug level 2,
-and DWARF2 @option{-gdwarf-2} does not accept a concatenated debug
-level. Instead use an additional @option{-g@var{level}} option to
-change the debug level for DWARF2.
+@option{-gdwarf-2} does not accept a concatenated debug level, because
+GCC used to support an option @option{-gdwarf} that meant to generate
+debug information in version 1 of the DWARF format (which is very
+different from version 2), and it would have been too confusing. That
+debug format is long obsolete, but the option cannot be changed now.
+Instead use an additional @option{-g@var{level}} option to change the
+debug level for DWARF2.
@item -feliminate-dwarf2-dups
@opindex feliminate-dwarf2-dups
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}.gcda} 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
+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.gcda} for input file @file{dir/foo.c}, or
+the basename of the source file. In both cases any suffix is removed
+(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
Compile the source files with @option{-fprofile-arcs} plus optimization
-and code generation options. For test coverage analysis, use the
-additional @option{-ftest-coverage} option. You do not need to profile
+and code generation options. For test coverage analysis, use the
+additional @option{-ftest-coverage} option. You do not need to profile
every source file in a program.
@item
@item
Run the program on a representative workload to generate the arc profile
-information. This may be repeated any number of times. You can run
+information. This may be repeated any number of times. You can run
concurrent instances of your program, and provided that the file system
-supports locking, the data files will be correctly updated. Also
+supports locking, the data files will be correctly updated. Also
@code{fork} calls are detected and correctly handled (double counting
will not happen).
@item
For test coverage analysis, use @command{gcov} to produce human readable
-information from the @file{.gcno} and @file{.gcda} files. Refer to the
+information from the @file{.gcno} and @file{.gcda} files. Refer to the
@command{gcov} documentation for further information.
@end itemize
@opindex ftest-coverage
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 note file is called
-@file{@var{auxname}.gcno}. 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
+generate test coverage data. Coverage data will match the source files
more closely, if you do not optimize.
@item -d@var{letters}
+@item -fdump-rtl-@var{pass}
@opindex d
Says to make debugging dumps during compilation at times specified by
-@var{letters}. This is used for debugging the compiler. The file names
-for most of the dumps are made by appending a pass number and a word to
-the @var{dumpname}. @var{dumpname} is generated from the name of the
-output file, if explicitly specified and it is not an executable,
-otherwise it is the basename of the source file. In both cases any
-suffix is removed (e.g. @file{foo.01.rtl} or @file{foo.02.sibling}).
-Here are the possible letters for use in @var{letters}, and their
-meanings:
+@var{letters}. This is used for debugging the RTL-based passes of the
+compiler. The file names for most of the dumps are made by appending a
+pass number and a word to the @var{dumpname}. @var{dumpname} is generated
+from the name of the output file, if explicitly specified and it is not
+an executable, otherwise it is the basename of the source file.
-@table @samp
-@item A
+Most debug dumps can be enabled either passing a letter to the @option{-d}
+option, or with a long @option{-fdump-rtl} switch; here are the possible
+letters for use in @var{letters} and @var{pass}, and their meanings:
+
+@table @gcctabopt
+@item -dA
@opindex dA
Annotate the assembler output with miscellaneous debugging information.
-@item b
+
+@item -db
+@itemx -fdump-rtl-bp
@opindex db
-Dump after computing branch probabilities, to @file{@var{file}.12.bp}.
-@item B
+@opindex fdump-rtl-bp
+Dump after computing branch probabilities, to @file{@var{file}.09.bp}.
+
+@item -dB
+@itemx -fdump-rtl-bbro
@opindex dB
-Dump after block reordering, to @file{@var{file}.32.bbro}.
-@item c
+@opindex fdump-rtl-bbro
+Dump after block reordering, to @file{@var{file}.30.bbro}.
+
+@item -dc
+@itemx -fdump-rtl-combine
@opindex dc
-Dump after instruction combination, to the file @file{@var{file}.20.combine}.
-@item C
+@opindex fdump-rtl-combine
+Dump after instruction combination, to the file @file{@var{file}.17.combine}.
+
+@item -dC
+@itemx -fdump-rtl-ce1
+@itemx -fdump-rtl-ce2
@opindex dC
-Dump after the first if conversion, to the file @file{@var{file}.14.ce1}.
-Also dump after the second if conversion, to the file @file{@var{file}.21.ce2}.
-@item d
+@opindex fdump-rtl-ce1
+@opindex fdump-rtl-ce2
+@option{-dC} and @option{-fdump-rtl-ce1} enable dumping after the
+first if conversion, to the file @file{@var{file}.11.ce1}. @option{-dC}
+and @option{-fdump-rtl-ce2} enable dumping after the second if
+conversion, to the file @file{@var{file}.18.ce2}.
+
+@item -dd
+@itemx -fdump-rtl-btl
+@itemx -fdump-rtl-dbr
@opindex dd
-Dump after branch target load optimization, to to @file{@var{file}.33.btl}.
-Also dump after delayed branch scheduling, to @file{@var{file}.37.dbr}.
-@item D
+@opindex fdump-rtl-btl
+@opindex fdump-rtl-dbr
+@option{-dd} and @option{-fdump-rtl-btl} enable dumping after branch
+target load optimization, to to @file{@var{file}.31.btl}. @option{-dd}
+and @option{-fdump-rtl-dbr} enable dumping after delayed branch
+scheduling, to @file{@var{file}.36.dbr}.
+
+@item -dD
@opindex dD
Dump all macro definitions, at the end of preprocessing, in addition to
normal output.
-@item E
+
+@item -dE
+@itemx -fdump-rtl-ce3
@opindex dE
-Dump after the third if conversion, to @file{@var{file}.31.ce3}.
-@item f
+@opindex fdump-rtl-ce3
+Dump after the third if conversion, to @file{@var{file}.28.ce3}.
+
+@item -df
+@itemx -fdump-rtl-cfg
+@itemx -fdump-rtl-life
@opindex df
-Dump after control and data flow analysis, to @file{@var{file}.11.cfg}.
-Also dump after life analysis, to @file{@var{file}.19.life}.
-@item g
+@opindex fdump-rtl-cfg
+@opindex fdump-rtl-life
+@option{-df} and @option{-fdump-rtl-cfg} enable dumping after control
+and data flow analysis, to @file{@var{file}.08.cfg}. @option{-df}
+and @option{-fdump-rtl-cfg} enable dumping dump after life analysis,
+to @file{@var{file}.16.life}.
+
+@item -dg
+@itemx -fdump-rtl-greg
@opindex dg
-Dump after global register allocation, to @file{@var{file}.26.greg}.
-@item G
+@opindex fdump-rtl-greg
+Dump after global register allocation, to @file{@var{file}.23.greg}.
+
+@item -dG
+@itemx -fdump-rtl-gcse
+@itemx -fdump-rtl-bypass
@opindex dG
-Dump after GCSE, to @file{@var{file}.08.gcse}.
-Also dump after jump bypassing and control flow optimizations, to
-@file{@var{file}.10.bypass}.
-@item h
+@opindex fdump-rtl-gcse
+@opindex fdump-rtl-bypass
+@option{-dG} and @option{-fdump-rtl-gcse} enable dumping after GCSE, to
+@file{@var{file}.05.gcse}. @option{-dG} and @option{-fdump-rtl-bypass}
+enable dumping after jump bypassing and control flow optimizations, to
+@file{@var{file}.07.bypass}.
+
+@item -dh
+@itemx -fdump-rtl-eh
@opindex dh
-Dump after finalization of EH handling code, to @file{@var{file}.03.eh}.
-@item i
+@opindex fdump-rtl-eh
+Dump after finalization of EH handling code, to @file{@var{file}.02.eh}.
+
+@item -di
+@itemx -fdump-rtl-sibling
@opindex di
-Dump after sibling call optimizations, to @file{@var{file}.02.sibling}.
-@item j
+@opindex fdump-rtl-sibling
+Dump after sibling call optimizations, to @file{@var{file}.01.sibling}.
+
+@item -dj
+@itemx -fdump-rtl-jump
@opindex dj
-Dump after the first jump optimization, to @file{@var{file}.04.jump}.
-@item k
+@opindex fdump-rtl-jump
+Dump after the first jump optimization, to @file{@var{file}.03.jump}.
+
+@item -dk
+@itemx -fdump-rtl-stack
@opindex dk
-Dump after conversion from registers to stack, to @file{@var{file}.35.stack}.
-@item l
+@opindex fdump-rtl-stack
+Dump after conversion from registers to stack, to @file{@var{file}.33.stack}.
+
+@item -dl
+@itemx -fdump-rtl-lreg
@opindex dl
-Dump after local register allocation, to @file{@var{file}.25.lreg}.
-@item L
+@opindex fdump-rtl-lreg
+Dump after local register allocation, to @file{@var{file}.22.lreg}.
+
+@item -dL
+@itemx -fdump-rtl-loop
+@itemx -fdump-rtl-loop2
@opindex dL
-Dump after loop optimization passes, to @file{@var{file}.09.loop} and
-@file{@var{file}.16.loop2}.
-@item m
+@opindex fdump-rtl-loop
+@opindex fdump-rtl-loop2
+@option{-dL} and @option{-fdump-rtl-loop} enable dumping after the first
+loop optimization pass, to @file{@var{file}.06.loop}. @option{-dL} and
+@option{-fdump-rtl-loop2} enable dumping after the second pass, to
+@file{@var{file}.13.loop2}.
+
+@item -dm
+@itemx -fdump-rtl-sms
@opindex dm
-Dump after modulo scheduling, to @file{@var{file}.23.sms}.
-@item M
+@opindex fdump-rtl-sms
+Dump after modulo scheduling, to @file{@var{file}.20.sms}.
+
+@item -dM
+@itemx -fdump-rtl-mach
@opindex dM
+@opindex fdump-rtl-mach
Dump after performing the machine dependent reorganization pass, to
-@file{@var{file}.36.mach}.
-@item n
+@file{@var{file}.35.mach}.
+
+@item -dn
+@itemx -fdump-rtl-rnreg
@opindex dn
-Dump after register renumbering, to @file{@var{file}.30.rnreg}.
-@item N
+@opindex fdump-rtl-rnreg
+Dump after register renumbering, to @file{@var{file}.29.rnreg}.
+
+@item -dN
+@itemx -fdump-rtl-regmove
@opindex dN
-Dump after the register move pass, to @file{@var{file}.22.regmove}.
-@item o
+@opindex fdump-rtl-regmove
+Dump after the register move pass, to @file{@var{file}.19.regmove}.
+
+@item -do
+@itemx -fdump-rtl-postreload
@opindex do
-Dump after post-reload optimizations, to @file{@var{file}.27.postreload}.
-@item r
+@opindex fdump-rtl-postreload
+Dump after post-reload optimizations, to @file{@var{file}.24.postreload}.
+
+@item -dr
+@itemx -fdump-rtl-expand
@opindex dr
-Dump after RTL generation, to @file{@var{file}.01.rtl}.
-@item R
+@opindex fdump-rtl-expand
+Dump after RTL generation, to @file{@var{file}.00.expand}.
+
+@item -dR
+@itemx -fdump-rtl-sched2
@opindex dR
-Dump after the second scheduling pass, to @file{@var{file}.34.sched2}.
-@item s
+@opindex fdump-rtl-sched2
+Dump after the second scheduling pass, to @file{@var{file}.32.sched2}.
+
+@item -ds
+@itemx -fdump-rtl-cse
@opindex ds
+@opindex fdump-rtl-cse
Dump after CSE (including the jump optimization that sometimes follows
-CSE), to @file{@var{file}.06.cse}.
-@item S
+CSE), to @file{@var{file}.04.cse}.
+
+@item -dS
+@itemx -fdump-rtl-sched
@opindex dS
-Dump after the first scheduling pass, to @file{@var{file}.24.sched}.
-@item t
+@opindex fdump-rtl-sched
+Dump after the first scheduling pass, to @file{@var{file}.21.sched}.
+
+@item -dt
+@itemx -fdump-rtl-cse2
@opindex dt
+@opindex fdump-rtl-cse2
Dump after the second CSE pass (including the jump optimization that
-sometimes follows CSE), to @file{@var{file}.18.cse2}.
-@item T
+sometimes follows CSE), to @file{@var{file}.15.cse2}.
+
+@item -dT
+@itemx -fdump-rtl-tracer
@opindex dT
-Dump after running tracer, to @file{@var{file}.15.tracer}.
-@item u
-@opindex du
-Dump after null pointer elimination pass to @file{@var{file}.05.null}.
-@item U
-@opindex dU
-Dump callgraph and unit-at-a-time optimization @file{@var{file}.00.unit}.
-@item V
+@opindex fdump-rtl-tracer
+Dump after running tracer, to @file{@var{file}.12.tracer}.
+
+@item -dV
+@itemx -fdump-rtl-vpt
+@itemx -fdump-rtl-vartrack
@opindex dV
-Dump after the value profile transformations, to @file{@var{file}.13.vpt}.
-Also dump after variable tracking, to @file{@var{file}.35.vartrack}.
-@item w
+@opindex fdump-rtl-vpt
+@opindex fdump-rtl-vartrack
+@option{-dV} and @option{-fdump-rtl-vpt} enable dumping after the value
+profile transformations, to @file{@var{file}.10.vpt}. @option{-dV}
+and @option{-fdump-rtl-vartrack} enable dumping after variable tracking,
+to @file{@var{file}.34.vartrack}.
+
+@item -dw
+@itemx -fdump-rtl-flow2
@opindex dw
-Dump after the second flow pass, to @file{@var{file}.28.flow2}.
-@item z
+@opindex fdump-rtl-flow2
+Dump after the second flow pass, to @file{@var{file}.26.flow2}.
+
+@item -dz
+@itemx -fdump-rtl-peephole2
@opindex dz
-Dump after the peephole pass, to @file{@var{file}.29.peephole2}.
-@item Z
+@opindex fdump-rtl-peephole2
+Dump after the peephole pass, to @file{@var{file}.27.peephole2}.
+
+@item -dZ
+@itemx -fdump-rtl-web
@opindex dZ
-Dump after constructing the web, to @file{@var{file}.17.web}.
-@item a
+@opindex fdump-rtl-web
+Dump after live range splitting, to @file{@var{file}.14.web}.
+
+@item -da
+@itemx -fdump-rtl-all
@opindex da
+@opindex fdump-rtl-all
Produce all the dumps listed above.
-@item H
+
+@item -dH
@opindex dH
Produce a core dump whenever an error occurs.
-@item m
+
+@item -dm
@opindex dm
Print statistics on memory usage, at the end of the run, to
standard error.
-@item p
+
+@item -dp
@opindex dp
Annotate the assembler output with a comment indicating which
pattern and alternative was used. The length of each instruction is
also printed.
-@item P
+
+@item -dP
@opindex dP
Dump the RTL in the assembler output as a comment before each instruction.
Also turns on @option{-dp} annotation.
-@item v
+
+@item -dv
@opindex dv
-For each of the other indicated dump files (except for
-@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
+For each of the other indicated dump files (either with @option{-d} or
+@option{-fdump-rtl-@var{pass}}), dump a representation of the control flow
+graph suitable for viewing with VCG to @file{@var{file}.@var{pass}.vcg}.
+
+@item -dx
@opindex dx
Just generate RTL for a function instead of compiling it. Usually used
-with @samp{r}.
-@item y
+with @samp{r} (@option{-fdump-rtl-expand}).
+
+@item -dy
@opindex dy
Dump debugging information during parsing, to standard error.
@end table
@var{options} controls the details of the dump as described for the
@option{-fdump-tree} options.
+@item -fdump-ipa-@var{switch}
+@opindex fdump-ipa
+Control the dumping at various stages of inter-procedural analysis
+language tree to a file. The file name is generated by appending a switch
+specific suffix to the source file name. The following dumps are possible:
+
+@table @samp
+@item all
+Enables all inter-procedural analysis dumps; currently the only produced
+dump is the @samp{cgraph} dump.
+
+@item cgraph
+Dumps information about call-graph optimization, unused function removal,
+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)}
@opindex fdump-tree
language tree to a file. The file name is generated by appending a switch
specific suffix to the source file name. If the @samp{-@var{options}}
form is used, @var{options} is a list of @samp{-} separated options that
-control the details of the dump. Not all options are applicable to all
-dumps, those which are not meaningful will be ignored. The following
+control the details of the dump. Not all options are applicable to all
+dumps, those which are not meaningful will be ignored. The following
options are available
@table @samp
@item address
Print the address of each node. Usually this is not meaningful as it
-changes according to the environment and source file. Its primary use
+changes according to the environment and source file. Its primary use
is for tying up a dump file with a debug environment.
@item slim
Inhibit dumping of members of a scope or body of a function merely
Dump the control flow graph of each function to a file in VCG format. The
file name is made by appending @file{.vcg} to the source file name. Note
that if the file contains more than one function, the generated file cannot
-be used directly by VCG. You will need to cut and paste each function's
+be used directly by VCG@. You will need to cut and paste each function's
graph into its own separate file first.
@item ch
@item ccp
@opindex fdump-tree-ccp
-Dump each function after CCP. The file name is made by appending
+Dump each function after CCP@. The file name is made by appending
@file{.ccp} to the source file name.
@item pre
generic trees. The file name is made by appending @file{.nrv} to the source
file name.
+@item vect
+@opindex fdump-tree-vect
+Dump each function after applying vectorization of loops. The file name is
+made by appending @file{.vect} to the source file name.
+
@item all
@opindex fdump-tree-all
Enable all the available tree dumps with the flags provided in this option.
@end table
+@item -ftree-vectorizer-verbose=@var{n}
+@opindex ftree-vectorizer-verbose
+This option controls the amount of debugging output the vectorizer prints.
+This information is written to standard error, unless @option{-fdump-tree-all}
+or @option{-fdump-tree-vect} is specified, in which case it is output to the
+usual dump listing file, @file{.vect}.
+
@item -frandom-seed=@var{string}
@opindex frandom-string
This option provides a seed that GCC uses when it would otherwise use
random numbers. It is used to generate certain symbol names
-that have to be different in every compiled file. It is also used to
+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
+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.
preprocessed @file{foo.i} output file even though the compiler now
normally uses an integrated preprocessor.
+When used in combination with the @option{-x} command line option,
+@option{-save-temps} is sensible enough to avoid over writing an
+input source file with the same extension as an intermediate file.
+The corresponding intermediate file may be obtained by renaming the
+source file before using @option{-save-temps}.
+
@item -time
@opindex time
Report the CPU time taken by each subprocess in the compilation
# as 0.00 0.01
@end smallexample
-The first number on each line is the ``user time,'' that is time spent
-executing the program itself. The second number is ``system time,''
+The first number on each line is the ``user time'', that is time spent
+executing the program itself. The second number is ``system time'',
time spent executing operating system routines on behalf of the program.
Both numbers are in seconds.
@item -fvar-tracking
@opindex fvar-tracking
-Run variable tracking pass. It computes where variables are stored at each
-position in code. Better debugging information is then generated
+Run variable tracking pass. It computes where variables are stored at each
+position in code. Better debugging information is then generated
(if the debugging information format supports this information).
It is enabled by default when compiling with optimization (@option{-Os},
To resolve this you either need to put @file{cpp0} and the other compiler
components where @command{gcc} expects to find them, or you can set the environment
variable @env{GCC_EXEC_PREFIX} to the directory where you installed them.
-Don't forget the trailing '/'.
+Don't forget the trailing @samp{/}.
@xref{Environment Variables}.
@item -dumpmachine
@option{-O} turns on the following optimization flags:
@gccoptlist{-fdefer-pop @gol
--fmerge-constants @gol
--fthread-jumps @gol
+-fdelayed-branch @gol
+-fguess-branch-probability @gol
+-fcprop-registers @gol
-floop-optimize @gol
-fif-conversion @gol
-fif-conversion2 @gol
--fdelayed-branch @gol
--fguess-branch-probability @gol
--fcprop-registers}
+-ftree-ccp @gol
+-ftree-dce @gol
+-ftree-dom @gol
+-ftree-dse @gol
+-ftree-ter @gol
+-ftree-live_range_split @gol
+-ftree-sra @gol
+-ftree-copyrename @gol
+-ftree-fre @gol
+-ftree-ch @gol
+-fmerge-constants}
@option{-O} also turns on @option{-fomit-frame-pointer} on machines
where doing so does not interfere with debugging.
@option{-O2} turns on all optimization flags specified by @option{-O}. It
also turns on the following optimization flags:
-@gccoptlist{-fforce-mem @gol
+@gccoptlist{-fthread-jumps @gol
+-fcrossjumping @gol
-foptimize-sibling-calls @gol
--fstrength-reduce @gol
-fcse-follow-jumps -fcse-skip-blocks @gol
--frerun-cse-after-loop -frerun-loop-opt @gol
--fgcse -fgcse-lm -fgcse-sm -fgcse-las @gol
--fdelete-null-pointer-checks @gol
+-fgcse -fgcse-lm @gol
-fexpensive-optimizations @gol
--fregmove @gol
--fschedule-insns -fschedule-insns2 @gol
--fsched-interblock -fsched-spec @gol
+-fstrength-reduce @gol
+-frerun-cse-after-loop -frerun-loop-opt @gol
-fcaller-saves @gol
+-fforce-mem @gol
-fpeephole2 @gol
--freorder-blocks -freorder-functions @gol
+-fschedule-insns -fschedule-insns2 @gol
+-fsched-interblock -fsched-spec @gol
+-fregmove @gol
-fstrict-aliasing @gol
+-fdelete-null-pointer-checks @gol
+-freorder-blocks -freorder-functions @gol
-funit-at-a-time @gol
-falign-functions -falign-jumps @gol
-falign-loops -falign-labels @gol
--fcrossjumping}
+-ftree-pre}
Please note the warning under @option{-fgcse} about
invoking @option{-O2} on programs that use computed gotos.
@opindex O3
Optimize yet more. @option{-O3} turns on all optimizations specified by
@option{-O2} and also turns on the @option{-finline-functions},
-@option{-fweb} and @option{-fgcse-after-reload} options.
+@option{-funswitch-loops} and @option{-fgcse-after-reload} options.
@item -O0
@opindex O0
@item -fkeep-inline-functions
@opindex fkeep-inline-functions
-Even if all calls to a given function are integrated, and the function
-is declared @code{static}, nevertheless output a separate run-time
-callable version of the function. This switch does not affect
-@code{extern inline} functions.
+In C, emit @code{static} functions that are declared @code{inline}
+into the object file, even if the function has been inlined into all
+of its callers. This switch does not affect functions using the
+@code{extern inline} extension in GNU C@. In C++, emit any and all
+inline functions into the object file.
@item -fkeep-static-consts
@opindex fkeep-static-consts
Attempt to merge identical constants and identical variables.
This option implies @option{-fmerge-constants}. In addition to
-@option{-fmerge-constants} this considers e.g. even constant initialized
+@option{-fmerge-constants} this considers e.g.@: even constant initialized
arrays or initialized constant variables with integral or floating point
types. Languages like C or C++ require each non-automatic variable to
have distinct location, so using this option will result in non-conforming
pass. This pass looks at innermost loops and reorders their
instructions by overlapping different iterations.
-@item -fnew-ra
-@opindex fnew-ra
-Use a graph coloring register allocator. Currently this option is meant
-only for testing. Users should not specify this option, since it is not
-yet ready for production use.
-
@item -fno-branch-count-reg
@opindex fno-branch-count-reg
Do not use ``decrement and branch'' instructions on a count register,
second branch or a point immediately following it, depending on whether
the condition is known to be true or false.
-Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
+Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
@item -fcse-follow-jumps
@opindex fcse-follow-jumps
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.
+Not enabled at any optimization level.
@item -fgcse-las
@opindex fgcse-las
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.
+Not enabled at any optimization level.
@item -fgcse-after-reload
@opindex fgcse-after-reload
When @option{-fgcse-after-reload} is enabled, a redundant load elimination
-pass is performed after reload. The purpose of this pass is to cleanup
+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 and loop unrolling as
-well.
+exit test conditions and optionally do strength-reduction as well.
Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
@item -fcrossjumping
@opindex crossjumping
-Perform cross-jumping transformation. This transformation unifies equivalent code and save code size. The
+Perform cross-jumping transformation. This transformation unifies equivalent code and save code size. The
resulting code may or may not perform better than without cross-jumping.
-Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
+Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
@item -fif-conversion
@opindex if-conversion
trace formation.
This mode should produce faster but significantly longer programs. Also
-without @code{-fbranch-probabilities} the traces constructed may not match the
-reality and hurt the performance. This only makes
+without @option{-fbranch-probabilities} the traces constructed may not
+match the reality and hurt the performance. This only makes
sense when scheduling after register allocation, i.e.@: with
@option{-fschedule-insns2} or at @option{-O2} or higher.
+@item -freschedule-modulo-scheduled-loops
+@opindex fscheduling-in-modulo-scheduled-loops
+The modulo scheduling comes before the traditional scheduling, if a loop was modulo scheduled
+we may want to prevent the later scheduling passes from changing its schedule, we use this
+option to control that.
+
@item -fcaller-saves
@opindex fcaller-saves
Enable values to be allocated in registers that will be clobbered by
@item -ftree-pre
Perform Partial Redundancy Elimination (PRE) on trees. This flag is
-enabled by default at -O and higher.
+enabled by default at @option{-O2} and @option{-O3}.
@item -ftree-fre
Perform Full Redundancy Elimination (FRE) on trees. The difference
between FRE and PRE is that FRE only considers expressions
that are computed on all paths leading to the redundant computation.
This analysis faster than PRE, though it exposes fewer redundancies.
-This flag is enabled by default at -O and higher.
+This flag is enabled by default at @option{-O} and higher.
@item -ftree-ccp
Perform sparse conditional constant propagation (CCP) on trees. This flag
-is enabled by default at -O and higher.
+is enabled by default at @option{-O} and higher.
@item -ftree-dce
Perform dead code elimination (DCE) on trees. This flag is enabled by
-default at -O and higher.
+default at @option{-O} and higher.
@item -ftree-dominator-opts
Perform dead code elimination (DCE) on trees. This flag is enabled by
-default at -O and higher.
+default at @option{-O} and higher.
@item -ftree-ch
Perform loop header copying on trees. This is beneficial since it increases
-effectivity of code motion optimizations. It also saves one jump. This flag
-is enabled by default at -O and higher. It is not enabled for -Os, since it
-usually increases code size.
+effectiveness of code motion optimizations. It also saves one jump. This flag
+is enabled by default at @option{-O} and higher. It is not enabled
+for @option{-Os}, since it usually increases code size.
@item -ftree-loop-optimize
-Perform loop optimizations on trees. This flag is enabled by default at -O
-and higher.
+Perform loop optimizations on trees. This flag is enabled by default
+at @option{-O} and higher.
+
+@item -ftree-loop-linear
+Perform linear loop transformations on tree. This flag can improve cache
+performance and allow further loop optimizations to take place.
@item -ftree-lim
Perform loop invariant motion on trees. This pass moves only invartiants that
just trivial invariantness analysis in loop unswitching. The pass also includes
store motion.
+@item -fivcanon
+Create a canonical counter for number of iterations in the loop for that
+determining number of iterations requires complicated analysis. Later
+optimizations then may determine the number easily. Useful especially
+in connection with unrolling.
+
+@item -fivopts
+Perform induction variable optimizations (strength reduction, induction
+variable merging and induction variable elimination) on trees.
+
@item -ftree-sra
Perform scalar replacement of aggregates. This pass replaces structure
references with scalars to prevent committing structures to memory too
-early. This flag is enabled by default at -O and higher.
+early. This flag is enabled by default at @option{-O} and higher.
@item -ftree-copyrename
Perform copy renaming on trees. This pass attempts to rename compiler
temporaries to other variables at copy locations, usually resulting in
variable names which more closely resemble the original variables. This flag
-is enabled by default at -O and higher.
+is enabled by default at @option{-O} and higher.
@item -ftree-ter
Perform temporary expression replacement during the SSA->normal phase. Single
use/single def temporaries are replaced at their use location with their
defining expression. This results in non-GIMPLE code, but gives the expanders
much more complex trees to work on resulting in better RTL generation. This is
-enabled by default at -O and higher.
+enabled by default at @option{-O} and higher.
@item -ftree-lrs
Perform live range splitting during the SSA->normal phase. Distinct live
ranges of a variable are split into unique variables, allowing for better
-optimization later. This is enabled by default at -O and higher.
+optimization later. This is enabled by default at @option{-O} and higher.
+
+@item -ftree-vectorize
+Perform loop vectorization on trees.
@item -ftracer
@opindex ftracer
-Perform tail duplication to enlarge superblock size. This transformation
+Perform tail duplication to enlarge superblock size. This transformation
simplifies the control flow of the function allowing other optimizations to do
better job.
@option{-funroll-all-loops} implies the same options as
@option{-funroll-loops},
+@item -fsplit-ivs-in-unroller
+@opindex -fsplit-ivs-in-unroller
+Enables expressing of values of induction variables in later iterations
+of the unrolled loop using the value in the first iteration. This breaks
+long dependency chains, thus improving efficiency of the scheduling passes
+(for best results, @option{-fweb} should be used as well).
+
+Combination of @option{-fweb} and CSE is often sufficient to obtain the
+same effect. However in cases the loop body is more complicated than
+a single basic block, this is not reliable. It also does not work at all
+on some of the architectures due to restrictions in the CSE pass.
+
+This optimization is enabled by default.
+
+@item -fvariable-expansion-in-unroller
+@opindex -fvariable-expansion-in-unroller
+With this option, the compiler will create multiple copies of some
+local variables when unrolling a loop which can result in superior code.
+
@item -fprefetch-loop-arrays
@opindex fprefetch-loop-arrays
If supported by the target machine, generate instructions to prefetch
memory to improve the performance of loops that access large arrays.
-@item -fmove-all-movables
-@opindex fmove-all-movables
-Forces all invariant computations in loops to be moved
-outside the loop.
-
-@item -freduce-all-givs
-@opindex freduce-all-givs
-Forces all general-induction variables in loops to be
-strength-reduced.
-
-@emph{Note:} When compiling programs written in Fortran,
-@option{-fmove-all-movables} and @option{-freduce-all-givs} are enabled
-by default when you use the optimizer.
-
These options may generate better or worse code; results are highly
dependent on the structure of loops within the source code.
-These two options are intended to be removed someday, once
-they have helped determine the efficacy of various
-approaches to improving loop optimizations.
-
-Please contact @w{@email{gcc@@gcc.gnu.org}}, and describe how use of
-these options affects the performance of your production code.
-Examples of code that runs @emph{slower} when these options are
-@emph{enabled} are very valuable.
-
@item -fno-peephole
@itemx -fno-peephole2
@opindex fno-peephole
@item -fno-guess-branch-probability
@opindex fno-guess-branch-probability
-Do not guess branch probabilities using a randomized model.
-
-Sometimes GCC will opt to use a randomized model to guess branch
-probabilities, when none are available from either profiling feedback
-(@option{-fprofile-arcs}) or @samp{__builtin_expect}. This means that
-different runs of the compiler on the same program may produce different
-object code.
-
-In a hard real-time system, people don't want different runs of the
-compiler to produce code that has different behavior; minimizing
-non-determinism is of paramount import. This switch allows users to
-reduce non-determinism, possibly at the expense of inferior
-optimization.
+Do not guess branch probabilities using heuristics.
+
+GCC will use heuristics to guess branch probabilities if they are
+not provided by profiling feedback (@option{-fprofile-arcs}). These
+heuristics are based on the control flow graph. If some branch probabilities
+are specified by @samp{__builtin_expect}, then the heuristics will be
+used to guess branch probabilities for the rest of the control flow graph,
+taking the @samp{__builtin_expect} info into account. The interactions
+between the heuristics and @samp{__builtin_expect} can be complex, and in
+some cases, it may be useful to disable the heuristics so that the effects
+of @samp{__builtin_expect} are easier to understand.
The default is @option{-fguess-branch-probability} at levels
@option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
into separate sections of the assembly and .o files, to improve
paging and cache locality performance.
+This optimization is automatically turned off in the presence of
+exception handling, for linkonce sections, for functions with a user-defined
+section attribute and on any architecture that does not support named
+sections.
+
@item -freorder-functions
@opindex freorder-functions
-Reorder basic blocks in the compiled function in order to reduce number of
-taken branches and improve code locality. This is implemented by using special
+Reorder functions in the object file in order to
+improve code locality. This is implemented by using special
subsections @code{.text.hot} for most frequently executed functions and
@code{.text.unlikely} for unlikely executed functions. Reordering is done by
the linker so object file format must support named sections and linker must
@item
Static functions now can use non-standard passing conventions that
-may break @code{asm} statements calling functions directly. Again,
+may break @code{asm} statements calling functions directly. Again,
attribute @code{used} will prevent this behavior.
@end itemize
As a temporary workaround, @option{-fno-unit-at-a-time} can be used,
-but this scheme may not be supported by future releases of GCC.
+but this scheme may not be supported by future releases of GCC@.
Enabled at levels @option{-O2}, @option{-O3}.
Enable options usually used for instrumenting application to produce
profile useful for later recompilation with profile feedback based
-optimization. You must use @code{-fprofile-generate} both when
+optimization. You must use @option{-fprofile-generate} both when
compiling and when linking your program.
The following options are enabled: @code{-fprofile-arcs}, @code{-fprofile-values}, @code{-fvpt}.
Currently the optimizations include specialization of division operation
using the knowledge about the value of the denominator.
+@item -fspeculative-prefetching
+@opindex fspeculative-prefetching
+If combined with @option{-fprofile-arcs}, it instructs the compiler to add
+a code to gather information about addresses of memory references in the
+program.
+
+With @option{-fbranch-probabilities}, it reads back the data gathered
+and issues prefetch instructions according to them. In addition to the opportunities
+noticed by @option{-fprefetch-loop-arrays}, it also notices more complicated
+memory access patterns---for example accesses to the data stored in linked
+list whose elements are usually allocated sequentially.
+
+In order to prevent issuing double prefetches, usage of
+@option{-fspeculative-prefetching} implies @option{-fno-prefetch-loop-arrays}.
+
Enabled with @option{-fprofile-generate} and @option{-fprofile-use}.
@item -frename-registers
Not enabled by default at any level because it has known bugs.
-@item -fnew-ra
-@opindex fnew-ra
-Use a graph coloring register allocator. Currently this option is meant
-for testing, so we are interested to hear about miscompilations with
-@option{-fnew-ra}.
-
@item -ftracer
@opindex ftracer
-Perform tail duplication to enlarge superblock size. This transformation
+Perform tail duplication to enlarge superblock size. This transformation
simplifies the control flow of the function allowing other optimizations to do
better job.
Unroll loops whose number of iterations can be determined at compile time or
upon entry to the loop. @option{-funroll-loops} implies
@option{-frerun-cse-after-loop}. It also turns on complete loop peeling
-(i.e. complete removal of loops with small constant number of iterations).
+(i.e.@: complete removal of loops with small constant number of iterations).
This option makes code larger, and may or may not make it run faster.
Enabled with @option{-fprofile-use}.
@opindex fpeel-loops
Peels the loops for that there is enough information that they do not
roll much (from profile feedback). It also turns on complete loop peeling
-(i.e. complete removal of loops with small constant number of iterations).
+(i.e.@: complete removal of loops with small constant number of iterations).
Enabled with @option{-fprofile-use}.
Move branches with loop invariant conditions out of the loop, with duplicates
of the loop on both branches (modified according to result of the condition).
-@item -fold-unroll-loops
-@opindex fold-unroll-loops
-Unroll loops whose number of iterations can be determined at compile
-time or upon entry to the loop, using the old loop unroller whose loop
-recognition is based on notes from frontend. @option{-fold-unroll-loops} implies
-both @option{-fstrength-reduce} and @option{-frerun-cse-after-loop}. This
-option makes code larger, and may or may not make it run faster.
-
-@item -fold-unroll-all-loops
-@opindex fold-unroll-all-loops
-Unroll all loops, even if their number of iterations is uncertain when
-the loop is entered. This is done using the old loop unroller whose loop
-recognition is based on notes from frontend. This usually makes programs run more slowly.
-@option{-fold-unroll-all-loops} implies the same options as
-@option{-fold-unroll-loops}.
-
@item -fprefetch-loop-arrays
@opindex fprefetch-loop-arrays
If supported by the target machine, generate instructions to prefetch
@var{name} are given in the following table:
@table @gcctabopt
+@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
+default value, 0, implies that GCC will select the most appropriate
+size itself.
+
+@item sra-field-structure-ratio
+The threshold ratio (as a percentage) between instantiated fields and
+the complete structure size. We say that if the ratio of the number
+of bytes in instantiated fields to the number of bytes in the complete
+structure exceeds this parameter, then block copies are not used. The
+default is 75.
+
@item max-crossjump-edges
The maximum number of incoming edges to consider for crossjumping.
The algorithm used by @option{-fcrossjumping} is @math{O(N^2)} in
more aggressive optimization, making the compile time increase with
probably small improvement in executable size.
+@item min-crossjump-insns
+The minimum number of instructions which must be matched at the end
+of two blocks before crossjumping will be performed on them. This
+value is ignored in the case where all instructions in the block being
+crossjumped from are matched. The default value is 5.
+
+@item max-goto-duplication-insns
+The maximum number of instructions to duplicate to a block that jumps
+to a computed goto. To avoid @math{O(N^2)} behavior in a number of
+passes, GCC factors computed gotos early in the compilation process,
+and unfactors them as late as possible. Only computed jumps at the
+end of a basic blocks with no more than max-goto-duplication-insns are
+unfactored. The default value is 8.
+
@item max-delay-slot-insn-search
The maximum number of instructions to consider when looking for an
instruction to fill a delay slot. If more than this arbitrary number of
The default value is 120.
@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.
+The limit specifying really large functions. For functions larger than this
+limit after inlining 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 3000.
@item large-function-growth
Specifies maximal growth of large function caused by inlining in percents.
This parameter is ignored when @option{-funit-at-a-time} is not used.
-The default value is 200.
+The default value is 100 which limits large function growth to 2.0 times
+the original size.
@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.
+The default value is 50 which limits unit growth to 1.5 times the original
+size.
@item max-inline-insns-recursive
@itemx max-inline-insns-recursive-auto
enabled and @option{--param max-inline-recursive-depth-auto} is used. The
default value is 500.
-@item max-inline-insns-rtl
-For languages that use the RTL inliner (this happens at a later stage
-than tree inlining), you can set the maximum allowable size (counted
-in RTL instructions) for the RTL inliner with this parameter.
-The default value is 600.
-
@item max-unrolled-insns
The maximum number of instructions that a loop should have if that loop
is unrolled, and if the loop is unrolled, it determines how many times
@item lim-expensive
The minimum cost of an expensive expression in the loop invariant motion.
+@item iv-consider-all-candidates-bound
+Bound on number of candidates for induction variables below that
+all candidates are considered for each use in induction variable
+optimizations. Only the most relevant candidates are considered
+if there are more candidates, to avoid quadratic time complexity.
+
+@item iv-max-considered-uses
+The induction variable optimizations give up on loops that contain more
+induction variable uses.
+
+@item iv-always-prune-cand-set-bound
+If number of candidates in the set is smaller than this value,
+we always try to remove unnecessary ivs from the set during its
+optimization when a new iv is added to the set.
+
@item max-iterations-to-track
The maximum number of iterations of a loop the brute force algorithm
@item global-var-threshold
-Counts the number of function calls (N) and the number of
-call-clobbered variables (V). If NxV is larger than this limit, a
+Counts the number of function calls (@var{n}) and the number of
+call-clobbered variables (@var{v}). If @var{n}x@var{v} is larger than this limit, a
single artificial variable will be created to represent all the
call-clobbered variables at function call sites. This artificial
variable will then be made to alias every call-clobbered variable.
-(done as int * size_t on the host machine; beware overflow).
+(done as @code{int * size_t} on the host machine; beware overflow).
@item max-aliased-vops
-Maxiumum number of virtual operands allowed to represent aliases
+Maximum number of virtual operands allowed to represent aliases
before triggering the alias grouping heuristic. Alias grouping
reduces compile times and memory consumption needed for aliasing at
the expense of precision loss in alias information.
generation.
The default is 30% + 70% * (RAM/1GB) with an upper bound of 100% when
-RAM >= 1GB. If @code{getrlimit} is available, the notion of "RAM" is
-the smallest of actual RAM, RLIMIT_RSS, RLIMIT_DATA and RLIMIT_AS. If
+RAM >= 1GB@. If @code{getrlimit} is available, the notion of "RAM" is
+the smallest of actual RAM and @code{RLIMIT_DATA} or @code{RLIMIT_AS}. If
GCC is not able to calculate RAM on a particular platform, the lower
bound of 30% is used. Setting this parameter and
@option{ggc-min-heapsize} to zero causes a full collection to occur at
tuning this may improve compilation speed, and has no effect on code
generation.
-The default is RAM/8, with a lower bound of 4096 (four megabytes) and an
-upper bound of 131072 (128 megabytes). If @code{getrlimit} is
-available, the notion of "RAM" is the smallest of actual RAM,
-RLIMIT_RSS, RLIMIT_DATA and RLIMIT_AS. If GCC is not able to calculate
-RAM on a particular platform, the lower bound is used. Setting this
-parameter very large effectively disables garbage collection. Setting
-this parameter and @option{ggc-min-expand} to zero causes a full
-collection to occur at every opportunity.
+The default is the smaller of RAM/8, RLIMIT_RSS, or a limit which
+tries to ensure that RLIMIT_DATA or RLIMIT_AS are not exceeded, but
+with a lower bound of 4096 (four megabytes) and an upper bound of
+131072 (128 megabytes). If GCC is not able to calculate RAM on a
+particular platform, the lower bound is used. Setting this parameter
+very large effectively disables garbage collection. Setting this
+parameter and @option{ggc-min-expand} to zero causes a full collection
+to occur at every opportunity.
@item max-reload-search-insns
The maximum number of instruction reload should look backward for equivalent
@item max-sched-region-insns
The maximum number of insns in a region to be considered for
interblock scheduling. The default value is 100.
+
+@item max-last-value-rtl
+
+The maximum size measured as number of RTLs that can be recorded in an expression
+in combiner for a pseudo register as last known value of that register. The default
+is 10000.
+
+@item integer-share-limit
+Small integer constants can use a shared data structure, reducing the
+compiler's memory usage and increasing its speed. This sets the maximum
+value of a shared integer constant's. The default value is 256.
+
@end table
@end table
@item -lobjc
@opindex lobjc
You need this special case of the @option{-l} option in order to
-link an Objective-C program.
+link an Objective-C or Objective-C++ program.
@item -nostartfiles
@opindex nostartfiles
contain startup files. If the target supports multilibs then the
current multilib directory will be prepended to each of these paths.
-@item %M
-Output the multilib directory with directory separators replaced with
-@samp{_}. If multilib directories are not set, or the multilib directory is
-@file{.} then this option emits nothing.
-
@item %L
Process the @code{lib} spec. This is a spec string for deciding which
libraries should be included on the command line to the linker.
crt0%O%s %:if-exists(crti%O%s) \
%:if-exists-else(crtbeginT%O%s crtbegin%O%s)
@end smallexample
+
+@item @code{replace-outfile}
+The @code{replace-outfile} spec function takes two arguments. It looks for the
+first argument in the outfiles array and replaces it with the second argument. Here
+is a small example of its usage:
+
+@smallexample
+%@{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)@}
+@end smallexample
+
@end table
@item %@{@code{S}@}
@table @gcctabopt
@item -mabi=@var{name}
@opindex mabi
-Generate code for the specified ABI. Permissible values are: @samp{apcs-gnu},
+Generate code for the specified ABI@. Permissible values are: @samp{apcs-gnu},
@samp{atpcs}, @samp{aapcs} and @samp{iwmmxt}.
@item -mapcs-frame
@samp{arm620}, @samp{arm7}, @samp{arm7m}, @samp{arm7d}, @samp{arm7dm},
@samp{arm7di}, @samp{arm7dmi}, @samp{arm70}, @samp{arm700},
@samp{arm700i}, @samp{arm710}, @samp{arm710c}, @samp{arm7100},
-@samp{arm7500}, @samp{arm7500fe}, @samp{arm7tdmi}, @samp{arm8},
-@samp{strongarm}, @samp{strongarm110}, @samp{strongarm1100},
+@samp{arm7500}, @samp{arm7500fe}, @samp{arm7tdmi}, @samp{arm7tdmi-s},
+@samp{arm8}, @samp{strongarm}, @samp{strongarm110}, @samp{strongarm1100},
@samp{arm8}, @samp{arm810}, @samp{arm9}, @samp{arm9e}, @samp{arm920},
-@samp{arm920t}, @samp{arm926ejs}, @samp{arm940t}, @samp{arm9tdmi},
-@samp{arm10tdmi}, @samp{arm1020t}, @samp{arm1026ejs},
-@samp{arm1136js}, @samp{arm1136jfs} ,@samp{xscale}, @samp{iwmmxt},
+@samp{arm920t}, @samp{arm922t}, @samp{arm946e-s}, @samp{arm966e-s},
+@samp{arm968e-s}, @samp{arm926ej-s}, @samp{arm940t}, @samp{arm9tdmi},
+@samp{arm10tdmi}, @samp{arm1020t}, @samp{arm1026ej-s},
+@samp{arm10e}, @samp{arm1020e}, @samp{arm1022e},
+@samp{arm1136j-s}, @samp{arm1136jf-s}, @samp{mpcore}, @samp{mpcorenovfp},
+@samp{arm1176jz-s}, @samp{arm1176jzf-s}, @samp{xscale}, @samp{iwmmxt},
@samp{ep9312}.
@itemx -mtune=@var{name}
@item -mint8
@opindex mint8
-Assume int to be 8 bit integer. This affects the sizes of all types: A
+Assume int to be 8 bit integer. This affects the sizes of all types: A
char will be 1 byte, an int will be 1 byte, an long will be 2 bytes
-and long long will be 4 bytes. Please note that this option does not
+and long long will be 4 bytes. Please note that this option does not
comply to the C standards, but it will provide you with smaller code
size.
@end table
@opindex mcpu
Generate code for the specified architecture. The choices for
@var{architecture-type} are @samp{v3}, @samp{v8} and @samp{v10} for
-respectively ETRAX@w{ }4, ETRAX@w{ }100, and ETRAX@w{ }100@w{ }LX.
+respectively ETRAX@w{ }4, ETRAX@w{ }100, and ETRAX@w{ }100@w{ }LX@.
Default is @samp{v0} except for cris-axis-linux-gnu, where the default is
@samp{v10}.
With @option{-fpic} and @option{-fPIC}, don't generate (do generate)
instruction sequences that load addresses for functions from the PLT part
of the GOT rather than (traditional on other architectures) calls to the
-PLT. The default is @option{-mgotplt}.
+PLT@. The default is @option{-mgotplt}.
@item -maout
@opindex maout
@cindex Darwin options
These options are defined for all architectures running the Darwin operating
-system. They are useful for compatibility with other Mac OS compilers.
+system.
+
+FSF GCC on Darwin does not create ``fat'' object files; it will create
+an object file for the single architecture that it was built to
+target. Apple's GCC on Darwin does create ``fat'' files if multiple
+@option{-arch} options are used; it does so by running the compiler or
+linker multiple times and joining the results together with
+@file{lipo}.
+
+The subtype of the file created (like @samp{ppc7400} or @samp{ppc970} or
+@samp{i686}) is determined by the flags that specify the ISA
+that GCC is targetting, like @option{-mcpu} or @option{-march}. The
+@option{-force_cpusubtype_ALL} option can be used to override this.
+
+The Darwin tools vary in their behaviour when presented with an ISA
+mismatch. The assembler, @file{as}, will only permit instructions to
+be used that are valid for the subtype of the file it is generating,
+so you cannot put 64-bit instructions in an @samp{ppc750} object file.
+The linker for shared libraries, @file{/usr/bin/libtool}, will fail
+and print an error if asked to create a shared library with a less
+restrictive subtype than its input files (for instance, trying to put
+a @samp{ppc970} object file in a @samp{ppc7400} library). The linker
+for executables, @file{ld}, will quietly give the executable the most
+restrictive subtype of any of its input files.
@table @gcctabopt
@item -F@var{dir}
framework, a warning will be issued if this is violated. Currently a
subframework cannot have subframeworks, in the future, the mechanism
may be extended to support this. The standard frameworks can be found
-in @samp{"/System/Library/Frameworks"}, @samp{"/Library/Frameworks"}
-and @samp{"/Local/Library/Frameworks"}. An example include looks like
+in @samp{"/System/Library/Frameworks"} and
+@samp{"/Library/Frameworks"}. An example include looks like
@code{#include <Framework/header.h>}, where @samp{Framework} denotes
the name of the framework and header.h is found in the
@samp{"PrivateHeaders"} or @samp{"Headers"} directory.
+@item -gused
+@opindex -gused
+Emit debugging information for symbols that are used. For STABS
+debugging format, this enables @option{-feliminate-unused-debug-symbols}.
+This is by default ON@.
+
+@item -gfull
+@opindex -gfull
+Emit debugging information for all symbols and types.
+
+@item -mone-byte-bool
+@opindex -mone-byte-bool
+Override the defaults for @samp{bool} so that @samp{sizeof(bool)==1}.
+By default @samp{sizeof(bool)} is @samp{4} when compiling for
+Darwin/PowerPC and @samp{1} when compiling for Darwin/x86, so this
+option has no effect on x86.
+
+@strong{Warning:} The @option{-mone-byte-bool} switch causes GCC
+to generate code that is not binary compatible with code generated
+without that switch. Using this switch may require recompiling all
+other modules in a program, including system libraries. Use this
+switch to conform to a non-default data model.
+
+@item -mfix-and-continue
+@itemx -ffix-and-continue
+@itemx -findirect-data
+@opindex mfix-and-continue
+@opindex ffix-and-continue
+@opindex findirect-data
+Generate code suitable for fast turn around development. Needed to
+enable gdb to dynamically load @code{.o} files into already running
+programs. @option{-findirect-data} and @option{-ffix-and-continue}
+are provided for backwards compatibility.
+
@item -all_load
@opindex all_load
Loads all members of static archive libraries.
@item -bundle_loader @var{executable}
@opindex bundle_loader
-This specifies the @var{executable} that will be loading the build
-output file being linked. See man ld(1) for more information.
+This option specifies the @var{executable} that will be loading the build
+output file being linked. See man ld(1) for more information.
-@item -allowable_client @var{client_name}
-@itemx -arch_only
+@item -dynamiclib
+@opindex -dynamiclib
+When passed this option, GCC will produce a dynamic library instead of
+an executable when linking, using the Darwin @file{libtool} command.
+@item -force_cpusubtype_ALL
+@opindex -force_cpusubtype_ALL
+This causes GCC's output file to have the @var{ALL} subtype, instead of
+one controlled by the @option{-mcpu} or @option{-march} option.
+
+@item -allowable_client @var{client_name}
@itemx -client_name
@itemx -compatibility_version
@itemx -current_version
+@itemx -dead_strip
@itemx -dependency-file
@itemx -dylib_file
@itemx -dylinker_install_name
@itemx -dynamic
-@itemx -dynamiclib
@itemx -exported_symbols_list
@itemx -filelist
@itemx -flat_namespace
-@itemx -force_cpusubtype_ALL
@itemx -force_flat_namespace
@itemx -headerpad_max_install_names
@itemx -image_base
@itemx -multiply_defined
@itemx -multiply_defined_unused
@itemx -noall_load
+@itemx -no_dead_strip_inits_and_terms
@itemx -nofixprebinding
@itemx -nomultidefs
@itemx -noprebind
@itemx -sectcreate
@itemx -sectobjectsymbols
@itemx -sectorder
+@itemx -segaddr
+@itemx -segs_read_only_addr
+@itemx -segs_read_write_addr
@itemx -seg_addr_table
@itemx -seg_addr_table_filename
@itemx -seglinkedit
@itemx -whatsloaded
@opindex allowable_client
-@opindex arch_only
@opindex client_name
@opindex compatibility_version
@opindex current_version
+@opindex dead_strip
@opindex dependency-file
@opindex dylib_file
@opindex dylinker_install_name
@opindex dynamic
-@opindex dynamiclib
@opindex exported_symbols_list
@opindex filelist
@opindex flat_namespace
-@opindex force_cpusubtype_ALL
@opindex force_flat_namespace
@opindex headerpad_max_install_names
@opindex image_base
@opindex multiply_defined
@opindex multiply_defined_unused
@opindex noall_load
+@opindex no_dead_strip_inits_and_terms
@opindex nofixprebinding
@opindex nomultidefs
@opindex noprebind
@opindex sectcreate
@opindex sectobjectsymbols
@opindex sectorder
+@opindex segaddr
+@opindex segs_read_only_addr
+@opindex segs_read_write_addr
@opindex seg_addr_table
@opindex seg_addr_table_filename
@opindex seglinkedit
@opindex weak_reference_mismatches
@opindex whatsloaded
-These options are available for Darwin linker. Darwin linker man page
+These options are passed to the Darwin linker. The Darwin linker man page
describes them in detail.
@end table
directly accessed via a single instruction.
The default is @option{-mlarge-data}. With this option the data area
-is limited to just below 2GB. Programs that require more than 2GB of
+is limited to just below 2GB@. Programs that require more than 2GB of
data must use @code{malloc} or @code{mmap} to allocate the data in the
heap instead of in the program's data segment.
Do not use multiply and add/subtract instructions.
+@item -mfdpic
+@opindex mfdpic
+
+Select the FDPIC ABI, that uses function descriptors to represent
+pointers to functions. Without any PIC/PIE-related options, it
+implies @option{-fPIE}. With @option{-fpic} or @option{-fpie}, it
+assumes GOT entries and small data are within a 12-bit range from the
+GOT base address; with @option{-fPIC} or @option{-fPIE}, GOT offsets
+are computed with 32 bits.
+
+@item -minline-plt
+@opindex minline-plt
+
+Enable inlining of PLT entries in function calls to functions that are
+not known to bind locally. It has no effect without @option{-mfdpic}.
+It's enabled by default if optimizing for speed and compiling for
+shared libraries (i.e., @option{-fPIC} or @option{-fpic}), or when an
+optimization option such as @option{-O3} or above is present in the
+command line.
+
+@item -mTLS
+@opindex TLS
+
+Assume a large TLS segment when generating thread-local code.
+
+@item -mtls
+@opindex tls
+
+Do not assume a large TLS segment when generating thread-local code.
+
+@item -mgprel-ro
+@opindex mgprel-ro
+
+Enable the use of @code{GPREL} relocations in the FDPIC ABI for data
+that is known to be in read-only sections. It's enabled by default,
+except for @option{-fpic} or @option{-fpie}: even though it may help
+make the global offset table smaller, it trades 1 instruction for 4.
+With @option{-fPIC} or @option{-fPIE}, it trades 3 instructions for 4,
+one of which may be shared by multiple symbols, and it avoids the need
+for a GOT entry for the referenced symbol, so it's more likely to be a
+win. If it is not, @option{-mno-gprel-ro} can be used to disable it.
+
+@item -multilib-library-pic
+@opindex multilib-library-pic
+
+Link with the (library, not FD) pic libraries. It's implied by
+@option{-mlibrary-pic}, as well as by @option{-fPIC} and
+@option{-fpic} without @option{-mfdpic}. You should never have to use
+it explicitly.
+
+@item -mlinked-fp
+@opindex mlinked-fp
+
+Follow the EABI requirement of always creating a frame pointer whenever
+a stack frame is allocated. This option is enabled by default and can
+be disabled with @option{-mno-linked-fp}.
+
+@item -mlong-calls
+@opindex mlong-calls
+
+Use indirect addressing to call functions outside the current
+compilation unit. This allows the functions to be placed anywhere
+within the 32-bit address space.
+
+@item -malign-labels
+@opindex malign-labels
+
+Try to align labels to an 8-byte boundary by inserting nops into the
+previous packet. This option only has an effect when VLIW packing
+is enabled. It doesn't create new packets; it merely adds nops to
+existing ones.
+
@item -mlibrary-pic
@opindex mlibrary-pic
@opindex mcpu
Select the processor type for which to generate code. Possible values are
-@samp{simple}, @samp{tomcat}, @samp{fr500}, @samp{fr400}, @samp{fr300},
-@samp{frv}.
+@samp{frv}, @samp{fr550}, @samp{tomcat}, @samp{fr500}, @samp{fr450},
+@samp{fr405}, @samp{fr400}, @samp{fr300} and @samp{simple}.
@end table
@item -mn
@opindex mn
Generate code for the H8S and H8/300H in the normal mode. This switch
-must be used either with -mh or -ms.
+must be used either with @option{-mh} or @option{-ms}.
@item -ms2600
@opindex ms2600
architectures will run on higher numbered architectures, but not the
other way around.
-PA 2.0 support currently requires gas snapshot 19990413 or later. The
-next release of binutils (current is 2.9.1) will probably contain PA 2.0
-support.
-
@item -mpa-risc-1-0
@itemx -mpa-risc-1-1
@itemx -mpa-risc-2-0
This option will not work in the presence of shared libraries or nested
functions.
+@item -mfixed-range=@var{register-range}
+@opindex mfixed-range
+Generate code treating the given register range as fixed registers.
+A fixed register is one that the register allocator can not use. This is
+useful when compiling kernel code. A register range is specified as
+two registers separated by a dash. Multiple register ranges can be
+specified separated by a comma.
+
@item -mlong-load-store
@opindex mlong-load-store
Generate 3-instruction load and store sequences as sometimes required by
@item -msio
@opindex msio
-Generate the predefine, @code{_SIO}, for server IO. The default is
+Generate the predefine, @code{_SIO}, for server IO@. The default is
@option{-mwsio}. This generates the predefines, @code{__hp9000s700},
-@code{__hp9000s700__} and @code{_WSIO}, for workstation IO. These
-options are available under HP-UX and HI-UX.
+@code{__hp9000s700__} and @code{_WSIO}, for workstation IO@. These
+options are available under HP-UX and HI-UX@.
@item -mgnu-ld
@opindex gnu-ld
@env{PATH}. The linker used by GCC can be printed using @samp{which
`gcc -print-prog-name=ld`}.
-@item -mfdpic
-@opindex mfdpic
-
-Select the FDPIC ABI, that uses function descriptors to represent
-pointers to functions. Without any PIC/PIE-related options, it
-implies @option{-fPIE}. With @option{-fpic} or @option{-fpie}, it
-assumes GOT entries and small data are within a 12-bit range from the
-GOT base address; with @option{-fPIC} or @option{-fPIE}, GOT offsets
-are computed with 32 bits.
-
-@item -minline-plt
-@opindex minline-plt
-
-Enable inlining of PLT entries in function calls to functions that are
-not known to bind locally. It has no effect without @option{-mfdpic}.
-It's enabled by default if optimizing for speed and compiling for
-shared libraries (i.e., @option{-fPIC} or @option{-fpic}), or when an
-optimization option such as @option{-O3} or above is present in the
-command line.
-
-@item -mgprel-ro
-@opindex mgprel-ro
-
-Enable the use of @code{GPREL} relocations in the FDPIC ABI for data
-that is known to be in read-only sections. It's enabled by default,
-except for @option{-fpic} or @option{-fpie}: even though it may help
-make the global offset table smaller, it trades 1 instruction for 4.
-With @option{-fPIC} or @option{-fPIE}, it trades 3 instructions for 4,
-one of which may be shared by multiple symbols, and it avoids the need
-for a GOT entry for the referenced symbol, so it's more likely to be a
-win. If it is not, @option{-mno-gprel-ro} can be used to disable it.
-
-@item -multilib-library-pic
-@opindex multilib-library-pic
-
-Link with the (library, not FD) pic libraries. It's implied by
-@option{-mlibrary-pic}, as well as by @option{-fPIC} and
-@option{-fpic} without @option{-mfdpic}. You should never have to use
-it explicitly.
-
-@item -mlinked-fp
-@opindex mlinked-fp
-
-Follow the EABI requirement of always creating a frame pointer whenever
-a stack frame is allocated. This option is enabled by default and can
-be disabled with @option{-mno-linked-fp}.
-
@item -mlong-calls
@opindex mno-long-calls
Generate code that uses long call sequences. This ensures that a call
However, an indirect call is used on 32-bit ELF systems in pic code
and it is quite long.
+@item -munix=@var{unix-std}
+@opindex march
+Generate compiler predefines and select a startfile for the specified
+UNIX standard. The choices for @var{unix-std} are @samp{93}, @samp{95}
+and @samp{98}. @samp{93} is supported on all HP-UX versions. @samp{95}
+is available on HP-UX 10.10 and later. @samp{98} is available on HP-UX
+11.11 and later. The default values are @samp{93} for HP-UX 10.00,
+@samp{95} for HP-UX 10.10 though to 11.00, and @samp{98} for HP-UX 11.11
+and later.
+
+@option{-munix=93} provides the same predefines as GCC 3.3 and 3.4.
+@option{-munix=95} provides additional predefines for @code{XOPEN_UNIX}
+and @code{_XOPEN_SOURCE_EXTENDED}, and the startfile @file{unix95.o}.
+@option{-munix=98} provides additional predefines for @code{_XOPEN_UNIX},
+@code{_XOPEN_SOURCE_EXTENDED}, @code{_INCLUDE__STDC_A1_SOURCE} and
+@code{_INCLUDE_XOPEN_SOURCE_500}, and the startfile @file{unix98.o}.
+
+It is @emph{important} to note that this option changes the interfaces
+for various library routines. It also affects the operational behavior
+of the C library. Thus, @emph{extreme} care is needed in using this
+option.
+
+Library code that is intended to operate with more than one UNIX
+standard must test, set and restore the variable @var{__xpg4_extended_mask}
+as appropriate. Most GNU software doesn't provide this capability.
+
@item -nolibdld
@opindex nolibdld
Suppress the generation of link options to search libdld.sl when the
@item -threads
@opindex threads
Add support for multithreading with the @dfn{dce thread} library
-under HP-UX. This option sets flags for both the preprocessor and
+under HP-UX@. This option sets flags for both the preprocessor and
linker.
@end table
@var{cpu-type} are:
@table @emph
@item i386
-Original Intel's i386 CPU.
+Original Intel's i386 CPU@.
@item i486
-Intel's i486 CPU. (No scheduling is implemented for this chip.)
+Intel's i486 CPU@. (No scheduling is implemented for this chip.)
@item i586, pentium
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
-Intel PentiumPro CPU.
+Intel PentiumPro CPU@.
@item pentium2
Intel Pentium2 CPU based on PentiumPro core with MMX instruction set support.
@item pentium3, pentium3m
IDT Winchip2 CPU, dealt in same way as i486 with additional MMX and 3dNOW!
instruction set support.
@item c3
-Via C3 CPU with MMX and 3dNOW! instruction set support. (No scheduling is
+Via C3 CPU with MMX and 3dNOW! instruction set support. (No scheduling is
implemented for this chip.)
@item c3-2
Via C3-2 CPU with MMX and SSE instruction set support. (No scheduling is
emulated otherwise. Code compiled with this option will run almost everywhere.
The temporary results are computed in 80bit precision instead of precision
specified by the type resulting in slightly different results compared to most
-of other chips. See @option{-ffloat-store} for more detailed description.
+of other chips. See @option{-ffloat-store} for more detailed description.
This is the default choice for i386 compiler.
only in Pentium4 and the future AMD x86-64 chips supports double precision
arithmetics too.
-For i387 you need to use @option{-march=@var{cpu-type}}, @option{-msse} or
-@option{-msse2} switches to enable SSE extensions and make this option
-effective. For x86-64 compiler, these extensions are enabled by default.
+For the i386 compiler, you need to use @option{-march=@var{cpu-type}}, @option{-msse}
+or @option{-msse2} switches to enable SSE extensions and make this option
+effective. For the x86-64 compiler, these extensions are enabled by default.
The resulting code should be considerably faster in the majority of cases and avoid
the numerical instability problems of 387 code, but may break some existing
@item -masm=@var{dialect}
@opindex masm=@var{dialect}
-Output asm instructions using selected @var{dialect}. Supported choices are
+Output asm instructions using selected @var{dialect}. Supported choices are
@samp{intel} or @samp{att} (the default one).
@item -mieee-fp
@itemx -m128bit-long-double
@opindex m96bit-long-double
@opindex m128bit-long-double
-These switches control the size of @code{long double} type. The i386
+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.
Generate (or don't) a stop bit immediately before and after volatile asm
statements.
-@item -mb-step
-@opindex mb-step
-Generate code that works around Itanium B step errata.
-
@item -mregister-names
@itemx -mno-register-names
@opindex mregister-names
Generate code for inline divides of integer values
using the maximum throughput algorithm.
+@item -minline-sqrt-min-latency
+@opindex minline-sqrt-min-latency
+Generate code for inline square roots
+using the minimum latency algorithm.
+
+@item -minline-sqrt-max-throughput
+@opindex minline-sqrt-max-throughput
+Generate code for inline square roots
+using the maximum throughput algorithm.
+
@item -mno-dwarf2-asm
@itemx -mdwarf2-asm
@opindex mno-dwarf2-asm
Don't (or do) generate assembler code for the DWARF2 line number debugging
info. This may be useful when not using the GNU assembler.
+@item -mearly-stop-bits
+@itemx -mno-early-stop-bits
+@opindex mearly-stop-bits
+@opindex mno-early-stop-bits
+Allow stop bits to be placed earlier than immediately preceding the
+instruction that triggered the stop bit. This can improve instruction
+scheduling, but does not always do so.
+
@item -mfixed-range=@var{register-range}
@opindex mfixed-range
Generate code treating the given register range as fixed registers.
two registers separated by a dash. Multiple register ranges can be
specified separated by a comma.
-@item -mearly-stop-bits
-@itemx -mno-early-stop-bits
-@opindex mearly-stop-bits
-@opindex mno-early-stop-bits
-Allow stop bits to be placed earlier than immediately preceding the
-instruction that triggered the stop bit. This can improve instruction
-scheduling, but does not always do so.
+@item -mtls-size=@var{tls-size}
+@opindex mtls-size
+Specify bit size of immediate TLS offsets. Valid values are 14, 22, and
+64.
+
+@item -mtune-arch=@var{cpu-type}
+@opindex mtune-arch
+Tune the instruction scheduling for a particular CPU, Valid values are
+itanium, itanium1, merced, itanium2, and mckinley.
+
+@item -mt
+@itemx -pthread
+@opindex mt
+@opindex pthread
+Add support for multithreading using the POSIX threads library. This
+option sets flags for both the preprocessor and linker. It does
+not affect the thread safety of object code produced by the compiler or
+that of libraries supplied with it. These are HP-UX specific flags.
+
+@item -milp32
+@itemx -mlp64
+@opindex milp32
+@opindex mlp64
+Generate code for a 32-bit or 64-bit environment.
+The 32-bit environment sets int, long and pointer to 32 bits.
+The 64-bit environment sets int to 32 bits and long and pointer
+to 64 bits. These are HP-UX specific flags.
+
@end table
@node M32R/D Options
@item -msep-data
Generate code that allows the data segment to be located in a different
area of memory from the text segment. This allows for execute in place in
-an environment without virtual memory management. This option implies -fPIC.
+an environment without virtual memory management. This option implies
+@option{-fPIC}.
@item -mno-sep-data
Generate code that assumes that the data segment follows the text segment.
@item -mid-shared-library
Generate code that supports shared libraries via the library ID method.
This allows for execute in place and shared libraries in an environment
-without virtual memory management. This option implies -fPIC.
+without virtual memory management. This option implies @option{-fPIC}.
@item -mno-id-shared-library
Generate code that doesn't assume ID based shared libraries are being used.
@itemx -mno-mips16
@opindex mips16
@opindex mno-mips16
-Use (do not use) the MIPS16 ISA.
+Use (do not use) the MIPS16 ISA@.
@item -mabi=32
@itemx -mabi=o64
Lift (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.
+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:
Assume that the floating-point coprocessor supports double-precision
operations. This is the default.
+@itemx -mpaired-single
+@itemx -mno-paired-single
+@opindex mpaired-single
+@opindex mno-paired-single
+Use (do not use) paired-single floating-point instructions.
+@xref{MIPS Paired-Single Support}. This option can only be used
+when generating 64-bit code and requires hardware floating-point
+support to be enabled.
+
+@itemx -mips3d
+@itemx -mno-mips3d
+@opindex mips3d
+@opindex mno-mips3d
+Use (do not use) the MIPS-3D ASE@. @xref{MIPS-3D Built-in Functions}.
+The option @option{-mips3d} implies @option{-mpaired-single}.
+
@item -mint64
@opindex mint64
Force @code{int} and @code{long} types to be 64 bits wide. See
@option{-mlong32} for an explanation of the default and the way
that the pointer size is determined.
+This option has been deprecated and will be removed in a future release.
+
@item -mlong64
@opindex mlong64
Force @code{long} types to be 64 bits wide. See @option{-mlong32} for
addresses. The alternative, selected by @option{-mno-explicit-relocs},
is to use assembler macros instead.
-@option{-mexplicit-relocs} is usually the default if GCC was configured
-to use an assembler that supports relocation operators. However, the
-combination of @option{-mabicalls} and @option{-fno-unit-at-a-time}
-implies @option{-mno-explicit-relocs} unless explicitly overridden.
-This is because, when generating abicalls, the choice of relocation
-depends on whether a symbol is local or global. In some rare cases,
-GCC will not be able to decide this until the whole compilation unit
-has been read.
-
-@item -mrnames
-@itemx -mno-rnames
-@opindex mrnames
-@opindex mno-rnames
-Generate (do not generate) code that refers to registers using their
-software names. The default is @option{-mno-rnames}, which tells GCC
-to use hardware names like @samp{$4} instead of software names like
-@samp{a0}. The only assembler known to support @option{-rnames} is
-the Algorithmics assembler.
+@option{-mexplicit-relocs} is the default if GCC was configured
+to use an assembler that supports relocation operators.
@item -mcheck-zero-division
@itemx -mno-check-zero-division
Trap (do not trap) on integer division by zero. The default is
@option{-mcheck-zero-division}.
+@item -mdivide-traps
+@itemx -mdivide-breaks
+@opindex mdivide-traps
+@opindex mdivide-breaks
+MIPS systems check for division by zero by generating either a
+conditional trap or a break instruction. Using traps results in
+smaller code, but is only supported on MIPS II and later. Also, some
+versions of the Linux kernel have a bug that prevents trap from
+generating the proper signal (@code{SIGFPE}). Use @option{-mdivide-traps} to
+allow conditional traps on architectures that support them and
+@option{-mdivide-breaks} to force the use of breaks.
+
+The default is usually @option{-mdivide-traps}, but this can be
+overridden at configure time using @option{--with-divide=breaks}.
+Divide-by-zero checks can be completely disabled using
+@option{-mno-check-zero-division}.
+
@item -mmemcpy
@itemx -mno-memcpy
@opindex mmemcpy
@opindex mmad
@opindex mno-mad
Enable (disable) use of the @code{mad}, @code{madu} and @code{mul}
-instructions, as provided by the R4650 ISA.
+instructions, as provided by the R4650 ISA@.
@item -mfused-madd
@itemx -mno-fused-madd
@item -msplit
@opindex msplit
-Generate code for a system with split I&D.
+Generate code for a system with split I&D@.
@item -mno-split
@opindex mno-split
-Generate code for a system without split I&D. This is the default.
+Generate code for a system without split I&D@. This is the default.
@item -munix-asm
@opindex munix-asm
@itemx -mno-altivec
@opindex maltivec
@opindex mno-altivec
-These switches enable or disable the use of built-in functions that
-allow access to the AltiVec instruction set. You may also need to set
+Generate code that uses (does not use) AltiVec instructions, and also
+enable the use of built-in functions that allow more direct access to
+the AltiVec instruction set. You may also need to set
@option{-mabi=altivec} to adjust the current ABI with AltiVec ABI
enhancements.
@item -mabi=no-spe
@opindex mabi=no-spe
-Disable Booke SPE ABI extensions for the current ABI.
+Disable Booke SPE ABI extensions for the current ABI@.
@item -misel=@var{yes/no}
@itemx -misel
This switch enables or disables the generation of SPE simd
instructions.
-@item -mfloat-gprs=@var{yes/no}
+@item -mfloat-gprs=@var{yes/single/double/no}
@itemx -mfloat-gprs
@opindex mfloat-gprs
This switch enables or disables the generation of floating point
operations on the general purpose registers for architectures that
-support it. This option is currently only available on the MPC8540.
+support it.
+
+The argument @var{yes} or @var{single} enables the use of
+single-precision floating point operations.
+
+The argument @var{double} enables the use of single and
+double-precision floating point operations.
+
+The argument @var{no} disables floating point operations on the
+general purpose registers.
+
+This option is currently only available on the MPC854x.
+
+@item -m32
+@itemx -m64
+@opindex m32
+@opindex m64
+Generate code for 32-bit or 64-bit environments of Darwin and SVR4
+targets (including GNU/Linux). The 32-bit environment sets int, long
+and pointer to 32 bits and generates code that runs on any PowerPC
+variant. The 64-bit environment sets int to 32 bits and long and
+pointer to 64 bits, and generates code for PowerPC64, as for
+@option{-mpowerpc64}.
@item -mfull-toc
@itemx -mno-fp-in-toc
@option{-mpowerpc}, while @option{-maix32} disables the 64-bit ABI and
implies @option{-mno-powerpc64}. GCC defaults to @option{-maix32}.
-@item -mxl-call
-@itemx -mno-xl-call
-@opindex mxl-call
-@opindex mno-xl-call
-On AIX, pass floating-point arguments to prototyped functions beyond the
-register save area (RSA) on the stack in addition to argument FPRs. The
-AIX calling convention was extended but not initially documented to
+@item -mxl-compat
+@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.
+
+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
compilers access floating point arguments which do not fit in the
@itemx -malign-power
@opindex malign-natural
@opindex malign-power
-On AIX, Darwin, and 64-bit PowerPC GNU/Linux, the option
+On AIX, 32-bit Darwin, and 64-bit PowerPC GNU/Linux, the option
@option{-malign-natural} overrides the ABI-defined alignment of larger
types, such as floating-point doubles, on their natural size-based boundary.
The option @option{-malign-power} instructs GCC to follow the ABI-specified
-alignment rules. GCC defaults to the standard alignment defined in the ABI.
+alignment rules. GCC defaults to the standard alignment defined in the ABI@.
+
+On 64-bit Darwin, natural alignment is the default, and @option{-malign-power}
+is not supported.
@item -msoft-float
@itemx -mhard-float
@item -minsert-sched-nops=@var{scheme}
@opindex minsert-sched-nops
This option controls which nop insertion scheme will be used during
-the second scheduling pass. The argument @var{scheme} takes one of the
+the second scheduling pass. The argument @var{scheme} takes one of the
following values:
@var{no}: Don't insert nops.
@var{pad}: Pad with nops any dispatch group which has vacant issue slots,
@item -mabi=no-altivec
@opindex mabi=no-altivec
-Disable AltiVec ABI extensions for the current ABI.
+Disable AltiVec ABI extensions for the current ABI@.
@item -mprototype
@itemx -mno-prototype
On Darwin/PPC systems, @code{#pragma longcall} will generate ``jbsr
callee, L42'', plus a ``branch island'' (glue code). The two target
-addresses represent the callee and the ``branch island.'' The
+addresses represent the callee and the ``branch island''. The
Darwin/PPC linker will prefer the first address and generate a ``bl
callee'' if the PPC ``bl'' instruction will reach the callee directly;
otherwise, the linker will generate ``bl L42'' to call the ``branch
-island.'' The ``branch island'' is appended to the body of the
+island''. The ``branch island'' is appended to the body of the
calling function; it computes the full 32-bit address of the callee
and jumps to it.
@itemx -mno-backchain
@opindex mbackchain
@opindex mno-backchain
-Generate (or do not generate) code which maintains an explicit
-backchain within the stack frame that points to the caller's frame.
-This may be needed to allow debugging using tools that do not understand
-DWARF-2 call frame information. The default is not to generate the
-backchain.
+Store (do not store) the address of the caller's frame as backchain pointer
+into the callee's stack frame.
+A backchain may be needed to allow debugging using tools that do not understand
+DWARF-2 call frame information.
+When @option{-mno-packed-stack} is in effect, the backchain pointer is stored
+at the bottom of the stack frame; when @option{-mpacked-stack} is in effect,
+the backchain is placed into the topmost word of the 96/160 byte register
+save area.
+
+In general, code compiled with @option{-mbackchain} is call-compatible with
+code compiled with @option{-mmo-backchain}; however, use of the backchain
+for debugging purposes usually requires that the whole binary is built with
+@option{-mbackchain}. Note that the combination of @option{-mbackchain},
+@option{-mpacked-stack} and @option{-mhard-float} is not supported. In order
+to build a linux kernel use @option{-msoft-float}.
+
+The default is to not maintain the backchain.
+
+@item -mpacked-stack
+@item -mno-packed-stack
+@opindex mpacked-stack
+@opindex mno-packed-stack
+Use (do not use) the packed stack layout. When @option{-mno-packed-stack} is
+specified, the compiler uses the all fields of the 96/160 byte register save
+area only for their default purpose; unused fields still take up stack space.
+When @option{-mpacked-stack} is specified, register save slots are densely
+packed at the top of the register save area; unused space is reused for other
+purposes, allowing for more efficient use of the available stack space.
+However, when @option{-mbackchain} is also in effect, the topmost word of
+the save area is always used to store the backchain, and the return address
+register is always saved two words below the backchain.
+
+As long as the stack frame backchain is not used, code generated with
+@option{-mpacked-stack} is call-compatible with code generated with
+@option{-mno-packed-stack}. Note that some non-FSF releases of GCC 2.95 for
+S/390 or zSeries generated code that uses the stack frame backchain at run
+time, not just for debugging purposes. Such code is not call-compatible
+with code compiled with @option{-mpacked-stack}. Also, note that the
+combination of @option{-mbackchain},
+@option{-mpacked-stack} and @option{-mhard-float} is not supported. In order
+to build a linux kernel use @option{-msoft-float}.
+
+The default is to not use the packed stack layout.
@item -msmall-exec
@itemx -mno-small-exec
When @option{-mzarch} is specified, generate code using the
instructions available on z/Architecture.
When @option{-mesa} is specified, generate code using the
-instructions available on ESA/390. Note that @option{-mesa} is
+instructions available on ESA/390. Note that @option{-mesa} is
not possible with @option{-m64}.
When generating code compliant to the GNU/Linux for S/390 ABI,
the default is @option{-mesa}. When generating code compliant
@item -march=@var{cpu-type}
@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
+representing a certain processor type. Possible values for
@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
@opindex mno-tpf-trace
Generate code that adds (does not add) in TPF OS specific branches to trace
routines in the operating system. This option is off by default, even
-when compiling for the TPF OS.
+when compiling for the TPF OS@.
@item -mfused-madd
@itemx -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.
+
+@item -mwarn-framesize=@var{framesize}
+@opindex mwarn-framesize
+Emit a warning if the current function exceeds the given frame size. Because
+this is a compile time check it doesn't need to be a real problem when the program
+runs. It is intended to identify functions which most probably cause
+a stack overflow. It is useful to be used in an environment with limited stack
+size e.g.@: the linux kernel.
+
+@item -mwarn-dynamicstack
+@opindex mwarn-dynamicstack
+Emit a warning if the function calls alloca or uses dynamically
+sized arrays. This is generally a bad idea with a limited stack size.
+
+@item -mstack-guard=@var{stack-guard}
+@item -mstack-size=@var{stack-size}
+@opindex mstack-guard
+@opindex mstack-size
+These arguments always have to be used in conjunction. If they are present the s390
+back end emits additional instructions in the function prologue which trigger a trap
+if the stack size is @var{stack-guard} bytes above the @var{stack-size}
+(remember that the stack on s390 grows downward). These options are intended to
+be used to help debugging stack overflow problems. The additionally emitted code
+cause only little overhead and hence can also be used in production like systems
+without greater performance degradation. The given values have to be exact
+powers of 2 and @var{stack-size} has to be greater than @var{stack-guard}.
+In order to be efficient the extra code makes the assumption that the stack starts
+at an address aligned to the value given by @var{stack-size}.
@end table
@node SH Options
@opindex m4
Generate code for the SH4.
+@item -m4a-nofpu
+@opindex m4a-nofpu
+Generate code for the SH4al-dsp, or for a SH4a in such a way that the
+floating-point unit is not used.
+
+@item -m4a-single-only
+@opindex m4a-single-only
+Generate code for the SH4a, in such a way that no double-precision
+floating point operations are used.
+
+@item -m4a-single
+@opindex m4a-single
+Generate code for the SH4a assuming the floating-point unit is in
+single-precision mode by default.
+
+@item -m4a
+@opindex m4a
+Generate code for the SH4a.
+
+@item -m4al
+@opindex m4al
+Same as @option{-m4a-nofpu}, except that it implicitly passes
+@option{-dsp} to the assembler. GCC doesn't generate any DSP
+instructions at the moment.
+
@item -mb
@opindex mb
Compile code for the processor in big endian mode.
@opindex mhitachi
Comply with the calling conventions defined by Renesas.
+@item -mrenesas
+@opindex mhitachi
+Comply with the calling conventions defined by Renesas.
+
+@item -mno-renesas
+@opindex mhitachi
+Comply with the calling conventions defined for GCC before the Renesas
+conventions were available. This option is the default for all
+targets of the SH toolchain except for @samp{sh-symbianelf}.
+
@item -mnomacsave
@opindex mnomacsave
Mark the @code{MAC} register as call-clobbered, even if
the SPARC architecture. This adds the integer multiply, integer divide step
and scan (@code{ffs}) instructions which exist in SPARClite but not in SPARC-V7.
With @option{-mcpu=f930}, the compiler additionally optimizes it for the
-Fujitsu MB86930 chip, which is the original SPARClite, with no FPU. With
+Fujitsu MB86930 chip, which is the original SPARClite, with no FPU@. With
@option{-mcpu=f934}, the compiler additionally optimizes it for the Fujitsu
-MB86934 chip, which is the more recent SPARClite with FPU.
+MB86934 chip, which is the more recent SPARClite with FPU@.
With @option{-mcpu=sparclet}, GCC generates code for the SPARClet variant of
the SPARC architecture. This adds the integer multiply, multiply/accumulate,
@itemx -mno-v8plus
@opindex mv8plus
@opindex mno-v8plus
-With @option{-mv8plus}, GCC generates code for the SPARC-V8+ ABI. The
+With @option{-mv8plus}, GCC generates code for the SPARC-V8+ ABI@. The
difference from the V8 ABI is that the global and out registers are
considered 64-bit wide. This is enabled by default on Solaris in 32-bit
mode for all SPARC-V9 processors.
@table @gcctabopt
@item -mlittle-endian
@opindex mlittle-endian
-Generate code for a processor running in little-endian mode. It is only
+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
Otherwise, assume no such offset is present.
@end table
+These switches are supported in addition to the above on Solaris:
+
+@table @gcctabopt
+@item -threads
+@opindex threads
+Add support for multithreading using the Solaris threads library. This
+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 -pthreads
+@opindex pthreads
+Add support for multithreading using the POSIX threads library. This
+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.
+@end table
+
@node System V Options
@subsection Options for System V
@item -mv850e
@opindex mv850e
-Specify that the target processor is the V850E. The preprocessor
+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} nor @option{-mv850e1}
that needs this handling would enable it on your behalf.
@item -fasynchronous-unwind-tables
-@opindex funwind-tables
+@opindex fasynchronous-unwind-tables
Generate unwind table in dwarf2 format, if supported by target machine. The
table is exact at each instruction boundary, so it can be used for stack
unwinding from asynchronous events (such as debugger or garbage collector).
@opindex fPIC
If supported for the target machine, emit position-independent code,
suitable for dynamic linking and avoiding any limit on the size of the
-global offset table. This option makes a difference on the m68k
-and the SPARC.
+global offset table. This option makes a difference on the m68k,
+PowerPC and SPARC@.
Position-independent code requires special support, and therefore works
only on certain machines.
This flag does not have a negative form, because it specifies a
three-way choice.
-@item -fpack-struct
+@item -fpack-struct[=@var{n}]
@opindex fpack-struct
-Pack all structure members together without holes.
+Without a value specified, pack all structure members together without
+holes. When a value is specified (which must be a small power of two), pack
+structure members according to this value, representing the maximum
+alignment (that is, objects with default alignment requirements larger than
+this will be output potentially unaligned at the next fitting location.
@strong{Warning:} the @option{-fpack-struct} switch causes GCC to generate
code that is not binary compatible with code generated without that switch.
The default without @option{-fpic} is @code{initial-exec}; with
@option{-fpic} the default is @code{global-dynamic}.
+
+@item -fvisibility=@var{default|internal|hidden|protected}
+@opindex fvisibility
+Set the default ELF image symbol visibility to the specified option---all
+symbols will be marked with this unless overridden within the code.
+Using this feature can very substantially improve linking and
+load times of shared object libraries, produce more optimized
+code, provide near-perfect API export and prevent symbol clashes.
+It is @strong{strongly} recommended that you use this in any shared objects
+you distribute.
+
+Despite the nomenclature, @code{default} always means public ie;
+available to be linked against from outside the shared object.
+@code{protected} and @code{internal} are pretty useless in real-world
+usage so the only other commonly used option will be @code{hidden}.
+The default if @option{-fvisibility} isn't specified is
+@code{default}, i.e., make every
+symbol public---this causes the same behavior as previous versions of
+GCC@.
+
+A good explanation of the benefits offered by ensuring ELF
+symbols have the correct visibility is given by ``How To Write
+Shared Libraries'' by Ulrich Drepper (which can be found at
+@w{@uref{http://people.redhat.com/~drepper/}})---however a superior
+solution made possible by this option to marking things hidden when
+the default is public is to make the default hidden and mark things
+public. This is the norm with DLL's on Windows and with @option{-fvisibility=hidden}
+and @code{__attribute__ ((visibility("default")))} instead of
+@code{__declspec(dllexport)} you get almost identical semantics with
+identical syntax. This is a great boon to those working with
+cross-platform projects.
+
+For those adding visibility support to existing code, you may find
+@samp{#pragma GCC visibility} of use. This works by you enclosing
+the declarations you wish to set visibility for with (for example)
+@samp{#pragma GCC visibility push(hidden)} and
+@samp{#pragma GCC visibility pop}. These can be nested up to sixteen
+times. Bear in mind that symbol visibility should be viewed @strong{as
+part of the API interface contract} and thus all new code should
+always specify visibility when it is not the default ie; declarations
+only for use within the local DSO should @strong{always} be marked explicitly
+as hidden as so to avoid PLT indirection overheads---making this
+abundantly clear also aids readability and self-documentation of the code.
+Note that due to ISO C++ specification requirements, operator new and
+operator delete must always be of default visibility.
+
+An overview of these techniques, their benefits and how to use them
+is at @w{@uref{http://www.nedprod.com/programs/gccvisibility.html}}.
+
@end table
@c man end
national conventions. GCC inspects the locale categories
@env{LC_CTYPE} and @env{LC_MESSAGES} if it has been configured to do
so. These locale categories can be set to any value supported by your
-installation. A typical value is @samp{en_UK} for English in the United
-Kingdom.
+installation. A typical value is @samp{en_GB.UTF-8} for English in the United
+Kingdom encoded in UTF-8.
The @env{LC_CTYPE} environment variable specifies character
classification. GCC uses it to determine the character boundaries in
see @ref{Bugs}.
If you do use differing options when generating and using the
-precompiled header, the actual behaviour will be a mixture of the
-behaviour for the options. For instance, if you use @option{-g} to
+precompiled header, the actual behavior will be a mixture of the
+behavior for the options. For instance, if you use @option{-g} to
generate the precompiled header but not when using it, you may or may
not get debugging information for routines in the precompiled header.