@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-@c 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+@c 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
@c Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@c man begin COPYRIGHT
Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+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}}.
+@w{@value{BUGURL}}.
@c man end
@c man begin AUTHOR
See the Info entry for @command{gcc}, or
@cindex order of options
@cindex options, order
You can mix options and other arguments. For the most part, the order
-you use doesn't matter. Order does matter when you use several options
-of the same kind; for example, if you specify @option{-L} more than once,
-the directories are searched in the order specified.
+you use doesn't matter. Order does matter when you use several
+options of the same kind; for example, if you specify @option{-L} more
+than once, the directories are searched in the order specified. Also,
+the placement of the @option{-l} option is significant.
Many options have long names starting with @samp{-f} or with
@samp{-W}---for example,
-frepo -fno-rtti -fstats -ftemplate-depth-@var{n} @gol
-fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol
-fno-default-inline -fvisibility-inlines-hidden @gol
+-fvisibility-ms-compat @gol
-Wabi -Wctor-dtor-privacy @gol
-Wnon-virtual-dtor -Wreorder @gol
-Weffc++ -Wno-deprecated -Wstrict-null-sentinel @gol
@item Warning Options
@xref{Warning Options,,Options to Request or Suppress Warnings}.
@gccoptlist{-fsyntax-only -pedantic -pedantic-errors @gol
--w -Wextra -Wall -Waddress -Waggregate-return -Warray-bounds @gol
+-w -Wextra -Wall -Waddress -Waggregate-return -Warray-bounds @gol
-Wno-attributes -Wc++-compat -Wc++0x-compat -Wcast-align -Wcast-qual @gol
-Wchar-subscripts -Wclobbered -Wcomment @gol
--Wconversion -Wcoverage-mismatch -Wno-deprecated-declarations @gol
+-Wconversion -Wcoverage-mismatch -Wno-deprecated-declarations @gol
-Wdisabled-optimization -Wno-div-by-zero @gol
-Wempty-body -Wno-endif-labels @gol
-Werror -Werror=* @gol
-Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
-Wno-format-extra-args -Wformat-nonliteral @gol
--Wformat-security -Wformat-y2k @gol
+-Wformat-security -Wformat-y2k -Wignored-qualifiers @gol
-Wimplicit -Wimplicit-function-declaration -Wimplicit-int @gol
-Wimport -Wno-import -Winit-self -Winline @gol
-Wno-int-to-pointer-cast -Wno-invalid-offsetof @gol
-Wparentheses -Wpointer-arith -Wno-pointer-to-int-cast @gol
-Wredundant-decls @gol
-Wreturn-type -Wsequence-point -Wshadow @gol
--Wsign-compare -Wstack-protector @gol
+-Wsign-compare -Wsign-conversion -Wstack-protector @gol
-Wstrict-aliasing -Wstrict-aliasing=n @gol
-Wstrict-overflow -Wstrict-overflow=@var{n} @gol
-Wswitch -Wswitch-default -Wswitch-enum @gol
--Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol
+-Wsystem-headers -Wtrigraphs -Wtype-limits -Wundef -Wuninitialized @gol
-Wunknown-pragmas -Wno-pragmas -Wunreachable-code @gol
-Wunused -Wunused-function -Wunused-label -Wunused-parameter @gol
-Wunused-value -Wunused-variable @gol
-Wvariadic-macros -Wvla @gol
-Wvolatile-register-var -Wwrite-strings}
-@item C-only Warning Options
+@item C and Objective-C-only Warning Options
@gccoptlist{-Wbad-function-cast -Wmissing-declarations @gol
-Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs @gol
-Wold-style-declaration -Wold-style-definition @gol
@item Debugging Options
@xref{Debugging Options,,Options for Debugging Your Program or GCC}.
@gccoptlist{-d@var{letters} -dumpspecs -dumpmachine -dumpversion @gol
+-fdbg-cnt-list -fdbg-cnt=@var{counter-value-list} @gol
-fdump-noaddr -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
-ftest-coverage -ftime-report -fvar-tracking @gol
-g -g@var{level} -gcoff -gdwarf-2 @gol
-ggdb -gstabs -gstabs+ -gvms -gxcoff -gxcoff+ @gol
+-fno-merge-debug-strings -fdebug-prefix-map=@var{old}=@var{new} @gol
-femit-struct-debug-baseonly -femit-struct-debug-reduced @gol
-femit-struct-debug-detailed@r{[}=@var{spec-list}@r{]} @gol
-p -pg -print-file-name=@var{library} -print-libgcc-file-name @gol
@item Optimization Options
@xref{Optimize Options,,Options that Control Optimization}.
-@gccoptlist{-falign-functions=@var{n} -falign-jumps=@var{n} @gol
--falign-labels=@var{n} -falign-loops=@var{n} @gol
--fbounds-check -fmudflap -fmudflapth -fmudflapir @gol
--fbranch-probabilities -fprofile-values -fvpt -fbranch-target-load-optimize @gol
--fbranch-target-load-optimize2 -fbtr-bb-exclusive @gol
--fcaller-saves -fcprop-registers -fcse-follow-jumps @gol
--fcse-skip-blocks -fcx-limited-range -fdata-sections @gol
--fdelayed-branch -fdelete-null-pointer-checks -fearly-inlining @gol
--fexpensive-optimizations -ffast-math -ffloat-store @gol
--fforce-addr -fforward-propagate -ffunction-sections @gol
--fgcse -fgcse-lm -fgcse-sm -fgcse-las -fgcse-after-reload @gol
--fcrossjumping -fif-conversion -fif-conversion2 @gol
--finline-functions -finline-functions-called-once @gol
--finline-limit=@var{n} -fkeep-inline-functions @gol
--fkeep-static-consts -fmerge-constants -fmerge-all-constants @gol
--fmodulo-sched -fno-branch-count-reg @gol
--fno-default-inline -fno-defer-pop -fmove-loop-invariants @gol
--fno-function-cse -fno-guess-branch-probability @gol
--fno-inline -fno-math-errno -fno-peephole -fno-peephole2 @gol
--funsafe-math-optimizations -funsafe-loop-optimizations @gol
--ffinite-math-only -fno-signed-zeros @gol
--fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss @gol
--fomit-frame-pointer -foptimize-register-move @gol
--foptimize-sibling-calls -fprefetch-loop-arrays @gol
--fprofile-generate -fprofile-use @gol
--fregmove -frename-registers @gol
--freorder-blocks -freorder-blocks-and-partition -freorder-functions @gol
--frerun-cse-after-loop @gol
--frounding-math -frtl-abstract-sequences @gol
--fschedule-insns -fschedule-insns2 @gol
--fno-sched-interblock -fno-sched-spec -fsched-spec-load @gol
--fsched-spec-load-dangerous @gol
--fsched-stalled-insns=@var{n} -fsched-stalled-insns-dep=@var{n} @gol
--fsched2-use-superblocks @gol
--fsched2-use-traces -fsee -freschedule-modulo-scheduled-loops @gol
--fsection-anchors -fsignaling-nans -fsingle-precision-constant @gol
--fno-split-wide-types -fstack-protector -fstack-protector-all @gol
--fstrict-aliasing -fstrict-overflow -ftracer -fthread-jumps @gol
--funroll-all-loops -funroll-loops -fpeel-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-loop-linear -ftree-loop-im -ftree-loop-ivcanon -fivopts @gol
--fcheck-data-deps @gol
--ftree-dominator-opts -ftree-dse -ftree-copyrename -ftree-sink @gol
--ftree-ch -ftree-sra -ftree-ter -ftree-fre -ftree-vectorize @gol
--ftree-vect-loop-version -ftree-salias -fipa-pta -fweb @gol
--ftree-copy-prop -ftree-store-ccp -ftree-store-copy-prop -fwhole-program @gol
+@gccoptlist{
+-falign-functions[=@var{n}] -falign-jumps[=@var{n}] @gol
+-falign-labels[=@var{n}] -falign-loops[=@var{n}] -fassociative-math @gol
+-fauto-inc-dec -fbranch-probabilities -fbranch-target-load-optimize @gol
+-fbranch-target-load-optimize2 -fbtr-bb-exclusive -fcaller-saves @gol
+-fcheck-data-deps -fcprop-registers -fcrossjumping -fcse-follow-jumps @gol
+-fcse-skip-blocks -fcx-limited-range -fdata-sections -fdce -fdce @gol
+-fdelayed-branch -fdelete-null-pointer-checks -fdse -fdse @gol
+-fearly-inlining -fexpensive-optimizations -ffast-math @gol
+-ffinite-math-only -ffloat-store -fforward-propagate @gol
+-ffunction-sections -fgcse -fgcse-after-reload -fgcse-las -fgcse-lm @gol
+-fgcse-sm -fif-conversion -fif-conversion2 -finline-functions @gol
+-finline-functions-called-once -finline-limit=@var{n} @gol
+-finline-small-functions -fipa-cp -fipa-marix-reorg -fipa-pta @gol
+-fipa-pure-const -fipa-reference -fipa-struct-reorg @gol
+-fipa-type-escape -fivopts -fkeep-inline-functions -fkeep-static-consts @gol
+-fmerge-all-constants -fmerge-constants -fmodulo-sched @gol
+-fmodulo-sched-allow-regmoves -fmove-loop-invariants -fmudflap @gol
+-fmudflapir -fmudflapth -fno-branch-count-reg -fno-default-inline @gol
+-fno-defer-pop -fno-function-cse -fno-guess-branch-probability @gol
+-fno-inline -fno-math-errno -fno-peephole -fno-peephole2 @gol
+-fno-sched-interblock -fno-sched-spec -fno-signed-zeros @gol
+-fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss @gol
+-fomit-frame-pointer -foptimize-register-move -foptimize-sibling-calls @gol
+-fpeel-loops -fpredictive-commoning -fprefetch-loop-arrays @gol
+-fprofile-generate -fprofile-use -fprofile-values -freciprocal-math @gol
+-fregmove -frename-registers -freorder-blocks @gol
+-freorder-blocks-and-partition -freorder-functions @gol
+-frerun-cse-after-loop -freschedule-modulo-scheduled-loops @gol
+-frounding-math -frtl-abstract-sequences -fsched2-use-superblocks @gol
+-fsched2-use-traces -fsched-spec-load -fsched-spec-load-dangerous @gol
+-fsched-stalled-insns-dep[=@var{n}] -fsched-stalled-insns[=@var{n}] @gol
+-fschedule-insns -fschedule-insns2 -fsection-anchors -fsee @gol
+-fsignaling-nans -fsingle-precision-constant -fsplit-ivs-in-unroller @gol
+-fsplit-wide-types -fstack-protector -fstack-protector-all @gol
+-fstrict-aliasing -fstrict-overflow -fthread-jumps -ftracer -ftree-ccp @gol
+-ftree-ch -ftree-copy-prop -ftree-copyrename -ftree-dce @gol
+-ftree-dominator-opts -ftree-dse -ftree-fre -ftree-loop-im @gol
+-ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol
+-ftree-parallelize-loops=@var{n} -ftree-pre -ftree-reassoc -ftree-salias @gol
+-ftree-sink -ftree-sra -ftree-store-ccp -ftree-ter @gol
+-ftree-vect-loop-version -ftree-vectorize -ftree-vrp -funit-at-a-time @gol
+-funroll-all-loops -funroll-loops -funsafe-loop-optimizations @gol
+-funsafe-math-optimizations -funswitch-loops @gol
+-fvariable-expansion-in-unroller -fvect-cost-model -fvpt -fweb @gol
+-fwhole-program @gol
--param @var{name}=@var{value}
-O -O0 -O1 -O2 -O3 -Os}
-mcall-prologues -mno-tablejump -mtiny-stack -mint8}
@emph{Blackfin Options}
-@gccoptlist{-mcpu=@var{cpu} -msim -momit-leaf-frame-pointer @gol
--mno-omit-leaf-frame-pointer -mspecld-anomaly -mno-specld-anomaly @gol
--mcsync-anomaly -mno-csync-anomaly -mlow-64k -mno-low64k @gol
--mstack-check-l1 -mid-shared-library -mno-id-shared-library @gol
--mshared-library-id=@var{n} -mleaf-id-shared-library @gol
--mno-leaf-id-shared-library -msep-data -mno-sep-data -mlong-calls @gol
--mno-long-calls}
+@gccoptlist{-mcpu=@var{cpu}@r{[}-@var{sirevision}@r{]} @gol
+-msim -momit-leaf-frame-pointer -mno-omit-leaf-frame-pointer @gol
+-mspecld-anomaly -mno-specld-anomaly -mcsync-anomaly -mno-csync-anomaly @gol
+-mlow-64k -mno-low64k -mstack-check-l1 -mid-shared-library @gol
+-mno-id-shared-library -mshared-library-id=@var{n} @gol
+-mleaf-id-shared-library -mno-leaf-id-shared-library @gol
+-msep-data -mno-sep-data -mlong-calls -mno-long-calls @gol
+-mfast-fp -minline-plt}
@emph{CRIS Options}
@gccoptlist{-mcpu=@var{cpu} -march=@var{cpu} -mtune=@var{cpu} @gol
-masm=@var{dialect} -mno-fancy-math-387 @gol
-mno-fp-ret-in-387 -msoft-float @gol
-mno-wide-multiply -mrtd -malign-double @gol
--mpreferred-stack-boundary=@var{num} -mcx16 -msahf @gol
--mmmx -msse -msse2 -msse3 -mssse3 -msse4a -m3dnow -mpopcnt -mabm @gol
+-mpreferred-stack-boundary=@var{num} -mcx16 -msahf -mrecip @gol
+-mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4 @gol
+-msse4a -m3dnow -mpopcnt -mabm -msse5 @gol
-mthreads -mno-align-stringops -minline-all-stringops @gol
-mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol
-m96bit-long-double -mregparm=@var{num} -msseregparm @gol
--mpc32 -mpc64 -mpc80 mstackrealign @gol
+-mveclibabi=@var{type} -mpc32 -mpc64 -mpc80 -mstackrealign @gol
-momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs @gol
-mcmodel=@var{code-model} @gol
--m32 -m64 -mlarge-data-threshold=@var{num}}
+-m32 -m64 -mlarge-data-threshold=@var{num} @gol
+-mfused-madd -mno-fused-madd}
@emph{IA-64 Options}
@gccoptlist{-mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic @gol
@emph{MIPS Options}
@gccoptlist{-EL -EB -march=@var{arch} -mtune=@var{arch} @gol
-mips1 -mips2 -mips3 -mips4 -mips32 -mips32r2 -mips64 @gol
--mips16 -mno-mips16 -mabi=@var{abi} -mabicalls -mno-abicalls @gol
+-mips16 -mno-mips16 -mflip-mips16 @gol
+-minterlink-mips16 -mno-interlink-mips16 @gol
+-mabi=@var{abi} -mabicalls -mno-abicalls @gol
-mshared -mno-shared -mxgot -mno-xgot -mgp32 -mgp64 @gol
-mfp32 -mfp64 -mhard-float -msoft-float @gol
-msingle-float -mdouble-float -mdsp -mno-dsp -mdspr2 -mno-dspr2 @gol
+-msmartmips -mno-smartmips @gol
-mpaired-single -mno-paired-single -mdmx -mno-mdmx @gol
--mips3d -mno-mips3d -mmt -mno-mt @gol
+-mips3d -mno-mips3d -mmt -mno-mt -mllsc -mno-llsc @gol
-mlong64 -mlong32 -msym32 -mno-sym32 @gol
--G@var{num} -membedded-data -mno-embedded-data @gol
+-G@var{num} -mlocal-sdata -mno-local-sdata @gol
+-mextern-sdata -mno-extern-sdata -mgpopt -mno-gopt @gol
+-membedded-data -mno-embedded-data @gol
-muninit-const-in-rodata -mno-uninit-const-in-rodata @gol
+-mcode-readable=@var{setting} @gol
-msplit-addresses -mno-split-addresses @gol
-mexplicit-relocs -mno-explicit-relocs @gol
-mcheck-zero-division -mno-check-zero-division @gol
-mfix-vr4120 -mno-fix-vr4120 -mfix-vr4130 -mno-fix-vr4130 @gol
-mfix-sb1 -mno-fix-sb1 @gol
-mflush-func=@var{func} -mno-flush-func @gol
--mbranch-likely -mno-branch-likely @gol
+-mbranch-cost=@var{num} -mbranch-likely -mno-branch-likely @gol
-mfp-exceptions -mno-fp-exceptions @gol
-mvr4130-align -mno-vr4130-align}
-mpowerpc-gpopt -mno-powerpc-gpopt @gol
-mpowerpc-gfxopt -mno-powerpc-gfxopt @gol
-mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb -mfprnd -mno-fprnd @gol
--mcmpb -mno-cmpb -mmfpgpr -mno-mfpgpr -mdfp -mno-dfp @gol
+-mcmpb -mno-cmpb -mmfpgpr -mno-mfpgpr -mhard-dfp -mno-hard-dfp @gol
-mnew-mnemonics -mold-mnemonics @gol
-mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc @gol
-m64 -m32 -mxl-compat -mno-xl-compat -mpe @gol
-misel=yes -misel=no @gol
-mspe -mno-spe @gol
-mspe=yes -mspe=no @gol
+-mpaired @gol
-mvrsave -mno-vrsave @gol
-mmulhw -mno-mulhw @gol
-mdlmzb -mno-dlmzb @gol
@emph{System V Options}
@gccoptlist{-Qy -Qn -YP,@var{paths} -Ym,@var{dir}}
-@emph{TMS320C3x/C4x Options}
-@gccoptlist{-mcpu=@var{cpu} -mbig -msmall -mregparm -mmemparm @gol
--mfast-fix -mmpyi -mbk -mti -mdp-isr-reload @gol
--mrpts=@var{count} -mrptb -mdb -mloop-unsigned @gol
--mparallel-insns -mparallel-mpy -mpreserve-float}
-
@emph{V850 Options}
@gccoptlist{-mlong-calls -mno-long-calls -mep -mno-ep @gol
-mprolog-function -mno-prolog-function -mspace @gol
-fnon-call-exceptions -funwind-tables @gol
-fasynchronous-unwind-tables @gol
-finhibit-size-directive -finstrument-functions @gol
+-finstrument-functions-exclude-function-list=@var{sym},@var{sym},@dots{} @gol
+-finstrument-functions-exclude-file-list=@var{file},@var{file},@dots{} @gol
-fno-common -fno-ident @gol
-fpcc-struct-return -fpic -fPIC -fpie -fPIE @gol
-fno-jump-tables @gol
-fshort-double -fshort-wchar @gol
-fverbose-asm -fpack-struct[=@var{n}] -fstack-check @gol
-fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol
--fargument-alias -fargument-noalias @gol
--fargument-noalias-global -fargument-noalias-anything
+-fno-stack-limit -fargument-alias -fargument-noalias @gol
+-fargument-noalias-global -fargument-noalias-anything @gol
-fleading-underscore -ftls-model=@var{model} @gol
-ftrapv -fwrapv -fbounds-check @gol
-fvisibility}
@item @var{file}.hh
@itemx @var{file}.H
+@itemx @var{file}.hp
+@itemx @var{file}.hxx
+@itemx @var{file}.hpp
+@itemx @var{file}.HPP
+@itemx @var{file}.h++
+@itemx @var{file}.tcc
C++ header file to be turned into a precompiled header.
@item @var{file}.f
Assembler code.
@item @var{file}.S
+@itemx @var{file}.sx
Assembler code which must be preprocessed.
@item @var{other}
@item --target-help
@opindex target-help
Print (on the standard output) a description of target-specific command
-line options for each tool.
+line options for each tool. For some targets extra target-specific
+information may also be printed.
@item --help=@var{class}@r{[},@var{qualifier}@r{]}
Print (on the standard output) a description of the command line
@cindex C++ source file suffixes
C++ source files conventionally use one of the suffixes @samp{.C},
@samp{.cc}, @samp{.cpp}, @samp{.CPP}, @samp{.c++}, @samp{.cp}, or
-@samp{.cxx}; C++ header files often use @samp{.hh} or @samp{.H}; and
+@samp{.cxx}; C++ header files often use @samp{.hh}, @samp{.hpp},
+@samp{.H}, or (for shared template code) @samp{.tcc}; and
preprocessed C++ files use the suffix @samp{.ii}. GCC recognizes
files with these names and compiles them as C++ programs even if you
call the compiler the same way as for compiling C programs (usually
@cindex ISO support
@item -ansi
@opindex ansi
-In C mode, support all ISO C90 programs. In C++ mode,
-remove GNU extensions that conflict with ISO C++.
+In C mode, this is equivalent to @samp{-std=c89}. In C++ mode, it is
+equivalent to @samp{-std=c++98}.
This turns off certain features of GCC that are incompatible with ISO
C90 (when compiling C code), or of standard C++ (when compiling C++ code),
ISO standard doesn't call for; this is to avoid interfering with any
programs that might use these names for other things.
-Functions which would normally be built in but do not have semantics
+Functions that would normally be built in but do not have semantics
defined by ISO C (such as @code{alloca} and @code{ffs}) are not built-in
-functions with @option{-ansi} is used. @xref{Other Builtins,,Other
+functions when @option{-ansi} is used. @xref{Other Builtins,,Other
built-in functions provided by GCC}, for details of the functions
affected.
@item -std=
@opindex std
-Determine the language standard. This option is currently only
-supported when compiling C or C++. A value for this option must be
-provided; possible values are
+Determine the language standard. @xref{Standards,,Language Standards
+Supported by GCC}, for details of these standard versions. This option
+is currently only supported when compiling C or C++.
+
+A value for this option must be provided; possible values are
@table @samp
@item c89
but are in the specified version (for example, @samp{//} comments and
the @code{inline} keyword in ISO C99) are not disabled.
-@xref{Standards,,Language Standards Supported by GCC}, for details of
-these standard versions.
-
@item -fgnu89-inline
@opindex fgnu89-inline
The option @option{-fgnu89-inline} tells GCC to use the traditional
Enable handling of OpenMP directives @code{#pragma omp} in C/C++ and
@code{!$omp} in Fortran. When @option{-fopenmp} is specified, the
compiler generates parallel code according to the OpenMP Application
-Program Interface v2.5 @w{@uref{http://www.openmp.org/}}.
+Program Interface v2.5 @w{@uref{http://www.openmp.org/}}. This option
+implies @option{-pthread}, and thus is only supported on targets that
+have support for @option{-pthread}.
@item -fms-extensions
@opindex fms-extensions
of the language, you can save some space by using this flag. Note that
exception handling uses the same information, but it will generate it as
needed. The @samp{dynamic_cast} operator can still be used for casts that
-do not require runtime type information, i.e. casts to @code{void *} or to
+do not require runtime type information, i.e.@: casts to @code{void *} or to
unambiguous base classes.
@item -fstats
as their linkage might otherwise cross a shared library boundary.
@xref{Template Instantiation}.
+@item -fvisibility-ms-compat
+@opindex fvisibility-ms-compat
+This flag attempts to use visibility settings to make GCC's C++
+linkage model compatible with that of Microsoft Visual Studio.
+
+The flag makes these changes to GCC's linkage model:
+
+@enumerate
+@item
+It sets the default visibility to @code{hidden}, like
+@option{-fvisibility=hidden}.
+
+@item
+Types, but not their members, are not hidden by default.
+
+@item
+The One Definition Rule is relaxed for types without explicit
+visibility specifications which are defined in more than one different
+shared object: those declarations are permitted if they would have
+been permitted when this option was not used.
+@end enumerate
+
+In new code it is better to use @option{-fvisibility=hidden} and
+export those classes which are intended to be externally visible.
+Unfortunately it is possible for code to rely, perhaps accidentally,
+on the Visual Studio behavior.
+
+Among the consequences of these changes are that static data members
+of the same type with the same name but defined in different shared
+objects will be different, so changing one will not change the other;
+and that pointers to function members defined in different shared
+objects may not compare equal. When this flag is given, it is a
+violation of the ODR to define types with the same name differently.
+
@item -fno-weak
@opindex fno-weak
Do not use weak symbol support, even if it is provided by the linker.
functions will have linkage like inline functions; they just won't be
inlined by default.
-@item -Wabi @r{(C++ only)}
+@item -Wabi @r{(C++ and Objective-C++ only)}
@opindex Wabi
+@opindex Wno-abi
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
all such cases, there are probably some cases that are not warned about,
@end itemize
-@item -Wctor-dtor-privacy @r{(C++ only)}
+@item -Wctor-dtor-privacy @r{(C++ and Objective-C++ only)}
@opindex Wctor-dtor-privacy
+@opindex Wno-ctor-dtor-privacy
Warn when a class seems unusable because all the constructors or
destructors in that class are private, and it has neither friends nor
public static member functions.
-@item -Wnon-virtual-dtor @r{(C++ only)}
+@item -Wnon-virtual-dtor @r{(C++ and Objective-C++ only)}
@opindex Wnon-virtual-dtor
-Warn when a class appears to be polymorphic, thereby requiring a virtual
-destructor, yet it declares a non-virtual one. This warning is also
-enabled if -Weffc++ is specified.
+@opindex Wno-non-virtual-dtor
+Warn when a class has virtual functions and accessible non-virtual
+destructor, in which case it would be possible but unsafe to delete
+an instance of a derived class through a pointer to the base class.
+This warning is also enabled if -Weffc++ is specified.
-@item -Wreorder @r{(C++ only)}
+@item -Wreorder @r{(C++ and Objective-C++ only)}
@opindex Wreorder
+@opindex Wno-reorder
@cindex reordering, warning
@cindex warning for reordering of member initializers
Warn when the order of member initializers given in the code does not
The following @option{-W@dots{}} options are not affected by @option{-Wall}.
@table @gcctabopt
-@item -Weffc++ @r{(C++ only)}
+@item -Weffc++ @r{(C++ and Objective-C++ only)}
@opindex Weffc++
+@opindex Wno-effc++
Warn about violations of the following style guidelines from Scott Meyers'
@cite{Effective C++} book:
headers do not obey all of these guidelines; use @samp{grep -v}
to filter out those warnings.
-@item -Wno-deprecated @r{(C++ only)}
+@item -Wno-deprecated @r{(C++ and Objective-C++ only)}
@opindex Wno-deprecated
+@opindex Wdeprecated
Do not warn about usage of deprecated features. @xref{Deprecated Features}.
-@item -Wstrict-null-sentinel @r{(C++ only)}
+@item -Wstrict-null-sentinel @r{(C++ and Objective-C++ only)}
@opindex Wstrict-null-sentinel
+@opindex Wno-strict-null-sentinel
Warn also about the use of an uncasted @code{NULL} as sentinel. When
compiling only with GCC this is a valid sentinel, as @code{NULL} is defined
to @code{__null}. Although it is a null pointer constant not a null pointer,
it is guaranteed to of the same size as a pointer. But this use is
not portable across different compilers.
-@item -Wno-non-template-friend @r{(C++ only)}
+@item -Wno-non-template-friend @r{(C++ and Objective-C++ only)}
@opindex Wno-non-template-friend
+@opindex Wnon-template-friend
Disable warnings when non-templatized friend functions are declared
within a template. Since the advent of explicit template specification
support in G++, if the name of the friend is an unqualified-id (i.e.,
@option{-Wno-non-template-friend} which keeps the conformant compiler code
but disables the helpful warning.
-@item -Wold-style-cast @r{(C++ only)}
+@item -Wold-style-cast @r{(C++ and Objective-C++ only)}
@opindex Wold-style-cast
+@opindex Wno-old-style-cast
Warn if an old-style (C-style) cast to a non-void type is used within
a C++ program. The new-style casts (@samp{dynamic_cast},
@samp{static_cast}, @samp{reinterpret_cast}, and @samp{const_cast}) are
less vulnerable to unintended effects and much easier to search for.
-@item -Woverloaded-virtual @r{(C++ only)}
+@item -Woverloaded-virtual @r{(C++ and Objective-C++ only)}
@opindex Woverloaded-virtual
+@opindex Wno-overloaded-virtual
@cindex overloaded virtual fn, warning
@cindex warning for overloaded virtual fn
Warn when a function declaration hides virtual functions from a
will fail to compile.
-@item -Wno-pmf-conversions @r{(C++ only)}
+@item -Wno-pmf-conversions @r{(C++ and Objective-C++ only)}
@opindex Wno-pmf-conversions
+@opindex Wpmf-conversions
Disable the diagnostic for converting a bound pointer to member function
to a plain pointer.
-@item -Wsign-promo @r{(C++ only)}
+@item -Wsign-promo @r{(C++ and Objective-C++ only)}
@opindex Wsign-promo
+@opindex Wno-sign-promo
Warn when overload resolution chooses a promotion from unsigned or
enumerated type to a signed type, over a conversion to an unsigned type of
the same size. Previous versions of G++ would try to preserve
Dump interface declarations for all classes seen in the source file to a
file named @file{@var{sourcename}.decl}.
-@item -Wassign-intercept
+@item -Wassign-intercept @r{(Objective-C and Objective-C++ only)}
@opindex Wassign-intercept
+@opindex Wno-assign-intercept
Warn whenever an Objective-C assignment is being intercepted by the
garbage collector.
-@item -Wno-protocol
+@item -Wno-protocol @r{(Objective-C and Objective-C++ only)}
@opindex Wno-protocol
+@opindex Wprotocol
If a class is declared to implement a protocol, a warning is issued for
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
methods inherited from the superclass are considered to be implemented,
and no warning is issued for them.
-@item -Wselector
+@item -Wselector @r{(Objective-C and Objective-C++ only)}
@opindex Wselector
+@opindex Wno-selector
Warn if multiple methods of different types for the same selector are
found during compilation. The check is performed on the list of methods
in the final stage of compilation. Additionally, a check is performed
found during compilation, or because the @option{-fsyntax-only} option is
being used.
-@item -Wstrict-selector-match
+@item -Wstrict-selector-match @r{(Objective-C and Objective-C++ only)}
@opindex Wstrict-selector-match
+@opindex Wno-strict-selector-match
Warn if multiple methods with differing argument and/or return types are
found for a given selector when attempting to send a message using this
selector to a receiver of type @code{id} or @code{Class}. When this flag
if any differences found are confined to types which share the same size
and alignment.
-@item -Wundeclared-selector
+@item -Wundeclared-selector @r{(Objective-C and Objective-C++ only)}
@opindex Wundeclared-selector
+@opindex Wno-undeclared-selector
Warn if a @code{@@selector(@dots{})} expression referring to an
undeclared selector is found. A selector is considered undeclared if no
method with that name has been declared before the
are not inherently erroneous but which are risky or suggest there
may have been an error.
-You can request many specific warnings with options beginning @samp{-W},
-for example @option{-Wimplicit} to request warnings on implicit
-declarations. Each of these specific warning options also has a
-negative form beginning @samp{-Wno-} to turn off warnings;
-for example, @option{-Wno-implicit}. This manual lists only one of the
-two forms, whichever is not the default.
-
-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 and Objective-C++ Dialect
-Options}.
+The following language-independent options do not enable specific
+warnings but control the kinds of diagnostics produced by GCC.
@table @gcctabopt
@cindex syntax checking
@opindex fsyntax-only
Check the code for syntax errors, but don't do anything beyond that.
+@item -w
+@opindex w
+Inhibit all warning messages.
+
+@item -Werror
+@opindex Werror
+@opindex Wno-error
+Make all warnings into errors.
+
+@item -Werror=
+@opindex Werror=
+@opindex Wno-error=
+Make the specified warning into an error. The specifier for a warning
+is appended, for example @option{-Werror=switch} turns the warnings
+controlled by @option{-Wswitch} into errors. This switch takes a
+negative form, to be used to negate @option{-Werror} for specific
+warnings, for example @option{-Wno-error=switch} makes
+@option{-Wswitch} warnings not be errors, even when @option{-Werror}
+is in effect. You can use the @option{-fdiagnostics-show-option}
+option to have each controllable warning amended with the option which
+controls it, to determine what to use with this option.
+
+Note that specifying @option{-Werror=}@var{foo} automatically implies
+@option{-W}@var{foo}. However, @option{-Wno-error=}@var{foo} does not
+imply anything.
+
+@item -Wfatal-errors
+@opindex Wfatal-errors
+@opindex Wno-fatal-errors
+This option causes the compiler to abort compilation on the first error
+occurred rather than trying to keep going and printing further error
+messages.
+
+@end table
+
+You can request many specific warnings with options beginning
+@samp{-W}, for example @option{-Wimplicit} to request warnings on
+implicit declarations. Each of these specific warning options also
+has a negative form beginning @samp{-Wno-} to turn off warnings; for
+example, @option{-Wno-implicit}. This manual lists only one of the
+two forms, whichever is not the default. For further,
+language-specific options also refer to @ref{C++ Dialect Options} and
+@ref{Objective-C and Objective-C++ Dialect Options}.
+
+@table @gcctabopt
@item -pedantic
@opindex pedantic
Issue all the warnings demanded by strict ISO C and ISO C++;
Like @option{-pedantic}, except that errors are produced rather than
warnings.
-@item -w
-@opindex w
-Inhibit all warning messages.
+@item -Wall
+@opindex Wall
+@opindex Wno-all
+This enables all the warnings about constructions that some users
+consider questionable, and 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 and Objective-C++ Dialect Options}.
+
+@option{-Wall} turns on the following warning flags:
+
+@gccoptlist{-Waddress @gol
+-Warray-bounds @r{(only with} @option{-O2}@r{)} @gol
+-Wc++0x-compat @gol
+-Wchar-subscripts @gol
+-Wimplicit-int @gol
+-Wimplicit-function-declaration @gol
+-Wcomment @gol
+-Wformat @gol
+-Wmain @r{(only for C/ObjC and unless} @option{-ffreestanding}@r{)} @gol
+-Wmissing-braces @gol
+-Wnonnull @gol
+-Wparentheses @gol
+-Wpointer-sign @gol
+-Wreorder @gol
+-Wreturn-type @gol
+-Wsequence-point @gol
+-Wsign-compare @r{(only in C++)} @gol
+-Wstrict-aliasing @gol
+-Wstrict-overflow=1 @gol
+-Wswitch @gol
+-Wtrigraphs @gol
+-Wuninitialized @r{(only with} @option{-O1} @r{and above)} @gol
+-Wunknown-pragmas @gol
+-Wunused-function @gol
+-Wunused-label @gol
+-Wunused-value @gol
+-Wunused-variable @gol
+}
+
+Note that some warning flags are not implied by @option{-Wall}. Some of
+them warn about constructions that users generally do not consider
+questionable, but which occasionally you might wish to check for;
+others warn about constructions that are necessary or hard to avoid in
+some cases, and there is no simple way to modify the code to suppress
+the warning. Some of them are enabled by @option{-Wextra} but many of
+them must be enabled individually.
+
+@item -Wextra
+@opindex W
+@opindex Wextra
+@opindex Wno-extra
+This enables some extra warning flags that are not enabled by
+@option{-Wall}. (This option used to be called @option{-W}. The older
+name is still supported, but the newer name is more descriptive.)
+
+@gccoptlist{-Wclobbered @gol
+-Wempty-body @gol
+-Wignored-qualifiers @gol
+-Wmissing-field-initializers @gol
+-Wmissing-parameter-type @r{(C only)} @gol
+-Wold-style-declaration @r{(C only)} @gol
+-Woverride-init @gol
+-Wsign-compare @gol
+-Wtype-limits @gol
+-Wuninitialized @r{(only with} @option{-O1} @r{and above)} @gol
+-Wunused-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)} @gol
+}
+
+The option @option{-Wextra} also prints warning messages for the
+following cases:
+
+@itemize @bullet
+
+@item
+A pointer is compared against integer zero with @samp{<}, @samp{<=},
+@samp{>}, or @samp{>=}.
+
+@item
+(C++ only) An enumerator and a non-enumerator both appear in a
+conditional expression.
+
+@item
+(C++ only) A non-static reference or non-static @samp{const} member
+appears in a class without constructors.
+
+@item
+(C++ only) Ambiguous virtual bases.
+
+@item
+(C++ only) Subscripting an array which has been declared @samp{register}.
+
+@item
+(C++ only) Taking the address of a variable which has been declared
+@samp{register}.
+
+@item
+(C++ only) A base class is not initialized in a derived class' copy
+constructor.
+
+@end itemize
@item -Wno-import
@opindex Wno-import
+@opindex Wimport
Inhibit warning messages about the use of @samp{#import}.
@item -Wchar-subscripts
@opindex Wchar-subscripts
+@opindex Wno-char-subscripts
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.
@item -Wcomment
@opindex Wcomment
+@opindex Wno-comment
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
-This option causes the compiler to abort compilation on the first error
-occurred rather than trying to keep going and printing further error
-messages.
-
@item -Wformat
@opindex Wformat
+@opindex Wno-format
@opindex ffreestanding
@opindex fno-builtin
Check calls to @code{printf} and @code{scanf}, etc., to make sure that
@item -Wformat-y2k
@opindex Wformat-y2k
+@opindex Wno-format-y2k
If @option{-Wformat} is specified, also warn about @code{strftime}
formats which may yield only a two-digit year.
@item -Wno-format-extra-args
@opindex Wno-format-extra-args
+@opindex Wformat-extra-args
If @option{-Wformat} is specified, do not warn about excess arguments to a
@code{printf} or @code{scanf} format function. The C standard specifies
that such arguments are ignored.
warning if the unused arguments are all pointers, since the Single
Unix Specification says that such unused arguments are allowed.
-@item -Wno-format-zero-length
+@item -Wno-format-zero-length @r{(C and Objective-C only)}
@opindex Wno-format-zero-length
+@opindex Wformat-zero-length
If @option{-Wformat} is specified, do not warn about zero-length formats.
The C standard specifies that zero-length formats are allowed.
@item -Wformat-nonliteral
@opindex Wformat-nonliteral
+@opindex Wno-format-nonliteral
If @option{-Wformat} is specified, also warn if the format string is not a
string literal and so cannot be checked, unless the format function
takes its format arguments as a @code{va_list}.
@item -Wformat-security
@opindex Wformat-security
+@opindex Wno-format-security
If @option{-Wformat} is specified, also warn about uses of format
functions that represent possible security problems. At present, this
warns about calls to @code{printf} and @code{scanf} functions where the
@item -Wformat=2
@opindex Wformat=2
+@opindex Wno-format=2
Enable @option{-Wformat} plus format checks not included in
@option{-Wformat}. Currently equivalent to @samp{-Wformat
-Wformat-nonliteral -Wformat-security -Wformat-y2k}.
-@item -Wnonnull
+@item -Wnonnull @r{(C and Objective-C only)}
@opindex Wnonnull
+@opindex Wno-nonnull
Warn about passing a null pointer for arguments marked as
requiring a non-null value by the @code{nonnull} function attribute.
@item -Winit-self @r{(C, C++, Objective-C and Objective-C++ only)}
@opindex Winit-self
+@opindex Wno-init-self
Warn about uninitialized variables which are initialized with themselves.
Note this option can only be used with the @option{-Wuninitialized} option,
which in turn only works with @option{-O1} and above.
@end group
@end smallexample
-@item -Wimplicit-int
+@item -Wimplicit-int @r{(C and Objective-C only)}
@opindex Wimplicit-int
+@opindex Wno-implicit-int
Warn when a declaration does not specify a type.
This warning is enabled by @option{-Wall}.
-@item -Wimplicit-function-declaration
+@item -Wimplicit-function-declaration @r{(C and Objective-C only)}
@opindex Wimplicit-function-declaration
@opindex Wno-implicit-function-declaration
Give a warning whenever a function is used before being declared. In
@item -Wimplicit
@opindex Wimplicit
+@opindex Wno-implicit
Same as @option{-Wimplicit-int} and @option{-Wimplicit-function-declaration}.
This warning is enabled by @option{-Wall}.
+@item -Wignored-qualifiers @r{(C and C++ only)}
+@opindex Wignored-qualifiers
+@opindex Wno-ignored-qualifiers
+Warn if the return type of a function has a type qualifier
+such as @code{const}. For ISO C such a type qualifier has no effect,
+since the value returned by a function is not an lvalue.
+For C++, the warning is only emitted for scalar types or @code{void}.
+ISO C prohibits qualified @code{void} return types on function
+definitions, so such return types always receive a warning
+even without this option.
+
+This warning is also enabled by @option{-Wextra}.
+
@item -Wmain
@opindex Wmain
+@opindex Wno-main
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.
@item -Wmissing-braces
@opindex Wmissing-braces
+@opindex Wno-missing-braces
Warn if an aggregate or union initializer is not fully bracketed. In
the following example, the initializer for @samp{a} is not fully
bracketed, but that for @samp{b} is fully bracketed.
@item -Wmissing-include-dirs @r{(C, C++, Objective-C and Objective-C++ only)}
@opindex Wmissing-include-dirs
+@opindex Wno-missing-include-dirs
Warn if a user-supplied include directory does not exist.
@item -Wparentheses
@opindex Wparentheses
+@opindex Wno-parentheses
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
@item -Wsequence-point
@opindex Wsequence-point
+@opindex Wno-sequence-point
Warn about code that may have undefined semantics because of violations
of sequence point rules in the C and C++ standards.
@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}.
-
-Also warn if the return type of a function has a type qualifier
-such as @code{const}. For ISO C such a type qualifier has no effect,
-since the value returned by a function is not an lvalue.
-For C++, the warning is only emitted for scalar types or @code{void}.
-ISO C prohibits qualified @code{void} return types on function
-definitions, so such return types always receive a warning
-even without this option.
+@opindex Wno-return-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}
+(falling off the end of the function body is considered returning
+without a value), and about a @code{return} statement with a
+expression in a function whose return-type is @code{void}.
For C++, a function without return type always produces a diagnostic
message, even when @option{-Wno-return-type} is specified. The only
@item -Wswitch
@opindex Wswitch
+@opindex Wno-switch
Warn whenever a @code{switch} statement has an index of enumerated type
and lacks a @code{case} for one or more of the named codes of that
enumeration. (The presence of a @code{default} label prevents this
This warning is enabled by @option{-Wall}.
@item -Wswitch-default
-@opindex Wswitch-switch
+@opindex Wswitch-default
+@opindex Wno-switch-default
Warn whenever a @code{switch} statement does not have a @code{default}
case.
@item -Wswitch-enum
@opindex Wswitch-enum
+@opindex Wno-switch-enum
Warn whenever a @code{switch} statement has an index of enumerated type
and lacks a @code{case} for one or more of the named codes of that
enumeration. @code{case} labels outside the enumeration range also
@item -Wtrigraphs
@opindex Wtrigraphs
+@opindex Wno-trigraphs
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
+@opindex Wno-unused-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
+@opindex Wno-unused-label
Warn whenever a label is declared but not used.
This warning is enabled by @option{-Wall}.
@item -Wunused-parameter
@opindex Wunused-parameter
+@opindex Wno-unused-parameter
Warn whenever a function parameter is unused aside from its declaration.
To suppress this warning use the @samp{unused} attribute
@item -Wunused-variable
@opindex Wunused-variable
+@opindex Wno-unused-variable
Warn whenever a local variable or non-constant static variable is unused
aside from its declaration.
This warning is enabled by @option{-Wall}.
@item -Wunused-value
@opindex Wunused-value
+@opindex Wno-unused-value
Warn whenever a statement computes a result that is explicitly not
used. To suppress this warning cast the unused expression to
@samp{void}. This includes an expression-statement or the left-hand
@item -Wunused
@opindex Wunused
+@opindex Wno-unused
All the above @option{-Wunused} options combined.
In order to get a warning about an unused function parameter, you must
@item -Wuninitialized
@opindex Wuninitialized
+@opindex Wno-uninitialized
Warn if an automatic variable is used without first being initialized or
if a variable may be clobbered by a @code{setjmp} call.
you use that never return as @code{noreturn}. @xref{Function
Attributes}.
-This warning is enabled by @option{-Wall}.
+This warning is enabled by @option{-Wall} or @option{-Wextra} in
+optimizing compilations (@option{-O1} and above).
@item -Wunknown-pragmas
@opindex Wunknown-pragmas
+@opindex Wno-unknown-pragmas
@cindex warning for unknown pragmas
@cindex unknown pragmas, warning
@cindex pragmas, warning of unknown
@item -Wstrict-aliasing
@opindex Wstrict-aliasing
+@opindex Wno-strict-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
included in @option{-Wall}.
-It is equivalent to -Wstrict-aliasing=3
+It is equivalent to @option{-Wstrict-aliasing=3}
@item -Wstrict-aliasing=n
@opindex Wstrict-aliasing=n
+@opindex Wno-strict-aliasing=n
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.
Does not warn about incomplete types.
@item -Wstrict-overflow
-@item -Wstrict-overflow=@var{n}
+@itemx -Wstrict-overflow=@var{n}
@opindex Wstrict-overflow
+@opindex Wno-strict-overflow
This option is only active when @option{-fstrict-overflow} is active.
It warns about cases where the compiler optimizes based on the
assumption that signed overflow does not occur. Note that it does not
will require, in particular when determining whether a loop will be
executed at all.
-@table @option
+@table @gcctabopt
@item -Wstrict-overflow=1
Warn about cases which are both questionable and easy to avoid. For
example: @code{x + 1 > x}; with @option{-fstrict-overflow}, the
(default for -O2 and above). It warns about subscripts to arrays
that are always out of bounds. This warning is enabled by @option{-Wall}.
-@item -Wall
-@opindex Wall
-All of the above @samp{-W} options combined. This enables all the
-warnings about constructions that some users consider questionable, and
-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 and Objective-C++ Dialect Options}.
-@end table
-
-The following @option{-W@dots{}} options are not implied by @option{-Wall}.
-Some of them warn about constructions that users generally do not
-consider questionable, but which occasionally you might wish to check
-for; others warn about constructions that are necessary or hard to avoid
-in some cases, and there is no simple way to modify the code to suppress
-the warning.
-
-@table @gcctabopt
-@item -Wextra
-@opindex W
-@opindex Wextra
-(This option used to be called @option{-W}. The older name is still
-supported, but the newer name is more descriptive.) Print extra warning
-messages for these events:
-
-@itemize @bullet
-@item
-A function can return either with or without a value. (Falling
-off the end of the function body is considered returning without
-a value.) For example, this function would evoke such a
-warning:
-
-@smallexample
-@group
-foo (a)
-@{
- if (a > 0)
- return a;
-@}
-@end group
-@end smallexample
-
-@item
-An unsigned value is compared against zero with @samp{<} or @samp{>=}.
-
-@item @r{(C only)}
-Storage-class specifiers like @code{static} are not the first things
-in a declaration. According to the C Standard, this usage is
-obsolescent. This warning can be independently controlled by
-@option{-Wold-style-declaration}.
-
-@item
-If @option{-Wall} or @option{-Wunused} is also specified, warn about unused
-arguments.
-
-@item
-A comparison between signed and unsigned values could produce an
-incorrect result when the signed value is converted to unsigned.
-(But don't warn if @option{-Wno-sign-compare} is also specified.)
-
-@item
-An aggregate has an initializer which does not initialize all members.
-This warning can be independently controlled by
-@option{-Wmissing-field-initializers}.
-
-@item
-An initialized field without side effects is overridden when using
-designated initializers (@pxref{Designated Inits, , Designated
-Initializers}). This warning can be independently controlled by
-@option{-Woverride-init}.
-
-@item @r{(C only)}
-A function parameter is declared without a type specifier in K&R-style
-functions. This warning can be independently controlled by
-@option{-Wmissing-parameter-type}.
-
-@item
-An empty body occurs in an @samp{if}, @samp{else} or
-@samp{do while} statement. This warning can be independently
-controlled by @option{-Wempty-body}.
-
-@item @r{(C++ only)}
-An empty body occurs in a @samp{while} or @samp{for} statement with no
-whitespacing before the semicolon. This warning can be independently
-controlled by @option{-Wempty-body}.
-
-@item
-A pointer is compared against integer zero with @samp{<}, @samp{<=},
-@samp{>}, or @samp{>=}.
-
-@item
-A variable might be changed by @samp{longjmp} or @samp{vfork}.
-This warning can be independently controlled by @option{-Wclobbered}.
-
-@item @r{(C++ only)}
-An enumerator and a non-enumerator both appear in a conditional expression.
-
-@item @r{(C++ only)}
-A non-static reference or non-static @samp{const} member appears in a
-class without constructors.
-
-@item @r{(C++ only)}
-Ambiguous virtual bases.
-
-@item @r{(C++ only)}
-Subscripting an array which has been declared @samp{register}.
-
-@item @r{(C++ only)}
-Taking the address of a variable which has been declared @samp{register}.
-
-@item @r{(C++ only)}
-A base class is not initialized in a derived class' copy constructor.
-@end itemize
-
@item -Wno-div-by-zero
@opindex Wno-div-by-zero
@opindex Wdiv-by-zero
@item -Wsystem-headers
@opindex Wsystem-headers
+@opindex Wno-system-headers
@cindex warnings from system headers
@cindex system headers, warnings from
Print warning messages for constructs found in system header files.
@item -Wfloat-equal
@opindex Wfloat-equal
+@opindex Wno-float-equal
Warn if floating point values are used in equality comparisons.
The idea behind this is that sometimes it is convenient (for the
this is done with the relational operators, so equality comparisons are
probably mistaken.
-@item -Wtraditional @r{(C only)}
+@item -Wtraditional @r{(C and Objective-C only)}
@opindex Wtraditional
+@opindex Wno-traditional
Warn about certain constructs that behave differently in traditional and
ISO C@. Also warn about ISO C constructs that have no traditional C
equivalent, and/or problematic constructs which should be avoided.
traditional C compatibility.
@end itemize
-@item -Wtraditional-conversion @r{(C only)}
+@item -Wtraditional-conversion @r{(C and Objective-C only)}
@opindex Wtraditional-conversion
+@opindex Wno-traditional-conversion
Warn if a prototype causes a type conversion that is different from what
would happen to the same argument in the absence of a prototype. This
includes conversions of fixed point to floating and vice versa, and
conversions changing the width or signedness of a fixed point argument
except when the same as the default promotion.
-@item -Wdeclaration-after-statement @r{(C only)}
+@item -Wdeclaration-after-statement @r{(C and Objective-C only)}
@opindex Wdeclaration-after-statement
+@opindex Wno-declaration-after-statement
Warn when a declaration is found after a statement in a block. This
construct, known from C++, was introduced with ISO C99 and is by default
allowed in GCC@. It is not supported by ISO C90 and was not supported by
@item -Wundef
@opindex Wundef
+@opindex Wno-undef
Warn if an undefined identifier is evaluated in an @samp{#if} directive.
@item -Wno-endif-labels
@item -Wshadow
@opindex Wshadow
+@opindex Wno-shadow
Warn whenever a local variable shadows another local variable, parameter or
global variable or whenever a built-in function is shadowed.
@item -Wlarger-than-@var{len}
-@opindex Wlarger-than
+@opindex Wlarger-than-@var{len}
Warn whenever an object of larger than @var{len} bytes is defined.
@item -Wunsafe-loop-optimizations
@opindex Wunsafe-loop-optimizations
+@opindex Wno-unsafe-loop-optimizations
Warn if the loop cannot be optimized because the compiler could not
assume anything on the bounds of the loop indices. With
@option{-funsafe-loop-optimizations} warn if the compiler made
@item -Wpointer-arith
@opindex Wpointer-arith
+@opindex Wno-pointer-arith
Warn about anything that depends on the ``size of'' a function type or
of @code{void}. GNU C assigns these types a size of 1, for
convenience in calculations with @code{void *} pointers and pointers
to functions. In C++, warn also when an arithmetic operation involves
@code{NULL}. This warning is also enabled by @option{-pedantic}.
-@item -Wbad-function-cast @r{(C only)}
+@item -Wtype-limits
+@opindex Wtype-limits
+@opindex Wno-type-limits
+Warn if a comparison is always true or always false due to the limited
+range of the data type, but do not warn for constant expressions. For
+example, warn if an unsigned variable is compared against zero with
+@samp{<} or @samp{>=}. This warning is also enabled by
+@option{-Wextra}.
+
+@item -Wbad-function-cast @r{(C and Objective-C only)}
@opindex Wbad-function-cast
+@opindex Wno-bad-function-cast
Warn whenever a function call is cast to a non-matching type.
For example, warn if @code{int malloc()} is cast to @code{anything *}.
-@item -Wc++-compat
+@item -Wc++-compat @r{(C and Objective-C only)}
Warn about ISO C constructs that are outside of the common subset of
ISO C and ISO C++, e.g.@: request for implicit conversion from
@code{void *} to a pointer to non-@code{void} type.
@item -Wcast-qual
@opindex Wcast-qual
+@opindex Wno-cast-qual
Warn whenever a pointer is cast so as to remove a type qualifier from
the target type. For example, warn if a @code{const char *} is cast
to an ordinary @code{char *}.
@item -Wcast-align
@opindex Wcast-align
+@opindex Wno-cast-align
Warn whenever a pointer is cast such that the required alignment of the
target is increased. For example, warn if a @code{char *} is cast to
an @code{int *} on machines where integers can only be accessed at
@item -Wwrite-strings
@opindex Wwrite-strings
+@opindex Wno-write-strings
When compiling C, give string constants the type @code{const
char[@var{length}]} so that
copying the address of one into a non-@code{const} @code{char *}
@item -Wclobbered
@opindex Wclobbered
+@opindex Wno-clobbered
Warn for variables that might be changed by @samp{longjmp} or
@samp{vfork}. This warning is also enabled by @option{-Wextra}.
@item -Wconversion
@opindex Wconversion
+@opindex Wno-conversion
Warn for implicit conversions that may alter a value. This includes
conversions between real and integer, like @code{abs (x)} when
@code{x} is @code{double}; conversions between signed and unsigned,
like @code{unsigned ui = -1}; and conversions to smaller types, like
@code{sqrtf (M_PI)}. Do not warn for explicit casts like @code{abs
((int) x)} and @code{ui = (unsigned) -1}, or if the value is not
-changed by the conversion like in @code{abs (2.0)}.
+changed by the conversion like in @code{abs (2.0)}. Warnings about
+conversions between signed and unsigned integers can be disabled by
+using @option{-Wno-sign-conversion}.
For C++, also warn for conversions between @code{NULL} and non-pointer
types; confusing overload resolution for user-defined conversions; and
conversions that will never use a type conversion operator:
conversions to @code{void}, the same type, a base class or a reference
-to them.
+to them. Warnings about conversions between signed and unsigned
+integers are disabled by default in C++ unless
+@option{-Wsign-conversion} is explicitly enabled.
@item -Wempty-body
@opindex Wempty-body
+@opindex Wno-empty-body
Warn if an empty body occurs in an @samp{if}, @samp{else} or @samp{do
while} statement. Additionally, in C++, warn when an empty body occurs
in a @samp{while} or @samp{for} statement with no whitespacing before
@item -Wsign-compare
@opindex Wsign-compare
+@opindex Wno-sign-compare
@cindex warning for comparison of signed and unsigned values
@cindex comparison of signed and unsigned values, warning
@cindex signed and unsigned values, comparison warning
This warning is also enabled by @option{-Wextra}; to get the other warnings
of @option{-Wextra} without this warning, use @samp{-Wextra -Wno-sign-compare}.
+@item -Wsign-conversion
+@opindex Wsign-conversion
+@opindex Wno-sign-conversion
+Warn for implicit conversions that may change the sign of an integer
+value, like assigning a signed integer expression to an unsigned
+integer variable. An explicit cast silences the warning. In C, this
+option is enabled also by @option{-Wconversion}.
+
@item -Waddress
@opindex Waddress
@opindex Wno-address
@item -Waggregate-return
@opindex Waggregate-return
+@opindex Wno-aggregate-return
Warn if any functions that return structures or unions are defined or
called. (In languages where you can return an array, this also elicits
a warning.)
etc. This will not stop errors for incorrect use of supported
attributes.
-@item -Wstrict-prototypes @r{(C only)}
+@item -Wstrict-prototypes @r{(C and Objective-C only)}
@opindex Wstrict-prototypes
+@opindex Wno-strict-prototypes
Warn if a function is declared or defined without specifying the
argument types. (An old-style function definition is permitted without
a warning if preceded by a declaration which specifies the argument
types.)
-@item -Wold-style-declaration @r{(C only)}
+@item -Wold-style-declaration @r{(C and Objective-C only)}
@opindex Wold-style-declaration
+@opindex Wno-old-style-declaration
Warn for obsolescent usages, according to the C Standard, in a
declaration. For example, warn if storage-class specifiers like
@code{static} are not the first things in a declaration. This warning
is also enabled by @option{-Wextra}.
-@item -Wold-style-definition @r{(C only)}
+@item -Wold-style-definition @r{(C and Objective-C only)}
@opindex Wold-style-definition
+@opindex Wno-old-style-definition
Warn if an old-style function definition is used. A warning is given
even if there is a previous prototype.
-@item -Wmissing-parameter-type @r{(C only)}
+@item -Wmissing-parameter-type @r{(C and Objective-C only)}
@opindex Wmissing-parameter-type
+@opindex Wno-missing-parameter-type
A function parameter is declared without a type specifier in K&R-style
functions:
This warning is also enabled by @option{-Wextra}.
-@item -Wmissing-prototypes @r{(C only)}
+@item -Wmissing-prototypes @r{(C and Objective-C only)}
@opindex Wmissing-prototypes
+@opindex Wno-missing-prototypes
Warn if a global function is defined without a previous prototype
declaration. This warning is issued even if the definition itself
provides a prototype. The aim is to detect global functions that fail
to be declared in header files.
-@item -Wmissing-declarations @r{(C and C++ only)}
+@item -Wmissing-declarations
@opindex Wmissing-declarations
+@opindex Wno-missing-declarations
Warn if a global function is defined without a previous declaration.
Do so even if the definition itself provides a prototype.
Use this option to detect global functions that are not declared in
@item -Wmissing-field-initializers
@opindex Wmissing-field-initializers
+@opindex Wno-missing-field-initializers
@opindex W
@opindex Wextra
+@opindex Wno-extra
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:
@item -Wmissing-noreturn
@opindex Wmissing-noreturn
+@opindex Wno-missing-noreturn
Warn about functions which might be candidates for attribute @code{noreturn}.
Note these are only possible candidates, not absolute ones. Care should
be taken to manually verify functions actually do not ever return before
@item -Wmissing-format-attribute
@opindex Wmissing-format-attribute
+@opindex Wno-missing-format-attribute
@opindex Wformat
+@opindex Wno-format
Warn about function pointers which might be candidates for @code{format}
attributes. Note these are only possible candidates, not absolute ones.
GCC will guess that function pointers with @code{format} attributes that
implementation-defined values, and should not be used in portable code.
@item -Wnormalized=<none|id|nfc|nfkc>
-@opindex Wnormalized
+@opindex Wnormalized=
@cindex NFC
@cindex NFKC
@cindex character set, input normalization
@item -Wno-deprecated-declarations
@opindex Wno-deprecated-declarations
+@opindex Wdeprecated-declarations
Do not warn about uses of functions (@pxref{Function Attributes}),
variables (@pxref{Variable Attributes}), and types (@pxref{Type
Attributes}) marked as deprecated by using the @code{deprecated}
@item -Wno-overflow
@opindex Wno-overflow
+@opindex Woverflow
Do not warn about compile-time overflow in constant expressions.
-@item -Woverride-init
+@item -Woverride-init @r{(C and Objective-C only)}
@opindex Woverride-init
+@opindex Wno-override-init
@opindex W
@opindex Wextra
+@opindex Wno-extra
Warn if an initialized field without side effects is overridden when
using designated initializers (@pxref{Designated Inits, , Designated
Initializers}).
@item -Wpacked
@opindex Wpacked
+@opindex Wno-packed
Warn if a structure is given the packed attribute, but the packed
attribute has no effect on the layout or size of the structure.
Such structures may be mis-aligned for little benefit. For
@item -Wpadded
@opindex Wpadded
+@opindex Wno-padded
Warn if padding is included in a structure, either to align an element
of the structure or to align the whole structure. Sometimes when this
happens it is possible to rearrange the fields of the structure to
@item -Wredundant-decls
@opindex Wredundant-decls
+@opindex Wno-redundant-decls
Warn if anything is declared more than once in the same scope, even in
cases where multiple declaration is valid and changes nothing.
-@item -Wnested-externs @r{(C only)}
+@item -Wnested-externs @r{(C and Objective-C only)}
@opindex Wnested-externs
+@opindex Wno-nested-externs
Warn if an @code{extern} declaration is encountered within a function.
@item -Wunreachable-code
@opindex Wunreachable-code
+@opindex Wno-unreachable-code
Warn if the compiler detects that code will never be executed.
This option is intended to warn when the compiler detects that at
@item -Winline
@opindex Winline
+@opindex Wno-inline
Warn if a function can not be inlined and it was declared as inline.
Even with this option, the compiler will not warn about failures to
inline functions declared in system headers.
seemingly insignificant changes in the source program can cause the
warnings produced by @option{-Winline} to appear or disappear.
-@item -Wno-invalid-offsetof @r{(C++ only)}
+@item -Wno-invalid-offsetof @r{(C++ and Objective-C++ only)}
@opindex Wno-invalid-offsetof
+@opindex Winvalid-offsetof
Suppress warnings from applying the @samp{offsetof} macro to a non-POD
type. According to the 1998 ISO C++ standard, applying @samp{offsetof}
to a non-POD type is undefined. In existing C++ implementations,
The restrictions on @samp{offsetof} may be relaxed in a future version
of the C++ standard.
-@item -Wno-int-to-pointer-cast @r{(C only)}
+@item -Wno-int-to-pointer-cast @r{(C and Objective-C only)}
@opindex Wno-int-to-pointer-cast
+@opindex Wint-to-pointer-cast
Suppress warnings from casts to pointer type of an integer of a
different size.
-@item -Wno-pointer-to-int-cast @r{(C only)}
+@item -Wno-pointer-to-int-cast @r{(C and Objective-C only)}
@opindex Wno-pointer-to-int-cast
+@opindex Wpointer-to-int-cast
Suppress warnings from casts from a pointer to an integer type of a
different size.
@item -Winvalid-pch
@opindex Winvalid-pch
+@opindex Wno-invalid-pch
Warn if a precompiled header (@pxref{Precompiled Headers}) is found in
the search path but can't be used.
@item -Wdisabled-optimization
@opindex Wdisabled-optimization
+@opindex Wno-disabled-optimization
Warn if a requested optimization pass is disabled. This warning does
not generally indicate that there is anything wrong with your code; it
merely indicates that GCC's optimizers were unable to handle the code
complex; GCC will refuse to optimize programs when the optimization
itself is likely to take inordinate amounts of time.
-@item -Wpointer-sign
+@item -Wpointer-sign @r{(C and Objective-C only)}
@opindex Wpointer-sign
@opindex Wno-pointer-sign
Warn for pointer argument passing or assignment with different signedness.
@option{-Wall} and by @option{-pedantic}, which can be disabled with
@option{-Wno-pointer-sign}.
-@item -Werror
-@opindex Werror
-Make all warnings into errors.
-
-@item -Werror=
-@opindex Werror=
-Make the specified warning into an errors. The specifier for a
-warning is appended, for example @option{-Werror=switch} turns the
-warnings controlled by @option{-Wswitch} into errors. This switch
-takes a negative form, to be used to negate @option{-Werror} for
-specific warnings, for example @option{-Wno-error=switch} makes
-@option{-Wswitch} warnings not be errors, even when @option{-Werror}
-is in effect. You can use the @option{-fdiagnostics-show-option}
-option to have each controllable warning amended with the option which
-controls it, to determine what to use with this option.
-
-Note that specifying @option{-Werror=}@var{foo} automatically implies
-@option{-W}@var{foo}. However, @option{-Wno-error=}@var{foo} does not
-imply anything.
-
@item -Wstack-protector
@opindex Wstack-protector
+@opindex Wno-stack-protector
This option is only active when @option{-fstack-protector} is active. It
warns about functions that will not be protected against stack smashing.
@item -Woverlength-strings
@opindex Woverlength-strings
+@opindex Wno-overlength-strings
Warn about string constants which are longer than the ``minimum
maximum'' length specified in the C standard. Modern compilers
generally allow string constants which are much longer than the
This option works only with DWARF 2.
+@item -fno-merge-debug-strings
+@opindex fmerge-debug-strings
+@opindex fno-merge-debug-strings
+Direct the linker to merge together strings which are identical in
+different object files. This is not supported by all assemblers or
+linker. This decreases the size of the debug information in the
+output file at the cost of increasing link processing time. This is
+on by default.
+
+@item -fdebug-prefix-map=@var{old}=@var{new}
+@opindex fdebug-prefix-map
+When compiling files in directory @file{@var{old}}, record debugging
+information describing them as in @file{@var{new}} instead.
+
@cindex @command{prof}
@item -p
@opindex p
generate test coverage data. Coverage data will match the source files
more closely, if you do not optimize.
+@item -fdbg-cnt-list
+@opindex fdbg-cnt-list
+Print the name and the counter upperbound for all debug counters.
+
+@item -fdbg-cnt=@var{counter-value-list}
+@opindex fdbg-cnt
+Set the internal debug counter upperbound. @var{counter-value-list}
+is a comma-separated list of @var{name}:@var{value} pairs
+which sets the upperbound of each debug counter @var{name} to @var{value}.
+All debug counters have the initial upperbound of @var{UINT_MAX},
+thus dbg_cnt() returns true always unless the upperbound is set by this option.
+e.g. With -fdbg-cnt=dce:10,tail_call:0
+dbg_cnt(dce) will return true only for first 10 invocations
+and dbg_cnt(tail_call) will return false always.
+
@item -d@var{letters}
@item -fdump-rtl-@var{pass}
@opindex d
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.
+an executable, otherwise it is the basename of the source file. These
+switches may have different effects when @option{-E} is used for
+preprocessing.
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
@opindex dM
@opindex fdump-rtl-mach
Dump after performing the machine dependent reorganization pass, to
-@file{@var{file}.155r.mach}.
+@file{@var{file}.155r.mach} if that pass exists.
@item -dn
@itemx -fdump-rtl-rnreg
@item -fdump-unnumbered
@opindex fdump-unnumbered
When doing debugging dumps (see @option{-d} option above), suppress instruction
-numbers, line number note and address output. This makes it more feasible to
+numbers and address output. This makes it more feasible to
use diff on debugging dumps for compiler invocations with different
options, in particular with and without @option{-g}.
compilation time.
@option{-O} turns on the following optimization flags:
-@gccoptlist{-fdefer-pop @gol
+@gccoptlist{
+-fauto-inc-dec @gol
+-fcprop-registers @gol
+-fdce @gol
+-fdefer-pop @gol
-fdelayed-branch @gol
+-fdse @gol
-fguess-branch-probability @gol
--fcprop-registers @gol
--fif-conversion @gol
-fif-conversion2 @gol
+-fif-conversion @gol
+-finline-small-functions @gol
+-fipa-pure-const @gol
+-fipa-reference @gol
+-fmerge-constants
-fsplit-wide-types @gol
-ftree-ccp @gol
+-ftree-ch @gol
+-ftree-copyrename @gol
-ftree-dce @gol
-ftree-dominator-opts @gol
-ftree-dse @gol
--ftree-ter @gol
--ftree-sra @gol
--ftree-copyrename @gol
-ftree-fre @gol
--ftree-ch @gol
--funit-at-a-time @gol
--fmerge-constants}
+-ftree-sra @gol
+-ftree-ter @gol
+-funit-at-a-time}
@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{-fthread-jumps @gol
+-falign-functions -falign-jumps @gol
+-falign-loops -falign-labels @gol
+-fcaller-saves @gol
-fcrossjumping @gol
--foptimize-sibling-calls @gol
-fcse-follow-jumps -fcse-skip-blocks @gol
--fgcse -fgcse-lm @gol
+-fdelete-null-pointer-checks @gol
-fexpensive-optimizations @gol
--frerun-cse-after-loop @gol
--fcaller-saves @gol
+-fgcse -fgcse-lm @gol
+-foptimize-sibling-calls @gol
-fpeephole2 @gol
--fschedule-insns -fschedule-insns2 @gol
--fsched-interblock -fsched-spec @gol
-fregmove @gol
--fstrict-aliasing -fstrict-overflow @gol
--fdelete-null-pointer-checks @gol
-freorder-blocks -freorder-functions @gol
--falign-functions -falign-jumps @gol
--falign-loops -falign-labels @gol
--ftree-vrp @gol
--ftree-pre}
+-frerun-cse-after-loop @gol
+-fsched-interblock -fsched-spec @gol
+-fschedule-insns -fschedule-insns2 @gol
+-fstrict-aliasing -fstrict-overflow @gol
+-ftree-pre @gol
+-ftree-vrp}
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{-funswitch-loops} and @option{-fgcse-after-reload} options.
+@option{-funswitch-loops}, @option{-fpredictive-commoning} and
+@option{-fgcse-after-reload} options.
@item -O0
@opindex O0
Disabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
-@item -fforce-addr
-@opindex fforce-addr
-Force memory address constants to be copied into registers before
-doing arithmetic on them.
-
@item -fforward-propagate
@opindex fforward-propagate
Perform a forward propagation pass on RTL. The pass tries to combine two
is used to keep the compiler from expanding any functions inline.
Note that if you are not optimizing, no functions can be expanded inline.
+@item -finline-small-functions
+@opindex finline-small-functions
+Integrate functions into their callers when their body is smaller than expected
+function call code (so overall size of program gets smaller). The compiler
+heuristically decides which functions are simple enough to be worth integrating
+in this way.
+
+Enabled at level @option{-O2}.
+
@item -finline-functions
@opindex finline-functions
Integrate all simple functions into their callers. The compiler
@item -finline-limit=@var{n}
@opindex finline-limit
By default, GCC limits the size of functions that can be inlined. This flag
-allows the control of this limit for functions that are explicitly marked as
-inline (i.e., marked with the inline keyword or defined within the class
-definition in c++). @var{n} is the size of functions that can be inlined in
-number of pseudo instructions (not counting parameter handling). The default
-value of @var{n} is 600.
-Increasing this value can result in more inlined code at
-the cost of compilation time and memory consumption. Decreasing usually makes
-the compilation faster and less code will be inlined (which presumably
-means slower programs). This option is particularly useful for programs that
-use inlining heavily such as those based on recursive templates with C++.
+allows coarse control of this limit. @var{n} is the size of functions that
+can be inlined in number of pseudo instructions.
Inlining is actually controlled by a number of parameters, which may be
specified individually by using @option{--param @var{name}=@var{value}}.
is set to @var{n}/2.
@item max-inline-insns-auto
is set to @var{n}/2.
-@item min-inline-insns
- is set to 130 or @var{n}/4, whichever is smaller.
-@item max-inline-insns-rtl
- is set to @var{n}.
@end table
See below for a documentation of the individual
-parameters controlling inlining.
+parameters controlling inlining and for the defaults of these parameters.
+
+@emph{Note:} there may be no value to @option{-finline-limit} that results
+in default behavior.
@emph{Note:} pseudo instruction represents, in this particular context, an
abstract measurement of function's size. In no way does it represent a count
optimization is turned on, use the @option{-fno-keep-static-consts} option.
@item -fmerge-constants
+@opindex fmerge-constants
Attempt to merge identical constants (string constants and floating point
constants) across compilation units.
Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
@item -fmerge-all-constants
+@opindex fmerge-all-constants
Attempt to merge identical constants and identical variables.
This option implies @option{-fmerge-constants}. In addition to
pass. This pass looks at innermost loops and reorders their
instructions by overlapping different iterations.
+@item -fmodulo-sched-allow-regmoves
+@opindex fmodulo-sched-allow-regmoves
+Perform more aggressive SMS based modulo scheduling with register moves
+allowed. By setting this flag certain anti-dependences edges will be
+deleted which will trigger the generation of reg-moves based on the
+life-range analysis. This option is effective only with
+@option{-fmodulo-sched} enabled.
+
@item -fno-branch-count-reg
@opindex fno-branch-count-reg
Do not use ``decrement and branch'' instructions on a count register,
The default is @option{-fzero-initialized-in-bss}.
-@item -fbounds-check
-@opindex fbounds-check
-For front-ends that support it, generate additional code to check that
-indices used to access arrays are within the declared range. This is
-currently only supported by the Java and Fortran front-ends, where
-this option defaults to true and false respectively.
-
@item -fmudflap -fmudflapth -fmudflapir
@opindex fmudflap
@opindex fmudflapth
@item -fcse-follow-jumps
@opindex fcse-follow-jumps
-In common subexpression elimination, scan through jump instructions
+In common subexpression elimination (CSE), scan through jump instructions
when the target of the jump is not reached by any other path. For
example, when CSE encounters an @code{if} statement with an
@code{else} clause, CSE will follow the jump when the condition
if it finds this kind of loop.
@item -fcrossjumping
-@opindex crossjumping
+@opindex fcrossjumping
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{-O2}, @option{-O3}, @option{-Os}.
+@item -fauto-inc-dec
+@opindex fauto-inc-dec
+Combine increments or decrements of addresses with memory accesses.
+This pass is always skipped on architectures that do not have
+instructions to support this. Enabled by default at @option{-O} and
+higher on architectures that support this.
+
+@item -fdce
+@opindex fdce
+Perform dead code elimination (DCE) on RTL.
+Enabled by default at @option{-O} and higher.
+
+@item -fdse
+@opindex fdse
+Perform dead store elimination (DSE) on RTL.
+Enabled by default at @option{-O} and higher.
+
@item -fif-conversion
-@opindex if-conversion
+@opindex fif-conversion
Attempt to transform conditional jumps into branch-less equivalents. This
include use of conditional moves, min, max, set flags and abs instructions, and
some tricks doable by standard arithmetics. The use of conditional execution
Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
@item -fif-conversion2
-@opindex if-conversion2
+@opindex fif-conversion2
Use conditional execution (where available) to transform conditional jumps into
branch-less equivalents.
sense when scheduling before register allocation, i.e.@: with
@option{-fschedule-insns} or at @option{-O2} or higher.
-@item -fsched-stalled-insns=@var{n}
+@item -fsched-stalled-insns
+@itemx -fsched-stalled-insns=@var{n}
@opindex fsched-stalled-insns
Define how many insns (if any) can be moved prematurely from the queue
of stalled insns into the ready list, during the second scheduling pass.
-
-@item -fsched-stalled-insns-dep=@var{n}
+@option{-fno-sched-stalled-insns} means that no insns will be moved
+prematurely, @option{-fsched-stalled-insns=0} means there is no limit
+on how many queued insns can be moved prematurely.
+@option{-fsched-stalled-insns} without a value is equivalent to
+@option{-fsched-stalled-insns=1}.
+
+@item -fsched-stalled-insns-dep
+@itemx -fsched-stalled-insns-dep=@var{n}
@opindex fsched-stalled-insns-dep
Define how many insn groups (cycles) will be examined for a dependency
on a stalled insn that is candidate for premature removal from the queue
-of stalled insns. Has an effect only during the second scheduling pass,
-and only if @option{-fsched-stalled-insns} is used and its value is not zero.
+of stalled insns. This has an effect only during the second scheduling pass,
+and only if @option{-fsched-stalled-insns} is used.
+@option{-fno-sched-stalled-insns-dep} is equivalent to
+@option{-fsched-stalled-insns-dep=0}.
+@option{-fsched-stalled-insns-dep} without a value is equivalent to
+@option{-fsched-stalled-insns-dep=1}.
@item -fsched2-use-superblocks
@opindex fsched2-use-superblocks
@item -fsee
@opindex fsee
-Eliminates redundant extension instructions and move the non redundant
-ones to optimal placement using LCM.
+Eliminate redundant sign extension instructions and move the non-redundant
+ones to optimal placement using lazy code motion (LCM).
@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.
+@opindex freschedule-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
Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
+@item -ftree-reassoc
+@opindex ftree-reassoc
+Perform reassociation on trees. This flag is enabled by default
+at @option{-O} and higher.
+
@item -ftree-pre
-Perform Partial Redundancy Elimination (PRE) on trees. This flag is
+@opindex ftree-pre
+Perform partial redundancy elimination (PRE) on trees. This flag is
enabled by default at @option{-O2} and @option{-O3}.
@item -ftree-fre
-Perform Full Redundancy Elimination (FRE) on trees. The difference
+@opindex 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 is faster than PRE, though it exposes fewer redundancies.
This flag is enabled by default at @option{-O} and higher.
@item -ftree-copy-prop
+@opindex ftree-copy-prop
Perform copy propagation on trees. This pass eliminates unnecessary
copy operations. This flag is enabled by default at @option{-O} and
higher.
-@item -ftree-store-copy-prop
-Perform copy propagation of memory loads and stores. This pass
-eliminates unnecessary copy operations in memory references
-(structures, global variables, arrays, etc). This flag is enabled by
-default at @option{-O2} and higher.
-
@item -ftree-salias
+@opindex ftree-salias
Perform structural alias analysis on trees. This flag
is enabled by default at @option{-O} and higher.
+@item -fipa-pure-const
+@opindex fipa-pure-const
+Discover which functions are pure or constant.
+Enabled by default at @option{-O} and higher.
+
+@item -fipa-reference
+@opindex fipa-reference
+Discover which static variables do not escape cannot escape the
+compilation unit.
+Enabled by default at @option{-O} and higher.
+
+@item -fipa-struct-reorg
+@opindex fipa-struct-reorg
+Perform structure reorganization optimization, that change C-like structures
+layout in order to better utilize spatial locality. This transformation is
+affective for programs containing arrays of structures. Available in two
+compilation modes: profile-based (enabled with @option{-fprofile-generate})
+or static (which uses built-in heuristics). Require @option{-fipa-type-escape}
+to provide the safety of this transformation. It works only in whole program
+mode, so it requires @option{-fwhole-program} and @option{-combine} to be
+enabled. Structures considered @samp{cold} by this transformation are not
+affected (see @option{--param struct-reorg-cold-struct-ratio=@var{value}}).
+
+With this flag, the program debug info reflects a new structure layout.
+
@item -fipa-pta
+@opindex fipa-pta
Perform interprocedural pointer analysis.
+@item -fipa-cp
+@opindex fipa-cp
+Perform interprocedural constant propagation.
+This optimization analyzes the program to determine when values passed
+to functions are constants and then optimizes accordingly.
+This optimization can substantially increase performance
+if the application has constants passed to functions, but
+because this optimization can create multiple copies of functions,
+it may significantly increase code size.
+
+@item -fipa-matrix-reorg
+@opindex fipa-matrix-reorg
+Perform matrix flattening and transposing.
+Matrix flattening tries to replace a m-dimensional matrix
+with its equivalent n-dimensional matrix, where n < m.
+This reduces the level of indirection needed for accessing the elements
+of the matrix. The second optimization is matrix transposing that
+attemps to change the order of the matrix's dimensions in order to
+improve cache locality.
+Both optimizations need fwhole-program flag.
+Transposing is enabled only if profiling information is avaliable.
+
+
@item -ftree-sink
+@opindex ftree-sink
Perform forward store motion on trees. This flag is
enabled by default at @option{-O} and higher.
@item -ftree-ccp
+@opindex ftree-ccp
Perform sparse conditional constant propagation (CCP) on trees. This
pass only operates on local scalar variables and is enabled by default
at @option{-O} and higher.
@item -ftree-store-ccp
+@opindex ftree-store-ccp
Perform sparse conditional constant propagation (CCP) on trees. This
pass operates on both local scalar variables and memory stores and
loads (global variables, structures, arrays, etc). This flag is
enabled by default at @option{-O2} and higher.
@item -ftree-dce
+@opindex ftree-dce
Perform dead code elimination (DCE) on trees. This flag is enabled by
default at @option{-O} and higher.
@item -ftree-dominator-opts
+@opindex ftree-dominator-opts
Perform a variety of simple scalar cleanups (constant/copy
propagation, redundancy elimination, range propagation and expression
simplification) based on a dominator tree traversal. This also
performs jump threading (to reduce jumps to jumps). This flag is
enabled by default at @option{-O} and higher.
+@item -ftree-dse
+@opindex ftree-dse
+Perform dead store elimination (DSE) on trees. A dead store is a store into
+a memory location which will later be overwritten by another store without
+any intervening loads. In this case the earlier store can be deleted. This
+flag is enabled by default at @option{-O} and higher.
+
@item -ftree-ch
+@opindex ftree-ch
Perform loop header copying on trees. This is beneficial since it increases
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
+@opindex ftree-loop-optimize
Perform loop optimizations on trees. This flag is enabled by default
at @option{-O} and higher.
@item -ftree-loop-linear
+@opindex ftree-loop-linear
Perform linear loop transformations on tree. This flag can improve cache
performance and allow further loop optimizations to take place.
@item -fcheck-data-deps
+@opindex fcheck-data-deps
Compare the results of several data dependence analyzers. This option
is used for debugging the data dependence analyzers.
@item -ftree-loop-im
+@opindex ftree-loop-im
Perform loop invariant motion on trees. This pass moves only invariants that
would be hard to handle at RTL level (function calls, operations that expand to
nontrivial sequences of insns). With @option{-funswitch-loops} it also moves
store motion.
@item -ftree-loop-ivcanon
+@opindex ftree-loop-ivcanon
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
+@opindex fivopts
Perform induction variable optimizations (strength reduction, induction
variable merging and induction variable elimination) on trees.
+@item -ftree-parallelize-loops=n
+@opindex ftree-parallelize-loops
+Parallelize loops, i.e., split their iteration space to run in n threads.
+This is only possible for loops whose iterations are independent
+and can be arbitrarily reordered. The optimization is only
+profitable on multiprocessor machines, for loops that are CPU-intensive,
+rather than constrained e.g. by memory bandwidth. This option
+implies @option{-pthread}, and thus is only supported on targets
+that have support for @option{-pthread}.
+
@item -ftree-sra
+@opindex 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 @option{-O} and higher.
@item -ftree-copyrename
+@opindex 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 @option{-O} and higher.
@item -ftree-ter
+@opindex 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
enabled by default at @option{-O} and higher.
@item -ftree-vectorize
+@opindex ftree-vectorize
Perform loop vectorization on trees.
@item -ftree-vect-loop-version
to control which version is executed. This option is enabled by default
except at level @option{-Os} where it is disabled.
+@item -fvect-cost-model
+@opindex fvect-cost-model
+Enable cost model for vectorization.
+
@item -ftree-vrp
+@opindex ftree-vrp
Perform Value Range Propagation on trees. This is similar to the
constant propagation pass, but instead of values, ranges of values are
propagated. This allows the optimizers to remove unnecessary range
With this option, the compiler will create multiple copies of some
local variables when unrolling a loop which can result in superior code.
+@item -fpredictive-commoning
+@opindex fpredictive-commoning
+Perform predictive commoning optimization, i.e., reusing computations
+(especially memory loads and stores) performed in previous
+iterations of loops.
+
+This option is enabled at level @option{-O3}.
+
@item -fprefetch-loop-arrays
@opindex fprefetch-loop-arrays
If supported by the target machine, generate instructions to prefetch
Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
@item -fno-toplevel-reorder
+@opindex fno-toplevel-reorder
Do not reorder top-level functions, variables, and @code{asm}
statements. Output them in the same order that they appear in the
input file. When this option is used, unreferenced static variables
programs since the functions and variables become local for the whole combined
compilation unit, not for the single source file itself.
+This option is not supported for Fortran programs.
-@item -fno-cprop-registers
-@opindex fno-cprop-registers
+@item -fcprop-registers
+@opindex fcprop-registers
After register allocation and post-register allocation instruction splitting,
we perform a copy-propagation pass to try to reduce scheduling dependencies
and occasionally eliminate the copy.
-Disabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
+Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
@item -fprofile-generate
@opindex fprofile-generate
@item -ffast-math
@opindex ffast-math
-Sets @option{-fno-math-errno}, @option{-funsafe-math-optimizations}, @*
-@option{-fno-trapping-math}, @option{-ffinite-math-only},
-@option{-fno-rounding-math}, @option{-fno-signaling-nans},
-@option{-fno-signed-zeros} and @option{fcx-limited-range}.
+Sets @option{-fno-math-errno}, @option{-funsafe-math-optimizations},
+@option{-ffinite-math-only}, @option{-fno-rounding-math},
+@option{-fno-signaling-nans} and @option{-fcx-limited-range}.
This option causes the preprocessor macro @code{__FAST_MATH__} to be defined.
@item -funsafe-math-optimizations
@opindex funsafe-math-optimizations
+
Allow optimizations for floating-point arithmetic that (a) assume
that arguments and results are valid and (b) may violate IEEE or
ANSI standards. When used at link-time, it may include libraries
an exact implementation of IEEE or ISO rules/specifications for
math functions. It may, however, yield faster code for programs
that do not require the guarantees of these specifications.
+Enables @option{-fno-signed-zeros}, @option{-fno-trapping-math},
+@option{-fassociative-math} and @option{-freciprocal-math}.
The default is @option{-fno-unsafe-math-optimizations}.
+@item -fassociative-math
+@opindex fassociative-math
+
+Allow re-association of operands in series of floating-point operations.
+This violates the ISO C and C++ language standard by possibly changing
+computation result. NOTE: re-ordering may change the sign of zero as
+well as ignore NaNs and inhibit or create underflow or overflow (and
+thus cannot be used on a code which relies on rounding behavior like
+@code{(x + 2**52) - 2**52)}. May also reorder floating-point comparisons
+and thus may not be used when ordered comparisons are required.
+This option requires that both @option{-fno-signed-zeros} and
+@option{-fno-trapping-math} be in effect. Moreover, it doesn't make
+much sense with @option{-frounding-math}.
+
+The default is @option{-fno-associative-math}.
+
+@item -freciprocal-math
+@opindex freciprocal-math
+
+Allow the reciprocal of a value to be used instead of dividing by
+the value if this enables optimizations. For example @code{x / y}
+can be replaced with @code{x * (1/y)} which is useful if @code{(1/y)}
+is subject to common subexpression elimination. Note that this loses
+precision and increases the number of flops operating on the value.
+
+The default is @option{-fno-reciprocal-math}.
+
@item -ffinite-math-only
@opindex ffinite-math-only
Allow optimizations for floating-point arithmetic that assume
@opindex fno-trapping-math
Compile code assuming that floating-point operations cannot generate
user-visible traps. These traps include division by zero, overflow,
-underflow, inexact result and invalid operation. This option implies
-@option{-fno-signaling-nans}. Setting this option may allow faster
-code if one relies on ``non-stop'' IEEE arithmetic, for example.
+underflow, inexact result and invalid operation. This option requires
+that @option{-fno-signaling-nans} be in effect. Setting this option may
+allow faster code if one relies on ``non-stop'' IEEE arithmetic, for example.
This option should never be turned on by any @option{-O} option since
it can result in incorrect output for programs which depend on
implicitly converting it to double precision constant.
@item -fcx-limited-range
-@itemx -fno-cx-limited-range
@opindex fcx-limited-range
-@opindex fno-cx-limited-range
When enabled, this option states that a range reduction step is not
needed when performing complex division. The default is
@option{-fno-cx-limited-range}, but is enabled by @option{-ffast-math}.
branch target registers in within any basic block.
@item -fstack-protector
+@opindex fstack-protector
Emit extra code to check for buffer overflows, such as stack smashing
attacks. This is done by adding a guard variable to functions with
vulnerable objects. This includes functions that call alloca, and
If a guard check fails, an error message is printed and the program exits.
@item -fstack-protector-all
+@opindex fstack-protector-all
Like @option{-fstack-protector} except that all functions are protected.
@item -fsection-anchors
structure exceeds this parameter, then block copies are not used. The
default is 75.
+@item struct-reorg-cold-struct-ratio
+The threshold ratio (as a percentage) between a structure frequency
+and the frequency of the hottest structure in the program. This parameter
+is used by struct-reorg optimization enabled by @option{-fipa-struct-reorg}.
+We say that if the ratio of a structure frequency, calculated by profiling,
+to the hottest structure frequency in the program is less than this
+parameter, then structure reorganization is not applied to this structure.
+The default is 10.
+
@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
For small units this might be too tight (consider unit consisting of function A
that is inline and B that just calls A three time. If B is small relative to
A, the growth of unit is 300\% and yet such inlining is very sane. For very
-large units consisting of small inlininable functions however the overall unit
+large units consisting of small inlineable functions however the overall unit
growth limit is needed to avoid exponential explosion of code size. Thus for
smaller units, the size is increased to @option{--param large-unit-insns}
before applying @option{--param inline-unit-growth}. The default is 10000
taken into account. For function not declared inline, recursive inlining
happens only when @option{-finline-functions} (included in @option{-O3}) is
enabled and @option{--param max-inline-recursive-depth-auto} is used. The
-default value is 450.
+default value is 8.
@item min-inline-recursive-probability
Recursive inlining is profitable only for function having deep recursion
reduce function size by being inlined. In effect it increases amount of
inlining for code having large abstraction penalty (many functions that just
pass the arguments to other functions) and decrease inlining for code with low
-abstraction penalty. The default value is 16.
+abstraction penalty. The default value is 12.
@item min-vect-loop-bound
The minimum number of iterations under which a loop will not get vectorized
When set to 1, use expensive methods to eliminate all redundant
constraints. The default value is 0.
-@item vect-max-version-checks
-The maximum number of runtime checks that can be performed when doing
-loop versioning in the vectorizer. See option ftree-vect-loop-version
-for more information.
+@item vect-max-version-for-alignment-checks
+The maximum number of runtime checks that can be performed when
+doing loop versioning for alignment in the vectorizer. See option
+ftree-vect-loop-version for more information.
+
+@item vect-max-version-for-alias-checks
+The maximum number of runtime checks that can be performed when
+doing loop versioning for alias in the vectorizer. See option
+ftree-vect-loop-version for more information.
@item max-iterations-to-track
the unknown number of iterations average to roughly 10. This means that the
loop without bounds would appear artificially cold relative to the other one.
+@item align-threshold
+
+Select fraction of the maximal frequency of executions of basic block in
+function given basic block will get aligned.
+
+@item align-loop-iterations
+
+A loop expected to iterate at lest the selected number of iterations will get
+aligned.
+
@item tracer-dynamic-coverage
@itemx tracer-dynamic-coverage-feedback
@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.
+value of a shared integer constant. The default value is 256.
@item min-virtual-mappings
Specifies the minimum number of virtual mappings in the incremental
ratio is 3.
@item ssp-buffer-size
-The minimum size of buffers (i.e. arrays) that will receive stack smashing
+The minimum size of buffers (i.e.@: arrays) that will receive stack smashing
protection when @option{-fstack-protection} is used.
@item max-jump-thread-duplication-stmts
The size of cache line in L1 cache, in bytes.
@item l1-cache-size
-The number of cache lines in L1 cache.
-
-@item verify-canonical-types
-Whether the compiler should verify the ``canonical'' types used for
-type equality comparisons within the C++ and Objective-C++ front
-ends. Set to 1 (the default when GCC is configured with
---enable-checking) to enable verification, 0 to disable verification
-(the default when GCC is configured with --disable-checking).
+The size of L1 cache, in kilobytes.
+
+@item l2-cache-size
+The size of L2 cache, in kilobytes.
+
+@item use-canonical-types
+Whether the compiler should use the ``canonical'' type system. By
+default, this should always be 1, which uses a more efficient internal
+mechanism for comparing types in C++ and Objective-C++. However, if
+bugs in the canonical type system are causing compilation failures,
+set this value to 0 to disable canonical types.
+
+@item max-partial-antic-length
+Maximum length of the partial antic set computed during the tree
+partial redundancy elimination optimization (@option{-ftree-pre}) when
+optimizing at @option{-O3} and above. For some sorts of source code
+the enhanced partial redundancy elimination optimization can run away,
+consuming all of the memory available on the host machine. This
+parameter sets a limit on the length of the sets that are computed,
+which prevents the runaway behaviour. Setting a value of 0 for
+this paramter will allow an unlimited set length.
+
+@item sccvn-max-scc-size
+Maximum size of a strongly connected component (SCC) during SCCVN
+processing. If this limit is hit, SCCVN processing for the whole
+function will not be done and optimizations depending on it will
+be disabled. The default maximum SCC size is 10000.
@end table
@end table
prints a banner like:
@smallexample
-Assember options
-================
+Assembler options
+=================
Use "-Wa,OPTION" to pass "OPTION" to the assembler.
@end smallexample
* SPARC Options::
* SPU Options::
* System V Options::
-* TMS320C3x/C4x Options::
* V850 Options::
* VAX Options::
* VxWorks Options::
@cindex Blackfin Options
@table @gcctabopt
-@item -mcpu=@var{cpu}
+@item -mcpu=@var{cpu}@r{[}-@var{sirevision}@r{]}
@opindex mcpu=
-Specifies the name of the target Blackfin processor. Currently, @var{cpu}
-can be one of @samp{bf531}, @samp{bf532}, @samp{bf533},
-@samp{bf534}, @samp{bf536}, @samp{bf537}, @samp{bf561}.
+Specifies the name of the target Blackfin processor. Currently, @var{cpu}
+can be one of @samp{bf522}, @samp{bf523}, @samp{bf524},
+@samp{bf525}, @samp{bf526}, @samp{bf527},
+@samp{bf531}, @samp{bf532}, @samp{bf533}, @samp{bf534},
+@samp{bf536}, @samp{bf537}, @samp{bf538}, @samp{bf539},
+@samp{bf542}, @samp{bf544}, @samp{bf547}, @samp{bf548}, @samp{bf549},
+@samp{bf561}.
+The optional @var{sirevision} specifies the silicon revision of the target
+Blackfin processor. Any workarounds available for the targeted silicon revision
+will be enabled. If @var{sirevision} is @samp{none}, no workarounds are enabled.
+If @var{sirevision} is @samp{any}, all workarounds for the targeted processor
+will be enabled. The @code{__SILICON_REVISION__} macro is defined to two
+hexadecimal digits representing the major and minor numbers in the silicon
+revision. If @var{sirevision} is @samp{none}, the @code{__SILICON_REVISION__}
+is not defined. If @var{sirevision} is @samp{any}, the
+@code{__SILICON_REVISION__} is defined to be @code{0xffff}.
+If this optional @var{sirevision} is not used, GCC assumes the latest known
+silicon revision of the targeted Blackfin processor.
+
+Support for @samp{bf561} is incomplete. For @samp{bf561},
+Only the processor macro is defined.
Without this option, @samp{bf532} is used as the processor by default.
The corresponding predefined processor macros for @var{cpu} is to
-be defined. For the @samp{bfin-elf} toolchain, this causes the hardware
-BSP provided by libgloss to be linked in if @samp{-msim} is not given.
-Support for @samp{bf561} is incomplete; only the processor macro is defined.
+be defined. And for @samp{bfin-elf} toolchain, this causes the hardware BSP
+provided by libgloss to be linked in if @option{-msim} is not given.
@item -msim
@opindex msim
Specifies that the program will be run on the simulator. This causes
the simulator BSP provided by libgloss to be linked in. This option
has effect only for @samp{bfin-elf} toolchain.
+Certain other options, such as @option{-mid-shared-library} and
+@option{-mfdpic}, imply @option{-msim}.
@item -momit-leaf-frame-pointer
@opindex momit-leaf-frame-pointer
@item -mspecld-anomaly
@opindex mspecld-anomaly
When enabled, the compiler will ensure that the generated code does not
-contain speculative loads after jump instructions. This option is enabled
-by default.
+contain speculative loads after jump instructions. If this option is used,
+@code{__WORKAROUND_SPECULATIVE_LOADS} is defined.
@item -mno-specld-anomaly
@opindex mno-specld-anomaly
@opindex mcsync-anomaly
When enabled, the compiler will ensure that the generated code does not
contain CSYNC or SSYNC instructions too soon after conditional branches.
-This option is enabled by default.
+If this option is used, @code{__WORKAROUND_SPECULATIVE_SYNCS} is defined.
@item -mno-csync-anomaly
@opindex mno-csync-anomaly
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 @option{-fPIC}.
+With a @samp{bfin-elf} target, this option implies @option{-msim}.
@item -mno-id-shared-library
@opindex mno-id-shared-library
@option{-mno-long-calls} will restore the default behavior. Note these
switches have no effect on how the compiler generates code to handle
function calls via function pointers.
+
+@item -mfast-fp
+@opindex mfast-fp
+Link with the fast floating-point library. This library relaxes some of
+the IEEE floating-point standard's rules for checking inputs against
+Not-a-Number (NAN), in the interest of performance.
+
+@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}.
@end table
@node CRIS Options
is @var{version}. Typical values of @var{version} include @code{10.1},
@code{10.2}, and @code{10.3.9}.
-The default for this option is to make choices that seem to be most
-useful.
+If the compiler was built to use the system's headers by default,
+then the default for this option is the system version on which the
+compiler is running, otherwise the default is to make choices which
+are compatible with as many systems and code bases as possible.
@item -mkernel
@opindex mkernel
@item -mvms-return-codes
@opindex mvms-return-codes
Return VMS condition codes from main. The default is to return POSIX
-style condition (e.g.@ error) codes.
+style condition (e.g.@: error) codes.
@end table
@node FRV Options
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.
+With a @samp{bfin-elf} target, this option implies @option{-msim}.
@item -minline-plt
@opindex minline-plt
@option{--with-ld} configure option, GCC's program search path, and
finally by the user's @env{PATH}. The linker used by GCC can be printed
using @samp{which `gcc -print-prog-name=ld`}. This option is only available
-on the 64 bit HP-UX GCC, i.e. configured with @samp{hppa*64*-*-hpux*}.
+on the 64 bit HP-UX GCC, i.e.@: configured with @samp{hppa*64*-*-hpux*}.
@item -mhp-ld
@opindex hp-ld
configure option, GCC's program search path, and finally by the user's
@env{PATH}. The linker used by GCC can be printed using @samp{which
`gcc -print-prog-name=ld`}. This option is only available on the 64 bit
-HP-UX GCC, i.e. configured with @samp{hppa*64*-*-hpux*}.
+HP-UX GCC, i.e.@: configured with @samp{hppa*64*-*-hpux*}.
@item -mlong-calls
@opindex mno-long-calls
@item k6
AMD K6 CPU with MMX instruction set support.
@item k6-2, k6-3
-Improved versions of AMD K6 CPU with MMX and 3dNOW! instruction set support.
+Improved versions of AMD K6 CPU with MMX and 3dNOW!@: instruction set support.
@item athlon, athlon-tbird
-AMD Athlon CPU with MMX, 3dNOW!, enhanced 3dNOW! and SSE prefetch instructions
+AMD Athlon CPU with MMX, 3dNOW!, enhanced 3dNOW!@: and SSE prefetch instructions
support.
@item athlon-4, athlon-xp, athlon-mp
-Improved AMD Athlon CPU with MMX, 3dNOW!, enhanced 3dNOW! and full SSE
+Improved AMD Athlon CPU with MMX, 3dNOW!, enhanced 3dNOW!@: and full SSE
instruction set support.
@item k8, opteron, athlon64, athlon-fx
AMD K8 core based CPUs with x86-64 instruction set support. (This supersets
-MMX, SSE, SSE2, 3dNOW!, enhanced 3dNOW! and 64-bit instruction set extensions.)
+MMX, SSE, SSE2, 3dNOW!, enhanced 3dNOW!@: and 64-bit instruction set extensions.)
@item k8-sse3, opteron-sse3, athlon64-sse3
Improved versions of k8, opteron and athlon64 with SSE3 instruction set support.
@item amdfam10, barcelona
IDT Winchip C6 CPU, dealt in same way as i486 with additional MMX instruction
set support.
@item winchip2
-IDT Winchip2 CPU, dealt in same way as i486 with additional MMX and 3dNOW!
+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
@itemx -mno-sse3
@item -mssse3
@itemx -mno-ssse3
+@item -msse4.1
+@itemx -mno-sse4.1
+@item -msse4.2
+@itemx -mno-sse4.2
+@item -msse4
+@itemx -mno-sse4
@item -msse4a
@item -mno-sse4a
+@item -msse5
+@itemx -mno-sse5
@item -m3dnow
@itemx -mno-3dnow
@item -mpopcnt
@opindex m3dnow
@opindex mno-3dnow
These switches enable or disable the use of instructions in the MMX,
-SSE, SSE2, SSE3, SSSE3, SSE4A, ABM or 3DNow! extended instruction sets.
+SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4A, SSE5, ABM or 3DNow!@: extended
+instruction sets.
These extensions are also available as built-in functions: see
@ref{X86 Built-in Functions}, for details of the functions enabled and
disabled by these switches.
In 64-bit mode, SAHF instruction is used to optimize @code{fmod}, @code{drem}
or @code{remainder} built-in functions: see @ref{Other Builtins} for details.
+@item -mrecip
+@opindex mrecip
+This option will enable GCC to use RCPSS and RSQRTSS instructions (and their
+vectorized variants RCPPS and RSQRTPS) with an additional Newton-Rhapson step
+to increase precision instead of DIVSS and SQRTSS (and their vectorized
+variants) for single precision floating point arguments. These instructions
+are generated only when @option{-funsafe-math-optimizations} is enabled
+together with @option{-finite-math-only} and @option{-fno-trapping-math}.
+Note that while the throughput of the sequence is higher than the throughput
+of the non-reciprocal instruction, the precision of the sequence can be
+decreased by up to 2 ulp (i.e. the inverse of 1.0 equals 0.99999994).
+
+@item -mveclibabi=@var{type}
+@opindex mveclibabi
+Specifies the ABI type to use for vectorizing intrinsics using an
+external library. Supported types are @code{acml} for the AMD
+math core library style of interfacing. GCC will currently emit
+calls to @code{__vrd2_sin}, @code{__vrd2_cos}, @code{__vrd2_exp},
+@code{__vrd2_log}, @code{__vrd2_log2}, @code{__vrd2_log10},
+@code{__vrs4_sinf}, @code{__vrs4_cosf}, @code{__vrs4_expf},
+@code{__vrs4_logf}, @code{__vrs4_log2f}, @code{__vrs4_log10f}
+and @code{__vrs4_powf} when using this type and @option{-ftree-vectorize}
+is enabled. A ACML ABI compatible library will have to be specified
+at link time.
+
@item -mpush-args
@itemx -mno-push-args
@opindex mpush-args
segment to cover the entire TLS area.
For systems that use GNU libc, the default is on.
+
+@item -mfused-madd
+@itemx -mno-fused-madd
+@opindex mfused-madd
+Enable automatic generation of fused floating point multiply-add instructions
+if the ISA supports such instructions. The -mfused-madd option is on by
+default. The fused multiply-add instructions have a different
+rounding behavior compared to executing a multiply followed by an add.
@end table
These @samp{-m} switches are supported in addition to the above
@opindex mno-sched-control-spec
@opindex msched-control-spec
(Dis/En)able control speculative scheduling. This feature is
-available only during region scheduling (i.e. before reload).
+available only during region scheduling (i.e.@: before reload).
This will result in generation of the ld.s instructions and
the corresponding check instructions chk.s .
The default is 'disable'.
@multitable @columnfractions 0.20 0.80
@item @strong{Family} @tab @strong{@samp{-mcpu} arguments}
+@item @samp{51qe} @tab @samp{51qe}
@item @samp{5206} @tab @samp{5202} @samp{5204} @samp{5206}
@item @samp{5206e} @tab @samp{5206e}
@item @samp{5208} @tab @samp{5207} @samp{5208}
The M680x0 microarchitectures are: @samp{68000}, @samp{68010},
@samp{68020}, @samp{68030}, @samp{68040}, @samp{68060}
and @samp{cpu32}. The ColdFire microarchitectures
-are: @samp{cfv2}, @samp{cfv3}, @samp{cfv4} and @samp{cfv4e}.
+are: @samp{cfv1}, @samp{cfv2}, @samp{cfv3}, @samp{cfv4} and @samp{cfv4e}.
You can also use @option{-mtune=68020-40} for code that needs
to run relatively well on 68020, 68030 and 68040 targets.
@samp{mips1}, @samp{mips2}, @samp{mips3}, @samp{mips4},
@samp{mips32}, @samp{mips32r2}, and @samp{mips64}.
The processor names are:
-@samp{4kc}, @samp{4km}, @samp{4kp},
-@samp{4kec}, @samp{4kem}, @samp{4kep},
+@samp{4kc}, @samp{4km}, @samp{4kp}, @samp{4ksc},
+@samp{4kec}, @samp{4kem}, @samp{4kep}, @samp{4ksd},
@samp{5kc}, @samp{5kf},
@samp{20kc},
-@samp{24kc}, @samp{24kf}, @samp{24kx},
-@samp{24kec}, @samp{24kef}, @samp{24kex},
-@samp{34kc}, @samp{34kf}, @samp{34kx},
-@samp{74kc}, @samp{74kf}, @samp{74kx},
+@samp{24kc}, @samp{24kf2_1}, @samp{24kf1_1},
+@samp{24kec}, @samp{24kef2_1}, @samp{24kef1_1},
+@samp{34kc}, @samp{34kf2_1}, @samp{34kf1_1},
+@samp{74kc}, @samp{74kf2_1}, @samp{74kf1_1}, @samp{74kf3_2},
@samp{m4k},
@samp{orion},
@samp{r2000}, @samp{r3000}, @samp{r3900}, @samp{r4000}, @samp{r4400},
(for example, @samp{-march=r2k}). Prefixes are optional, and
@samp{vr} may be written @samp{r}.
+Names of the form @samp{@var{n}f2_1} refer to processors with
+FPUs clocked at half the rate of the core, names of the form
+@samp{@var{n}f1_1} refer to processors with FPUs clocked at the same
+rate as the core, and names of the form @samp{@var{n}f3_2} refer to
+processors with FPUs clocked a ratio of 3:2 with respect to the core.
+For compatibility reasons, @samp{@var{n}f} is accepted as a synonym
+for @samp{@var{n}f2_1} while @samp{@var{n}x} and @samp{@var{b}fx} are
+accepted as synonyms for @samp{@var{n}f1_1}.
+
GCC defines two macros based on the value of this option. The first
is @samp{_MIPS_ARCH}, which gives the name of target architecture, as
a string. The second has the form @samp{_MIPS_ARCH_@var{foo}},
Generate (do not generate) MIPS16 code. If GCC is targetting a
MIPS32 or MIPS64 architecture, it will make use of the MIPS16e ASE@.
+MIPS16 code generation can also be controlled on a per-function basis
+by means of @code{mips16} and @code{nomips16} attributes.
+@xref{Function Attributes}, for more information.
+
+@item -mflip-mips16
+@opindex mflip-mips16
+Generate MIPS16 code on alternating functions. This option is provided
+for regression testing of mixed MIPS16/non-MIPS16 code generation, and is
+not intended for ordinary use in compiling user code.
+
+@item -minterlink-mips16
+@itemx -mno-interlink-mips16
+@opindex minterlink-mips16
+@opindex mno-interlink-mips16
+Require (do not require) that non-MIPS16 code be link-compatible with
+MIPS16 code.
+
+For example, non-MIPS16 code cannot jump directly to MIPS16 code;
+it must either use a call or an indirect jump. @option{-minterlink-mips16}
+therefore disables direct jumps unless GCC knows that the target of the
+jump is not MIPS16.
+
@item -mabi=32
@itemx -mabi=o64
@itemx -mabi=n32
Assume that the floating-point coprocessor supports double-precision
operations. This is the default.
+@item -mllsc
+@itemx -mno-llsc
+@opindex mllsc
+@opindex mno-llsc
+Use (do not use) @samp{ll}, @samp{sc}, and @samp{sync} instructions to
+implement atomic memory built-in functions. When neither option is
+specified, GCC will use the instructions if the target architecture
+supports them.
+
+@option{-mllsc} is useful if the runtime environment can emulate the
+instructions and @option{-mno-llsc} can be useful when compiling for
+nonstandard ISAs. You can make either option the default by
+configuring GCC with @option{--with-llsc} and @option{--without-llsc}
+respectively. @option{--with-llsc} is the default for some
+configurations; see the installation documentation for details.
+
@item -mdsp
@itemx -mno-dsp
@opindex mdsp
@opindex mno-dsp
-Use (do not use) the MIPS DSP ASE. @xref{MIPS DSP Built-in Functions}.
+Use (do not use) revision 1 of the MIPS DSP ASE.
+@xref{MIPS DSP Built-in Functions}. This option defines the
+preprocessor macro @samp{__mips_dsp}. It also defines
+@samp{__mips_dsp_rev} to 1.
@item -mdspr2
@itemx -mno-dspr2
@opindex mdspr2
@opindex mno-dspr2
-Use (do not use) the MIPS DSP ASE REV 2. @xref{MIPS DSP Built-in Functions}.
-The option @option{-mdspr2} implies @option{-mdsp}.
+Use (do not use) revision 2 of the MIPS DSP ASE.
+@xref{MIPS DSP Built-in Functions}. This option defines the
+preprocessor macros @samp{__mips_dsp} and @samp{__mips_dspr2}.
+It also defines @samp{__mips_dsp_rev} to 2.
+
+@item -msmartmips
+@itemx -mno-smartmips
+@opindex msmartmips
+@opindex mno-smartmips
+Use (do not use) the MIPS SmartMIPS ASE.
@item -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.
+@xref{MIPS Paired-Single Support}. This option requires
+hardware floating-point support to be enabled.
@item -mdmx
@itemx -mno-mdmx
@item -G @var{num}
@opindex G
-@cindex smaller data references (MIPS)
-@cindex gp-relative references (MIPS)
-Put global and static items less than or equal to @var{num} bytes into
-the small data or bss section instead of the normal data or bss section.
-This allows the data to be accessed using a single instruction.
+Put definitions of externally-visible data in a small data section
+if that data is no bigger than @var{num} bytes. GCC can then access
+the data more efficiently; see @option{-mgpopt} for details.
+
+The default @option{-G} option depends on the configuration.
+
+@item -mlocal-sdata
+@itemx -mno-local-sdata
+@opindex mlocal-sdata
+@opindex mno-local-sdata
+Extend (do not extend) the @option{-G} behavior to local data too,
+such as to static variables in C. @option{-mlocal-sdata} is the
+default for all configurations.
+
+If the linker complains that an application is using too much small data,
+you might want to try rebuilding the less performance-critical parts with
+@option{-mno-local-sdata}. You might also want to build large
+libraries with @option{-mno-local-sdata}, so that the libraries leave
+more room for the main program.
+
+@item -mextern-sdata
+@itemx -mno-extern-sdata
+@opindex mextern-sdata
+@opindex mno-extern-sdata
+Assume (do not assume) that externally-defined data will be in
+a small data section if that data is within the @option{-G} limit.
+@option{-mextern-sdata} is the default for all configurations.
+
+If you compile a module @var{Mod} with @option{-mextern-sdata} @option{-G
+@var{num}} @option{-mgpopt}, and @var{Mod} references a variable @var{Var}
+that is no bigger than @var{num} bytes, you must make sure that @var{Var}
+is placed in a small data section. If @var{Var} is defined by another
+module, you must either compile that module with a high-enough
+@option{-G} setting or attach a @code{section} attribute to @var{Var}'s
+definition. If @var{Var} is common, you must link the application
+with a high-enough @option{-G} setting.
+
+The easiest way of satisfying these restrictions is to compile
+and link every module with the same @option{-G} option. However,
+you may wish to build a library that supports several different
+small data limits. You can do this by compiling the library with
+the highest supported @option{-G} setting and additionally using
+@option{-mno-extern-sdata} to stop the library from making assumptions
+about externally-defined data.
+
+@item -mgpopt
+@itemx -mno-gpopt
+@opindex mgpopt
+@opindex mno-gpopt
+Use (do not use) GP-relative accesses for symbols that are known to be
+in a small data section; see @option{-G}, @option{-mlocal-sdata} and
+@option{-mextern-sdata}. @option{-mgpopt} is the default for all
+configurations.
+
+@option{-mno-gpopt} is useful for cases where the @code{$gp} register
+might not hold the value of @code{_gp}. For example, if the code is
+part of a library that might be used in a boot monitor, programs that
+call boot monitor routines will pass an unknown value in @code{$gp}.
+(In such situations, the boot monitor itself would usually be compiled
+with @option{-G0}.)
-All modules should be compiled with the same @option{-G @var{num}}
-value.
+@option{-mno-gpopt} implies @option{-mno-local-sdata} and
+@option{-mno-extern-sdata}.
@item -membedded-data
@itemx -mno-embedded-data
Put uninitialized @code{const} variables in the read-only data section.
This option is only meaningful in conjunction with @option{-membedded-data}.
+@item -mcode-readable=@var{setting}
+@opindex mcode-readable
+Specify whether GCC may generate code that reads from executable sections.
+There are three possible settings:
+
+@table @gcctabopt
+@item -mcode-readable=yes
+Instructions may freely access executable sections. This is the
+default setting.
+
+@item -mcode-readable=pcrel
+MIPS16 PC-relative load instructions can access executable sections,
+but other instructions must not do so. This option is useful on 4KSc
+and 4KSd processors when the code TLBs have the Read Inhibit bit set.
+It is also useful on processors that can be configured to have a dual
+instruction/data SRAM interface and that, like the M4K, automatically
+redirect PC-relative loads to the instruction RAM.
+
+@item -mcode-readable=no
+Instructions must not access executable sections. This option can be
+useful on targets that are configured to have a dual instruction/data
+SRAM interface but that (unlike the M4K) do not automatically redirect
+PC-relative loads to the instruction RAM.
+@end table
+
@item -msplit-addresses
@itemx -mno-split-addresses
@opindex msplit-addresses
depends on the target GCC was configured for, but commonly is either
@samp{_flush_func} or @samp{__cpu_flush}.
+@item mbranch-cost=@var{num}
+@opindex mbranch-cost
+Set the cost of branches to roughly @var{num} ``simple'' instructions.
+This cost is only a heuristic and is not guaranteed to produce
+consistent results across releases. A zero cost redundantly selects
+the default, which is based on the @option{-mtune} setting.
+
@item -mbranch-likely
@itemx -mno-branch-likely
@opindex mbranch-likely
@itemx -mno-cmpb
@itemx -mmfpgpr
@itemx -mno-mfpgpr
-@itemx -mdfp
-@itemx -mno-dfp
+@itemx -mhard-dfp
+@itemx -mno-hard-dfp
@opindex mpower
@opindex mno-power
@opindex mpower2
@opindex mno-cmpb
@opindex mmfpgpr
@opindex mno-mfpgpr
-@opindex mdfp
-@opindex mno-dfp
+@opindex mhard-dfp
+@opindex mno-hard-dfp
GCC supports two related instruction set architectures for the
RS/6000 and PowerPC@. The @dfn{POWER} instruction set are those
instructions supported by the @samp{rios} chip set used in the original
general purpose register instructions implemented on the POWER6X
processor and other processors that support the extended PowerPC V2.05
architecture.
-The @option{-mdfp} option allows GCC to generate the decimal floating
+The @option{-mhard-dfp} option allows GCC to generate the decimal floating
point instructions implemented on some POWER processors.
The @option{-mpowerpc64} option allows GCC to generate the additional
This switch enables or disables the generation of SPE simd
instructions.
+@item -mpaired
+@itemx -mno-paired
+@opindex mpaired
+@opindex mno-paired
+This switch enables or disables the generation of PAIRED simd
+instructions.
+
@item -mspe=@var{yes/no}
This option has been deprecated. Use @option{-mspe} and
@option{-mno-spe} instead.
@opindex msim
On embedded PowerPC systems, assume that the startup module is called
@file{sim-crt0.o} and that the standard C libraries are @file{libsim.a} and
-@file{libc.a}. This is the default for @samp{powerpc-*-eabisim}.
+@file{libc.a}. This is the default for @samp{powerpc-*-eabisim}
configurations.
@item -mmvme
@samp{v7}, @samp{cypress}, @samp{v8}, @samp{supersparc}, @samp{sparclite},
@samp{f930}, @samp{f934}, @samp{hypersparc}, @samp{sparclite86x},
@samp{sparclet}, @samp{tsc701}, @samp{v9}, @samp{ultrasparc},
-@samp{ultrasparc3}, and @samp{niagara}.
+@samp{ultrasparc3}, @samp{niagara} and @samp{niagara2}.
Default instruction scheduling parameters are used for values that select
an architecture and not an implementation. These are @samp{v7}, @samp{v8},
v8: supersparc, hypersparc
sparclite: f930, f934, sparclite86x
sparclet: tsc701
- v9: ultrasparc, ultrasparc3, niagara
+ v9: ultrasparc, ultrasparc3, niagara, niagara2
@end smallexample
By default (unless configured otherwise), GCC generates code for the V7
@option{-mcpu=ultrasparc3}, the compiler additionally optimizes it for the
Sun UltraSPARC III/III+/IIIi/IIIi+/IV/IV+ chips. With
@option{-mcpu=niagara}, the compiler additionally optimizes it for
-Sun UltraSPARC T1 chips.
+Sun UltraSPARC T1 chips. With @option{-mcpu=niagara2}, the compiler
+additionally optimizes it for Sun UltraSPARC T2 chips.
@item -mtune=@var{cpu_type}
@opindex mtune
that select a particular cpu implementation. Those are @samp{cypress},
@samp{supersparc}, @samp{hypersparc}, @samp{f930}, @samp{f934},
@samp{sparclite86x}, @samp{tsc701}, @samp{ultrasparc},
-@samp{ultrasparc3}, and @samp{niagara}.
+@samp{ultrasparc3}, @samp{niagara}, and @samp{niagara2}.
@item -mv8plus
@itemx -mno-v8plus
@c the generic assembler that comes with Solaris takes just -Ym.
@end table
-@node TMS320C3x/C4x Options
-@subsection TMS320C3x/C4x Options
-@cindex TMS320C3x/C4x Options
-
-These @samp{-m} options are defined for TMS320C3x/C4x implementations:
-
-@table @gcctabopt
-
-@item -mcpu=@var{cpu_type}
-@opindex mcpu
-Set the instruction set, register set, and instruction scheduling
-parameters for machine type @var{cpu_type}. Supported values for
-@var{cpu_type} are @samp{c30}, @samp{c31}, @samp{c32}, @samp{c40}, and
-@samp{c44}. The default is @samp{c40} to generate code for the
-TMS320C40.
-
-@item -mbig-memory
-@itemx -mbig
-@itemx -msmall-memory
-@itemx -msmall
-@opindex mbig-memory
-@opindex mbig
-@opindex msmall-memory
-@opindex msmall
-Generates code for the big or small memory model. The small memory
-model assumed that all data fits into one 64K word page. At run-time
-the data page (DP) register must be set to point to the 64K page
-containing the .bss and .data program sections. The big memory model is
-the default and requires reloading of the DP register for every direct
-memory access.
-
-@item -mbk
-@itemx -mno-bk
-@opindex mbk
-@opindex mno-bk
-Allow (disallow) allocation of general integer operands into the block
-count register BK@.
-
-@item -mdb
-@itemx -mno-db
-@opindex mdb
-@opindex mno-db
-Enable (disable) generation of code using decrement and branch,
-DBcond(D), instructions. This is enabled by default for the C4x. To be
-on the safe side, this is disabled for the C3x, since the maximum
-iteration count on the C3x is @math{2^{23} + 1} (but who iterates loops more than
-@math{2^{23}} times on the C3x?). Note that GCC will try to reverse a loop so
-that it can utilize the decrement and branch instruction, but will give
-up if there is more than one memory reference in the loop. Thus a loop
-where the loop counter is decremented can generate slightly more
-efficient code, in cases where the RPTB instruction cannot be utilized.
-
-@item -mdp-isr-reload
-@itemx -mparanoid
-@opindex mdp-isr-reload
-@opindex mparanoid
-Force the DP register to be saved on entry to an interrupt service
-routine (ISR), reloaded to point to the data section, and restored on
-exit from the ISR@. This should not be required unless someone has
-violated the small memory model by modifying the DP register, say within
-an object library.
-
-@item -mmpyi
-@itemx -mno-mpyi
-@opindex mmpyi
-@opindex mno-mpyi
-For the C3x use the 24-bit MPYI instruction for integer multiplies
-instead of a library call to guarantee 32-bit results. Note that if one
-of the operands is a constant, then the multiplication will be performed
-using shifts and adds. If the @option{-mmpyi} option is not specified for the C3x,
-then squaring operations are performed inline instead of a library call.
-
-@item -mfast-fix
-@itemx -mno-fast-fix
-@opindex mfast-fix
-@opindex mno-fast-fix
-The C3x/C4x FIX instruction to convert a floating point value to an
-integer value chooses the nearest integer less than or equal to the
-floating point value rather than to the nearest integer. Thus if the
-floating point number is negative, the result will be incorrectly
-truncated an additional code is necessary to detect and correct this
-case. This option can be used to disable generation of the additional
-code required to correct the result.
-
-@item -mrptb
-@itemx -mno-rptb
-@opindex mrptb
-@opindex mno-rptb
-Enable (disable) generation of repeat block sequences using the RPTB
-instruction for zero overhead looping. The RPTB construct is only used
-for innermost loops that do not call functions or jump across the loop
-boundaries. There is no advantage having nested RPTB loops due to the
-overhead required to save and restore the RC, RS, and RE registers.
-This is enabled by default with @option{-O2}.
-
-@item -mrpts=@var{count}
-@itemx -mno-rpts
-@opindex mrpts
-@opindex mno-rpts
-Enable (disable) the use of the single instruction repeat instruction
-RPTS@. If a repeat block contains a single instruction, and the loop
-count can be guaranteed to be less than the value @var{count}, GCC will
-emit a RPTS instruction instead of a RPTB@. If no value is specified,
-then a RPTS will be emitted even if the loop count cannot be determined
-at compile time. Note that the repeated instruction following RPTS does
-not have to be reloaded from memory each iteration, thus freeing up the
-CPU buses for operands. However, since interrupts are blocked by this
-instruction, it is disabled by default.
-
-@item -mloop-unsigned
-@itemx -mno-loop-unsigned
-@opindex mloop-unsigned
-@opindex mno-loop-unsigned
-The maximum iteration count when using RPTS and RPTB (and DB on the C40)
-is @math{2^{31} + 1} since these instructions test if the iteration count is
-negative to terminate the loop. If the iteration count is unsigned
-there is a possibility than the @math{2^{31} + 1} maximum iteration count may be
-exceeded. This switch allows an unsigned iteration count.
-
-@item -mti
-@opindex mti
-Try to emit an assembler syntax that the TI assembler (asm30) is happy
-with. This also enforces compatibility with the API employed by the TI
-C3x C compiler. For example, long doubles are passed as structures
-rather than in floating point registers.
-
-@item -mregparm
-@itemx -mmemparm
-@opindex mregparm
-@opindex mmemparm
-Generate code that uses registers (stack) for passing arguments to functions.
-By default, arguments are passed in registers where possible rather
-than by pushing arguments on to the stack.
-
-@item -mparallel-insns
-@itemx -mno-parallel-insns
-@opindex mparallel-insns
-@opindex mno-parallel-insns
-Allow the generation of parallel instructions. This is enabled by
-default with @option{-O2}.
-
-@item -mparallel-mpy
-@itemx -mno-parallel-mpy
-@opindex mparallel-mpy
-@opindex mno-parallel-mpy
-Allow the generation of MPY||ADD and MPY||SUB parallel instructions,
-provided @option{-mparallel-insns} is also specified. These instructions have
-tight register constraints which can pessimize the code generation
-of large functions.
-
-@end table
-
@node V850 Options
@subsection V850 Options
@cindex V850 Options
cannot safely be called (perhaps signal handlers, if the profiling
routines generate output or allocate memory).
+@item -finstrument-functions-exclude-file-list=@var{file},@var{file},@dots{}
+@opindex finstrument-functions-exclude-file-list
+
+Set the list of functions that are excluded from instrumentation (see
+the description of @code{-finstrument-functions}). If the file that
+contains a function definition matches with one of @var{file}, then
+that function is not instrumented. The match is done on substrings:
+if the @var{file} parameter is a substring of the file name, it is
+considered to be a match.
+
+For example,
+@code{-finstrument-functions-exclude-file-list=/bits/stl,include/sys}
+will exclude any inline function defined in files whose pathnames
+contain @code{/bits/stl} or @code{include/sys}.
+
+If, for some reason, you want to include letter @code{','} in one of
+@var{sym}, write @code{'\,'}. For example,
+@code{-finstrument-functions-exclude-file-list='\,\,tmp'}
+(note the single quote surrounding the option).
+
+@item -finstrument-functions-exclude-function-list=@var{sym},@var{sym},@dots{}
+@opindex finstrument-functions-exclude-function-list
+
+This is similar to @code{-finstrument-functions-exclude-file-list},
+but this option sets the list of function names to be excluded from
+instrumentation. The function name to be matched is its user-visible
+name, such as @code{vector<int> blah(const vector<int> &)}, not the
+internal mangled name (e.g., @code{_Z4blahRSt6vectorIiSaIiEE}). The
+match is done on substrings: if the @var{sym} parameter is a substring
+of the function name, it is considered to be a match.
+
@item -fstack-check
@opindex fstack-check
Generate code to verify that you do not go beyond the boundary of the
Not all targets provide complete support for this switch.
@item -ftls-model=@var{model}
+@opindex ftls-model
Alter the thread-local storage model to be used (@pxref{Thread-Local}).
The @var{model} argument should be one of @code{global-dynamic},
@code{local-dynamic}, @code{initial-exec} or @code{local-exec}.