-@c Copyright (C) 1988, 89, 92-98, 1999 Free Software Foundation, Inc.
+@c Copyright (C) 1988, 89, 92-99, 2000 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@item Overall Options
@xref{Overall Options,,Options Controlling the Kind of Output}.
@smallexample
--c -S -E -o @var{file} -pipe -v --help -x @var{language}
+-c -S -E -o @var{file} -pipe -pass-exit-codes -v --help -x @var{language}
@end smallexample
@item C Language Options
@xref{C Dialect Options,,Options Controlling C Dialect}.
@smallexample
--ansi -flang-isoc9x -fallow-single-precision -fcond-mismatch -fno-asm
+-ansi -fstd -fallow-single-precision -fcond-mismatch -fno-asm
-fno-builtin -ffreestanding -fhosted -fsigned-bitfields -fsigned-char
-funsigned-bitfields -funsigned-char -fwritable-strings
-traditional -traditional-cpp -trigraphs
@smallexample
-fno-access-control -fcheck-new -fconserve-space -fdollars-in-identifiers
-fno-elide-constructors -fexternal-templates -ffor-scope
--fno-for-scope -fno-gnu-keywords -fguiding-decls -fhandle-signatures
+-fno-for-scope -fno-gnu-keywords -fguiding-decls
-fhonor-std -fhuge-objects -fno-implicit-templates -finit-priority
-fno-implement-inlines -fname-mangling-version-@var{n} -fno-default-inline
-foperator-names -fno-optional-diags -fpermissive -frepo -fstrict-prototype
--fsquangle -ftemplate-depth-@var{n} -fthis-is-variable -fvtable-thunks
+-fsquangle -ftemplate-depth-@var{n} -fuse-cxa-atexit -fvtable-thunks
-nostdinc++ -Wctor-dtor-privacy -Wno-deprecated -Weffc++
-Wno-non-template-friend
-Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual
@xref{Warning Options,,Options to Request or Suppress Warnings}.
@smallexample
-fsyntax-only -pedantic -pedantic-errors
--w -W -Wall -Waggregate-return -Wbad-function-cast
+-w -W -Wall -Waggregate-return
-Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment
-Wconversion -Werror -Wformat
-Wid-clash-@var{len} -Wimplicit -Wimplicit-int
-Wimplicit-function-declaration -Wimport
--Werror-implicit-function-declaration -Winline
+-Werror-implicit-function-declaration -Wfloat-equal -Winline
-Wlarger-than-@var{len} -Wlong-long
-Wmain -Wmissing-declarations -Wmissing-noreturn
--Wmissing-prototypes -Wmultichar -Wnested-externs -Wno-import
+-Wmultichar -Wno-import -Wpacked -Wpadded
-Wparentheses -Wpointer-arith -Wredundant-decls
--Wreturn-type -Wshadow -Wsign-compare -Wstrict-prototypes
--Wswitch -Wtraditional
--Wtrigraphs -Wundef -Wuninitialized -Wunused -Wwrite-strings
--Wunknown-pragmas
+-Wreturn-type -Wshadow -Wsign-compare -Wswitch
+-Wtrigraphs -Wundef -Wuninitialized -Wunknown-pragmas -Wunreachable-code
+-Wunused -Wwrite-strings
+@end smallexample
+
+@item C-only Warning Options
+@smallexample
+-Wbad-function-cast -Wmissing-prototypes -Wnested-externs
+-Wstrict-prototypes -Wtraditional
@end smallexample
@item Debugging Options
-g -g@var{level} -gcoff -gdwarf -gdwarf-1 -gdwarf-1+ -gdwarf-2
-ggdb -gstabs -gstabs+ -gxcoff -gxcoff+
-p -pg -print-file-name=@var{library} -print-libgcc-file-name
--print-prog-name=@var{program} -print-search-dirs -save-temps
+-print-prog-name=@var{program} -print-search-dirs -save-temps -time
@end smallexample
@item Optimization Options
@xref{Optimize Options,,Options that Control Optimization}.
@smallexample
--fbranch-probabilities -foptimize-register-moves
+-falign-functions=@var{n} -falign-labels=@var{n} -falign-loops=@var{n}
+-falign-jumps=@var{n} -fbranch-probabilities
-fcaller-saves -fcse-follow-jumps -fcse-skip-blocks
--fdelayed-branch -fexpensive-optimizations
--ffast-math -ffloat-store -fforce-addr -fforce-mem
--fdata-sections -ffunction-sections -fgcse
--finline-functions -finline-limit-@var{n} -fkeep-inline-functions
--fno-default-inline -fno-defer-pop -fno-function-cse
--fno-inline -fno-peephole -fomit-frame-pointer -fregmove
--frerun-cse-after-loop -frerun-loop-opt -fschedule-insns
--fschedule-insns2 -fstrength-reduce -fthread-jumps
--funroll-all-loops -funroll-loops
--fmove-all-movables -freduce-all-givs -fstrict-aliasing
+-fdelayed-branch -fdelete-null-pointer-checks -fexpensive-optimizations
+-ffast-math -ffloat-store -fforce-addr -fforce-mem -fno-math-errno
+-fdata-sections -ffunction-sections -fgcse
+-finline-functions -finline-limit=@var{n} -fkeep-inline-functions
+-fmove-all-movables -fno-default-inline -fno-defer-pop
+-fno-function-cse -fno-inline -fno-peephole
+-fomit-frame-pointer -foptimize-register-moves -fregmove
+-frerun-cse-after-loop -frerun-loop-opt -freduce-all-givs
+-fschedule-insns -fschedule-insns2 -fstrength-reduce
+-fstrict-aliasing -fthread-jumps -funroll-all-loops
+-funroll-loops
-O -O0 -O1 -O2 -O3 -Os
@end smallexample
-m68000 -m68020 -m68020-40 -m68020-60 -m68030 -m68040
-m68060 -mcpu32 -m5200 -m68881 -mbitfield -mc68000 -mc68020
-mfpa -mnobitfield -mrtd -mshort -msoft-float -mpcrel
--malign-int
+-malign-int -mstrict-align
@emph{VAX Options}
-mg -mgnu -munix
-mcpu=@var{cpu type}
-mtune=@var{cpu type}
-mcmodel=@var{code model}
--malign-jumps=@var{num} -malign-loops=@var{num}
--malign-functions=@var{num}
-m32 -m64
--mapp-regs -mbroken-saverestore -mcypress -mepilogue
--mflat -mfpu -mhard-float -mhard-quad-float
--mimpure-text -mlive-g0 -mno-app-regs -mno-epilogue
--mno-flat -mno-fpu -mno-impure-text
--mno-stack-bias -mno-unaligned-doubles
+-mapp-regs -mbroken-saverestore -mcypress
+-mepilogue -mfaster-structs -mflat
+-mfpu -mhard-float -mhard-quad-float
+-mimpure-text -mlive-g0 -mno-app-regs
+-mno-epilogue -mno-faster-structs -mno-flat -mno-fpu
+-mno-impure-text -mno-stack-bias -mno-unaligned-doubles
-msoft-float -msoft-quad-float -msparclite -mstack-bias
-msupersparc -munaligned-doubles -mv8
-mapcs-reentrant -mno-apcs-reentrant
-msched-prolog -mno-sched-prolog
-mlittle-endian -mbig-endian -mwords-little-endian
--mshort-load-bytes -mno-short-load-bytes -mshort-load-words -mno-short-load-words
+-malignment-traps -mno-alignment-traps
-msoft-float -mhard-float -mfpe
-mthumb-interwork -mno-thumb-interwork
-mcpu= -march= -mfpe=
@emph{MN10300 Options}
-mmult-bug
-mno-mult-bug
+-mam33
+-mno-am33
-mrelax
@emph{M32R/D Options}
-mpowerpc -mpowerpc64 -mno-powerpc
-mpowerpc-gpopt -mno-powerpc-gpopt
-mpowerpc-gfxopt -mno-powerpc-gfxopt
--mnew-mnemonics -mno-new-mnemonics
+-mnew-mnemonics -mold-mnemonics
-mfull-toc -mminimal-toc -mno-fop-in-toc -mno-sum-in-toc
-m64 -m32 -mxl-call -mno-xl-call -mthreads -mpe
-msoft-float -mhard-float -mmultiple -mno-multiple
-mminimum-fp-blocks -mnohc-struct-return
@emph{MIPS Options}
--mabicalls -mcpu=@var{cpu type} -membedded-data
+-mabicalls -mcpu=@var{cpu type} -membedded-data -muninit-const-in-rodata
-membedded-pic -mfp32 -mfp64 -mgas -mgp32 -mgp64
-mgpopt -mhalf-pic -mhard-float -mint64 -mips1
-mips2 -mips3 -mips4 -mlong64 -mlong32 -mlong-calls -mmemcpy
-mmips-as -mmips-tfile -mno-abicalls
--mno-embedded-data -mno-embedded-pic
+-mno-embedded-data -mno-uninit-const-in-rodata -mno-embedded-pic
-mno-gpopt -mno-long-calls
-mno-memcpy -mno-mips-tfile -mno-rnames -mno-stats
-mrnames -msoft-float
-m4650 -msingle-float -mmad
-mstats -EL -EB -G @var{num} -nocpp
-mabi=32 -mabi=n32 -mabi=64 -mabi=eabi
+-mno-crt0
@emph{i386 Options}
-mcpu=@var{cpu type}
-mreg-alloc=@var{list} -mregparm=@var{num}
-malign-jumps=@var{num} -malign-loops=@var{num}
-malign-functions=@var{num} -mpreferred-stack-boundary=@var{num}
+-mthreads -mno-align-stringops -minline-all-stringops
@emph{HPPA Options}
-march=@var{architecture type}
@xref{Code Gen Options,,Options for Code Generation Conventions}.
@smallexample
-fcall-saved-@var{reg} -fcall-used-@var{reg}
--fexceptions -ffixed-@var{reg} -finhibit-size-directive
+-fexceptions -funwind-tables -ffixed-@var{reg} -finhibit-size-directive
-fcheck-memory-usage -fprefix-function-name
-fno-common -fno-ident -fno-gnu-linker
-fpcc-struct-return -fpic -fPIC
-freg-struct-return -fshared-data -fshort-enums
-fshort-double -fvolatile -fvolatile-global -fvolatile-static
-fverbose-asm -fpack-struct -fstack-check
+-fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym}
-fargument-alias -fargument-noalias
-fargument-noalias-global
-fleading-underscore
Turn off any specification of a language, so that subsequent files are
handled according to their file name suffixes (as they are if @samp{-x}
has not been used at all).
+
+@item -pass-exit-codes
+Normally the @code{gcc} program will exit with the code of 1 if any
+phase of the compiler returns a non-success return code. If you specify
+@samp{-pass-exit-codes}, the @code{gcc} program will instead return with
+numerically highest error produced by any phase that returned an error
+indication.
@end table
If you only want some of the stages of compilation, you can use
The functions @code{alloca}, @code{abort}, @code{exit}, and
@code{_exit} are not builtin functions when @samp{-ansi} is used.
-@item -flang-isoc9x
-Enable support for features found in the C9X standard. In particular,
-enable support for the C9X @code{restrict} keyword.
+@item -fstd=
+Determine the language standard. A value for this option must be provided;
+possible values are
+
+@itemize @minus
+@item iso9899:1990
+Same as -ansi
+
+@item iso9899:199409
+ISO C as modified in amend. 1
+
+@item iso9899:199x
+ISO C 9x
-Even when this option is not specified, you can still use some C9X
-features in so far as they do not conflict with previous C standards.
-For example, you may use @code{__restrict__} even when -flang-isoc9x
-is not specified.
+@item c89
+same as -std=iso9899:1990
+
+@item c9x
+same as -std=iso9899:199x
+
+@item gnu89
+default, iso9899:1990 + gnu extensions
+
+@item gnu9x
+iso9899:199x + gnu extensions
+@end itemize
+
+Even when this option is not specified, you can still use some of the
+features of newer standards in so far as they do not conflict with
+previous C standards. For example, you may use @code{__restrict__} even
+when -fstd=c9x is not specified.
@item -fno-asm
Do not recognize @code{asm}, @code{inline} or @code{typeof} as a
@findex abs
@findex alloca
@findex cos
+@findex cosf
+@findex cosl
@findex exit
+@findex _exit
@findex fabs
+@findex fabsf
+@findex fabsl
@findex ffs
@findex labs
@findex memcmp
@findex memcpy
+@findex memset
@findex sin
+@findex sinf
+@findex sinl
@findex sqrt
+@findex sqrtf
+@findex sqrtl
@findex strcmp
@findex strcpy
@findex strlen
Don't recognize builtin functions that do not begin with @samp{__builtin_}
as prefix. Currently, the functions affected include @code{abort},
-@code{abs}, @code{alloca}, @code{cos}, @code{exit}, @code{fabs},
-@code{ffs}, @code{labs}, @code{memcmp}, @code{memcpy}, @code{sin},
-@code{sqrt}, @code{strcmp}, @code{strcpy}, and @code{strlen}.
+@code{abs}, @code{alloca}, @code{cos}, @code{cosf}, @code{cosl},
+@code{exit}, @code{_exit}, @code{fabs}, @code{fabsf}, @code{fabsl},
+@code{ffs}, @code{labs}, @code{memcmp}, @code{memcpy}, @code{memset},
+@code{sin}, @code{sinf}, @code{sinl}, @code{sqrt}, @code{sqrtf},
+@code{sqrtl}, @code{strcmp}, @code{strcpy}, and @code{strlen}.
GCC normally generates special code to handle certain builtin functions
more efficiently; for instance, calls to @code{alloca} may become single
cannot set a breakpoint on those calls, nor can you change the behavior
of the functions by linking with a different library.
-The @samp{-ansi} option prevents @code{alloca} and @code{ffs} from being
-builtin functions, since these functions do not have an ANSI standard
-meaning.
+The @samp{-ansi} option prevents @code{alloca}, @code{ffs} and @code{_exit}
+from being builtin functions, since these functions do not have an ANSI
+standard meaning.
@item -fhosted
@cindex hosted environment
precision, use this option. This option has no effect when compiling
with ANSI or GNU C conventions (the default).
+@item -fshort-wchar
+Override the underlying type for @samp{wchar_t} to be @samp{short
+unsigned int} instead of the default for the target. This option is
+useful for building programs to run under WINE.
@end table
@node C++ Dialect Options
otherwise be invalid, or have different behavior.
@item -fno-gnu-keywords
-Do not recognize @code{classof}, @code{headof}, @code{signature},
-@code{sigof} or @code{typeof} as a keyword, so that code can use these
-words as identifiers. You can use the keywords @code{__classof__},
-@code{__headof__}, @code{__signature__}, @code{__sigof__}, and
+Do not recognize @code{classof}, @code{headof}, or @code{typeof} as a
+keyword, so that code can use these words as identifiers. You can use
+the keywords @code{__classof__}, @code{__headof__}, and
@code{__typeof__} instead. @samp{-ansi} implies
@samp{-fno-gnu-keywords}.
ABI, all C++ code, @emph{including libgcc.a} must be built with the same
setting of this option.
-@item -fhandle-signatures
-Recognize the @code{signature} and @code{sigof} keywords for specifying
-abstract types. The default (@samp{-fno-handle-signatures}) is not to
-recognize them. @xref{C++ Signatures, Type Abstraction using
-Signatures}.
-
@item -fhonor-std
Treat the @code{namespace std} as a namespace, instead of ignoring
it. For compatibility with earlier versions of g++, the compiler will,
controlled by @samp{#pragma implementation}. This will cause linker
errors if these functions are not inlined everywhere they are called.
+@item -fms-extensions
+Disable pedwarns about constructs used in MFC, such as implicit int and
+getting a pointer to member function via non-standard syntax.
+
@item -fname-mangling-version-@var{n}
Control the way in which names are mangled. Version 0 is compatible
with versions of g++ before 2.8. Version 1 is the default. Version 1
information.
@item -fno-rtti
-Disable generation of the information used by C++ runtime type
-identification features (@samp{dynamic_cast} and @samp{typeid}). If you
-don't use those parts of the language (or exception handling, which uses
-@samp{dynamic_cast} internally), you can save some space by using this
-flag.
+Disable generation of information about every class with virtual
+functions for use by the C++ runtime type identification features
+(@samp{dynamic_cast} and @samp{typeid}). If you don't use those parts
+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.
@item -fstrict-prototype
Within an @samp{extern "C"} linkage specification, treat a function
endless recursions during template class instantiation. ANSI/ISO C++
conforming programs must not rely on a maximum depth greater than 17.
-@item -fthis-is-variable
-Permit assignment to @code{this}. The incorporation of user-defined
-free store management into C++ has made assignment to @samp{this} an
-anachronism. Therefore, by default it is invalid to assign to
-@code{this} within a class member function; that is, GNU C++ treats
-@samp{this} in a member function of class @code{X} as a non-lvalue of
-type @samp{X *}. However, for backwards compatibility, you can make it
-valid with @samp{-fthis-is-variable}.
+@item -fuse-cxa-atexit
+Register destructors for objects with static storage duration with the
+@code{__cxa_atexit} function rather than the @code{atexit} function.
+This option is required for fully standards-compliant handling of static
+destructors, but will only work if your C library supports
+@code{__cxa_atexit}.
@item -fvtable-thunks
Use @samp{thunks} to implement the virtual function dispatch table
Warn if a multicharacter constant (@samp{'FOOF'}) is used. Usually they
indicate a typo in the user's code, as they have implementation-defined
values, and should not be used in portable code.
-
+
@item -Wparentheses
Warn if parentheses are omitted in certain contexts, such
as when there is an assignment in a context where a truth value
(@pxref{Variable Attributes}).
@item -Wuninitialized
-An automatic variable is used without first being initialized.
+Warn if an automatic variable is used without first being initialized or
+if a variable may be clobbered by a @code{setjmp} call.
These warnings are possible only in optimizing compilation,
because they require data flow information that is computed only
@noindent
This has no bug because @code{save_y} is used only if it is set.
+@cindex @code{longjmp} warnings
+This option also warns when a nonvolatile automatic variable might be
+changed by a call to @code{longjmp}. These warnings as well are possible
+only in optimizing compilation.
+
+The compiler sees only the calls to @code{setjmp}. It cannot know
+where @code{longjmp} will be called; in fact, a signal handler could
+call it at any point in the code. As a result, you may get a warning
+even when there is in fact no problem because @code{longjmp} cannot
+in fact be called at the place which would cause a problem.
+
Some spurious warnings can be avoided if you declare all the functions
you use that never return as @code{noreturn}. @xref{Function
Attributes}.
+@item -Wreorder (C++ only)
+@cindex reordering, warning
+@cindex warning for reordering of member initializers
+Warn when the order of member initializers given in the code does not
+match the order in which they must be executed. For instance:
+
@item -Wunknown-pragmas
@cindex warning for unknown pragmas
@cindex unknown pragmas, warning
Print extra warning messages for these events:
@itemize @bullet
-@cindex @code{longjmp} warnings
-@item
-A nonvolatile automatic variable might be changed by a call to
-@code{longjmp}. These warnings as well are possible only in
-optimizing compilation.
-
-The compiler sees only the calls to @code{setjmp}. It cannot know
-where @code{longjmp} will be called; in fact, a signal handler could
-call it at any point in the code. As a result, you may get a warning
-even when there is in fact no problem because @code{longjmp} cannot
-in fact be called at the place which would cause a problem.
-
@item
A function can return either with or without a value. (Falling
off the end of the function body is considered returning without
@end smallexample
@end itemize
-@item -Wtraditional
+@item -Wfloat-equal
+Warn if floating point values are used in equality comparisons.
+
+@item -Wtraditional (C only)
Warn about certain constructs that behave differently in traditional and
ANSI C.
@item
A non-@code{static} function declaration follows a @code{static} one.
This construct is not accepted by some traditional C compilers.
+
+@item
+The ANSI type of an integer constant has a different width or
+signedness from its traditional type. This warning is only issued if
+the base of the constant is ten. I.e. hexadecimal or octal values, which
+typically represent bit patterns, are not warned about.
+
+@item
+Usage of ANSI string concatenation is detected.
@end itemize
@item -Wundef
convenience in calculations with @code{void *} pointers and pointers
to functions.
-@item -Wbad-function-cast
+@item -Wbad-function-cast (C only)
Warn whenever a function call is cast to a non-matching type.
For example, warn if @code{int malloc()} is cast to @code{anything *}.
called. (In languages where you can return an array, this also elicits
a warning.)
-@item -Wstrict-prototypes
+@item -Wstrict-prototypes (C only)
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 -Wmissing-prototypes
+@item -Wmissing-prototypes (C only)
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
adding the @code{noreturn} attribute, otherwise subtle code generation
bugs could be introduced.
+@item -Wpacked
+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
+instance, in this code, the variable @code{f.x} in @code{struct bar}
+will be misaligned even though @code{struct bar} does not itself
+have the packed attribute:
+
+@smallexample
+@group
+struct foo @{
+ int x;
+ char a, b, c, d;
+@} __attribute__((packed));
+struct bar @{
+ char z;
+ struct foo f;
+@};
+@end group
+@end smallexample
+
+@item -Wpadded
+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
+reduce the padding and so make the structure smaller.
+
@item -Wredundant-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
-Warn if an @code{extern} declaration is encountered within an function.
+@item -Wnested-externs (C only)
+Warn if an @code{extern} declaration is encountered within a function.
+
+@item -Wunreachable-code
+Warn if the compiler detects that code will never be executed.
+
+This option is intended to warn when the compiler detects that at
+least a whole line of source code will never be executed, because
+some condition is never satisfied or because it is after a
+procedure that never returns.
+
+It is possible for this option to produce a warning even though there
+are circumstances under which part of the affected line can be executed,
+so care should be taken when removing apparently-unreachable code.
+
+For instance, when a function is inlined, a warning may mean that the
+line is unreachable in only one inlined copy of the function.
+
+This option is not made part of @samp{-Wall} because in a debugging
+version of a program there is often substantial code which checks
+correct functioning of the program and is, hopefully, unreachable
+because the program does work. Another common use of unreachable
+code is to provide behaviour which is selectable at compile-time.
@item -Winline
-Warn if a function can not be inlined, and either it was declared as inline,
-or else the @samp{-finline-functions} option was given.
+Warn if a function can not be inlined and it was declared as inline.
@item -Wlong-long
Warn if @samp{long long} type is used. This is default. To inhibit
@samp{-fprofile-arcs}).
@end table
-@item -Q
-Makes the compiler print out each function name as it is compiled, and
-print some statistics about each pass when it finishes.
-
@item -d@var{letters}
Says to make debugging dumps during compilation at times specified by
@var{letters}. This is used for debugging the compiler. The file names
-for most of the dumps are made by appending a word to the source file
-name (e.g. @file{foo.c.rtl} or @file{foo.c.jump}). Here are the
-possible letters for use in @var{letters}, and their meanings:
+for most of the dumps are made by appending a pass number and a word to
+the source file name (e.g. @file{foo.c.00.rtl} or @file{foo.c.01.jump}).
+Here are the possible letters for use in @var{letters}, and their meanings:
@table @samp
+@item A
+Annotate the assembler output with miscellaneous debugging information.
@item b
-Dump after computing branch probabilities, to @file{@var{file}.bp}.
+Dump after computing branch probabilities, to @file{@var{file}.07.bp}.
@item c
-Dump after instruction combination, to the file @file{@var{file}.combine}.
+Dump after instruction combination, to the file @file{@var{file}.09.combine}.
@item d
-Dump after delayed branch scheduling, to @file{@var{file}.dbr}.
+Dump after delayed branch scheduling, to @file{@var{file}.19.dbr}.
@item D
Dump all macro definitions, at the end of preprocessing, in addition to
normal output.
-@item r
-Dump after RTL generation, to @file{@var{file}.rtl}.
-@item j
-Dump after first jump optimization, to @file{@var{file}.jump}.
@item F
-Dump after purging ADDRESSOF, to @file{@var{file}.addressof}.
+Dump after purging ADDRESSOF, to @file{@var{file}.03.addressof}.
@item f
-Dump after flow analysis, to @file{@var{file}.flow}.
+Dump after flow analysis, to @file{@var{file}.08.flow}.
@item g
-Dump after global register allocation, to @file{@var{file}.greg}.
+Dump after global register allocation, to @file{@var{file}.13.greg}.
@item G
-Dump after GCSE, to @file{@var{file}.gcse}.
+Dump after GCSE, to @file{@var{file}.04.gcse}.
@item j
-Dump after first jump optimization, to @file{@var{file}.jump}.
+Dump after first jump optimization, to @file{@var{file}.01.jump}.
@item J
-Dump after last jump optimization, to @file{@var{file}.jump2}.
+Dump after last jump optimization, to @file{@var{file}.17.jump2}.
@item k
-Dump after conversion from registers to stack, to @file{@var{file}.stack}.
+Dump after conversion from registers to stack, to @file{@var{file}.20.stack}.
@item l
-Dump after local register allocation, to @file{@var{file}.lreg}.
+Dump after local register allocation, to @file{@var{file}.12.lreg}.
@item L
-Dump after loop optimization, to @file{@var{file}.loop}.
+Dump after loop optimization, to @file{@var{file}.05.loop}.
@item M
Dump after performing the machine dependent reorganisation pass, to
-@file{@var{file}.mach}.
+@file{@var{file}.18.mach}.
@item N
-Dump after the register move pass, to @file{@var{file}.regmove}.
+Dump after the register move pass, to @file{@var{file}.10.regmove}.
@item r
-Dump after RTL generation, to @file{@var{file}.rtl}.
+Dump after RTL generation, to @file{@var{file}.00.rtl}.
@item R
-Dump after the second instruction scheduling pass, to @file{@var{file}.sched2}.
+Dump after the second instruction scheduling pass, to
+@file{@var{file}.16.sched2}.
@item s
Dump after CSE (including the jump optimization that sometimes follows
-CSE), to @file{@var{file}.cse}.
+CSE), to @file{@var{file}.02.cse}.
@item S
-Dump after the first instruction scheduling pass, to @file{@var{file}.sched}.
+Dump after the first instruction scheduling pass, to
+@file{@var{file}.11.sched}.
@item t
Dump after the second CSE pass (including the jump optimization that
-sometimes follows CSE), to @file{@var{file}.cse2}.
+sometimes follows CSE), to @file{@var{file}.06.cse2}.
@item a
Produce all the dumps listed above.
@item m
Annotate the assembler output with a comment indicating which
pattern and alternative was used. The length of each instruction is
also printed.
+@item v
+For each of the other indicated dump files (except for
+@file{@var{file}.00.rtl}), dump a representation of the control flow graph
+suitible for viewing with VCG to @file{@var{file}.@var{pass}.vcg}.
+@item w
+Dump after the second flow pass to @file{@var{file}.14.flow2}.
@item x
Just generate RTL for a function instead of compiling it. Usually used
with @samp{r}.
@item y
Dump debugging information during parsing, to standard error.
-@item A
-Annotate the assembler output with miscellaneous debugging information.
+@item z
+Dump after the peephole2 pass to @file{@var{file}.15.peephole2}.
@end table
@item -fdump-unnumbered
compiling @file{foo.c} with @samp{-c -save-temps} would produce files
@file{foo.i} and @file{foo.s}, as well as @file{foo.o}.
+@item -time
+Report the CPU time taken by each subprocess in the compilation
+sequence. For C source files, this is the preprocessor, compiler
+proper, and assembler. The output looks like this:
+
+@smallexample
+# cpp 0.04 0.04
+# cc1 0.12 0.01
+# as 0.00 0.01
+@end smallexample
+
+The first number on each line is the ``user time,'' that is time spent
+executing the program itself. The second number is ``system time,''
+time spent executing operating system routines on behalf of the program.
+Both numbers are in seconds.
+
@item -print-file-name=@var{library}
Print the full absolute name of the library file @var{library} that
would be used when linking---and don't do anything else. With this
declared @code{static}, then the function is normally not output as
assembler code in its own right.
-@item -finline-limit-@var{n}
+@item -finline-limit=@var{n}
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 (ie marked with the inline keyword or defined within the class
it can result in incorrect output for programs which depend on
an exact implementation of IEEE or ANSI rules/specifications for
math functions.
+
+@item -fno-math-errno
+Do not set ERRNO after calling math functions that are executed
+with a single instruction, e.g., sqrt. A program that relies on
+IEEE exceptions for math error handling may want to use this flag
+for speed while maintaining IEEE arithmetic compatibility.
+
+The default is @samp{-fmath-errno}. The @samp{-ffast-math} option
+sets @samp{-fno-math-errno}.
@end table
@c following causes underfulls.. they don't look great, but we deal.
Perform a global common subexpression elimination pass.
This pass also performs global constant and copy propagation.
+@item -fdelete-null-pointer-checks
+Use global dataflow analysis to identify and eliminate useless null
+pointer checks. Programs which rely on NULL pointer dereferences @emph{not}
+halting the program may not work properly with this option. Use
+-fno-delete-null-pointer-checks to disable this optimizing for programs
+which depend on that behavior.
+
+
@item -fexpensive-optimizations
Perform a number of minor optimizations that are relatively expensive.
@code{c_get_alias_set}.
@end ifset
+@item -falign-functions
+@itemx -falign-functions=@var{n}
+Align the start of functions to the next power-of-two greater than
+@var{n}, skipping up to @var{n} bytes. For instance,
+@samp{-falign-functions=32} aligns functions to the next 32-byte
+boundary, but @samp{-falign-functions=24} would align to the next
+32-byte boundary only if this can be done by skipping 23 bytes or less.
+
+@samp{-fno-align-functions} and @samp{-falign-functions=1} are
+equivalent and mean that functions will not be aligned.
+
+Some assemblers only support this flag when @var{n} is a power of two;
+in that case, it is rounded up.
+
+If @var{n} is not specified, use a machine-dependent default.
+
+@item -falign-labels
+@itemx -falign-labels=@var{n}
+Align all branch targets to a power-of-two boundary, skipping up to
+@var{n} bytes like @samp{-falign-functions}. This option can easily
+make code slower, because it must insert dummy operations for when the
+branch target is reached in the usual flow of the code.
+
+If @samp{-falign-loops} or @samp{-falign-jumps} are applicable and
+are greater than this value, then their values are used instead.
+
+If @var{n} is not specified, use a machine-dependent default which is
+very likely to be @samp{1}, meaning no alignment.
+
+@item -falign-loops
+@itemx -falign-loops=@var{n}
+Align loops to a power-of-two boundary, skipping up to @var{n} bytes
+like @samp{-falign-functions}. The hope is that the loop will be
+executed many times, which will make up for any execution of the dummy
+operations.
+
+If @var{n} is not specified, use a machine-dependent default.
+
+@item -falign-jumps
+@itemx -falign-jumps=@var{n}
+Align branch targets to a power-of-two boundary, for branch targets
+where the targets can only be reached by jumping, skipping up to @var{n}
+bytes like @samp{-falign-functions}. In this case, no dummy operations
+need be executed.
+
+If @var{n} is not specified, use a machine-dependent default.
+
@end table
@node Preprocessor Options
not presently supported with -mpcrel, though this could be supported for
68020 and higher processors.
+@item -mno-strict-align
+@itemx -mstrict-align
+@kindex -mstrict-align
+Do not (do) assume that unaligned memory references will be handled by
+the system.
+
@end table
@node VAX Options
generated by other compilers. It is not the default because it results
in a performance loss, especially for floating point code.
+@item -mno-faster-structs
+@itemx -mfaster-structs
+With @samp{-mfaster-structs}, the compiler assumes that structures
+should have 8 byte alignment. This enables the use of pairs of
+@code{ldd} and @code{std} instructions for copies in structure
+assignment, in place of twice as many @code{ld} and @code{st} pairs.
+However, the use of this changed alignment directly violates the Sparc
+ABI. Thus, it's intended only for use on targets where the developer
+acknowledges that their resulting code will not be directly in line with
+the rules of the ABI.
+
@item -mv8
@itemx -msparclite
These two options select variations on the SPARC architecture.
@samp{hypersparc}, @samp{f930}, @samp{f934}, @samp{sparclite86x},
@samp{tsc701}, @samp{ultrasparc}.
-@item -malign-loops=@var{num}
-Align loops to a 2 raised to a @var{num} byte boundary. If
-@samp{-malign-loops} is not specified, the default is 2.
-
-@item -malign-jumps=@var{num}
-Align instructions that are only jumped to to a 2 raised to a @var{num}
-byte boundary. If @samp{-malign-jumps} is not specified, the default is 2.
-
-@item -malign-functions=@var{num}
-Align the start of functions to a 2 raised to @var{num} byte boundary.
-If @samp{-malign-functions} is not specified, the default is 2 if compiling
-for 32 bit sparc, and 5 if compiling for 64 bit sparc.
-
@end table
These @samp{-m} switches are supported in addition to the above
big-endian ARM processors generated by versions of the compiler prior to
2.8.
+@item -malignment-traps
+@kindex -malignment-traps
+Generate code that will not trap if the MMU has alignment traps enabled.
+On ARM architectures prior to ARMv4, there were no instructions to
+access half-word objects stored in memory. However, when reading from
+memory a feature of the ARM architecture allows a word load to be used,
+even if the address is unaligned, and the processor core will rotate the
+data as it is being loaded. This option tells the compiler that such
+misaligned accesses will cause a MMU trap and that it should instead
+synthesise the access as a series of byte accesses. The compiler can
+still use word accesses to load half-word data if it knows that the
+address is aligned to a word boundary.
+
+This option is ignored when compiling for ARM architecture 4 or later,
+since these processors have instructions to directly access half-word
+objects in memory.
+
+@item -mno-alignment-traps
+@kindex -mno-alignment-traps
+Generate code that assumes that the MMU will not trap unaligned
+accesses. This produces better code when the target instruction set
+does not have half-word memory operations (implementations prior to
+ARMv4).
+
+Note that you cannot use this option to access unaligned word objects,
+since the processor will only fetch one 32-bit aligned object from
+memory.
+
+The default setting for most targets is -mno-alignment-traps, since
+this produces better code when there are no half-word memory
+instructions available.
+
@item -mshort-load-bytes
@kindex -mshort-load-bytes
-Do not try to load half-words (eg @samp{short}s) by loading a word from
-an unaligned address. For some targets the MMU is configured to trap
-unaligned loads; use this option to generate code that is safe in these
-environments.
+This is a depreciated alias for @samp{-malignment-traps}.
@item -mno-short-load-bytes
@kindex -mno-short-load-bytes
-Use unaligned word loads to load half-words (eg @samp{short}s). This
-option produces more efficient code, but the MMU is sometimes configured
-to trap these instructions.
+This is a depreciated alias for @samp{-mno-alignment-traps}.
@item -mshort-load-words
@kindex -mshort-load-words
-This is a synonym for @samp{-mno-short-load-bytes}.
+This is a depreciated alias for @samp{-mno-alignment-traps}.
@item -mno-short-load-words
@kindex -mno-short-load-words
-This is a synonym for @samp{-mshort-load-bytes}.
+This is a depreciated alias for @samp{-malignment-traps}.
@item -mbsd
@kindex -mbsd
Do not generate code to avoid bugs in the multiply instructions for the
MN10300 processors.
+@item -mam33
+Generate code which uses features specific to the AM33 processor.
+
+@item -mno-am33
+Do not generate code which uses features specific to the AM33 processor. This
+is the default.
+
@item -mrelax
Indicate to the linker that it should perform a relaxation optimization pass
to shorten branches, calls and absolute memory addresses. This option only
slightly slower code than the default, but reduces the amount of RAM required
when executing, and thus may be preferred for some embedded systems.
+@item -muninit-const-in-rodata
+@itemx -mno-uninit-const-in-rodata
+When used together with -membedded-data, it will always store uninitialized
+const variables in the read-only data section.
+
@item -msingle-float
@itemx -mdouble-float
The @samp{-msingle-float} switch tells gcc to assume that the floating
@item -nocpp
Tell the MIPS assembler to not run its preprocessor over user
assembler files (with a @samp{.s} suffix) when assembling them.
+
+@item -no-crt0
+Do not include the default crt0.
@end table
@ifset INTERNALS
to stack space usage, such as embedded systems and operating system kernels,
may want to reduce the preferred alignment to
@samp{-mpreferred-stack-boundary=2}.
+
+@item -mthreads
+@kindex -mthreads
+Support thread-safe exception handling on @samp{Mingw32}. Code that relies
+on thread-safe exception handling must compile and link all code with the
+@samp{-mthreads} option. When compiling, @samp{-mthreads} defines
+@samp{-D_MT}; when linking, it links in a special thread helper library
+@samp{-lmingwthrd} which cleans up per thread exception handling data.
+
+@item -mno-align-stringops
+@kindex -mno-align-stringops
+Do not align destination of inlined string operations. This switch reduces
+code size and improves performance in case the destination is already aligned,
+but gcc don't know about it.
+
+@item -minline-all-stringops
+@kindex -minline-all-stringops
+By default GCC inlines string operations only when destination is known to be
+aligned at least to 4 byte boundary. This enables more inlining, increase code
+size, but may improve performance of code that depends on fast memcpy, strlen
+and memset for short lengths.
@end table
@node HPPA Options
@table @code
@item -fexceptions
Enable exception handling. Generates extra code needed to propagate
-exceptions. For some targets, this implies generation of frame unwind
-information for all functions. This can produce significant data size
-overhead, although it does not affect execution.
-If you do not specify this option, it is enabled by
-default for languages like C++ which normally require exception handling,
-and disabled for languages like C that do not normally require it.
-However, when compiling C code that needs to interoperate properly with
-exception handlers written in C++, you may need to enable this option.
-You may also wish to disable this option is you are compiling older C++
-programs that don't use exception handling.
+exceptions. For some targets, this implies GNU CC will generate frame
+unwind information for all functions, which can produce significant data
+size overhead, although it does not affect execution. If you do not
+specify this option, GNU CC will enable it by default for languages like
+C++ which normally require exception handling, and disable itfor
+languages like C that do not normally require it. However, you may need
+to enable this option when compiling C code that needs to interoperate
+properly with exception handlers written in C++. You may also wish to
+disable this option if you are compiling older C++ programs that don't
+use exception handling.
+
+@item -funwind-tables
+Similar to @code{-fexceptions}, except that it will just generate any needed
+static data, but will not affect the generated code in any other way.
+You will normally not enable this option; instead, a language processor
+that needs this handling would enable it on your behalf.
@item -fpcc-struct-return
Return ``short'' @code{struct} and @code{union} values in memory like
exists in one copy per process.
@item -fno-common
-Allocate even uninitialized global variables in the bss section of the
+Allocate even uninitialized global variables in the data section of the
object file, rather than generating them as common blocks. This has the
effect that if the same variable is declared (without @code{extern}) in
two different compilations, you will get an error when you link them.
@samp{-fcheck-memory-usage} without @samp{-fprefix-function-name}.
If you specify this option, you can not use the @code{asm} or
-@code{__asm__} keywords in functions with memory checking enabled. The
-compiler cannot understand what the @code{asm} statement will do, and
-therefore cannot generate the appropriate code, so it is rejected.
-However, the function attribute @code{no_check_memory_usage} will
-disable memory checking within a function, and @code{asm} statements can
-be put inside such functions. Inline expansion of a non-checked
-function within a checked function is permitted; the inline function's
-memory accesses won't be checked, but the rest will.
-
-If you move your @code{asm} statements to non-checked inline functions,
-but they do access memory, you can add calls to the support code in your
+@code{__asm__} keywords in functions with memory checking enabled. GNU
+CC cannot understand what the @code{asm} statement may do, and therefore
+cannot generate the appropriate code, so it will reject it. However, if
+you specify the function attribute @code{no_check_memory_usage} (see
+@pxref{Function Attributes}, GNU CC will disable memory checking within a
+function; you may use @code{asm} statements inside such functions. You
+may have an inline expansion of a non-checked function within a checked
+function; in that case GNU CC will not generate checks for the inlined
+function's memory accesses.
+
+If you move your @code{asm} statements to non-checked inline functions
+and they do access memory, you can add calls to the support code in your
inline function, to indicate any reads, writes, or copies being done.
These calls would be similar to those done in the stubs described above.
-@c FIXME: The support-routine interface is defined by the compiler and
-@c should be documented!
-
@item -fprefix-function-name
Request GCC to add a prefix to the symbols generated for function names.
GCC adds a prefix to the names of functions defined as well as
a single-threaded environment since stack overflow is automatically
detected on nearly all systems if there is only one stack.
+Note that this switch does not actually cause checking to be done; the
+operating system must do that. The switch causes generation of code
+to ensure that the operating system sees the stack being extended.
+
+@item -fstack-limit-register=@var{reg}
+@itemx -fstack-limit-symbol=@var{sym}
+@itemx -fno-stack-limit
+Generate code to ensure that the stack does not grow beyond a certain value,
+either the value of a register or the address of a symbol. If the stack
+would grow beyond the value, a signal is raised. For most targets,
+the signal is raised before the stack overruns the boundary, so
+it is possible to catch the signal without taking special precautions.
+
+For instance, if the stack starts at address @samp{0x80000000} and grows
+downwards you can use the flags
+@samp{-fstack-limit-symbol=__stack_limit}
+@samp{-Wl,--defsym,__stack_limit=0x7ffe0000} which will enforce a stack
+limit of 128K.
+
@cindex aliasing of parameters
@cindex parameters, aliased
@item -fargument-alias
when this prefix is combined with the name of a subprogram, but you can
specify a prefix that ends with a slash if you wish.
+If @code{GCC_EXEC_PREFIX} is not set, GNU CC will attempt to figure out
+an appropriate prefix to use based on the pathname it was invoked with.
+
If GCC cannot find the subprogram using the specified prefix, it
tries looking in the usual places for the subprogram.
the @var{compilation-options}, they are ignored.
@item -C
-Rename files to end in @samp{.C} instead of @samp{.c}.
-This is convenient if you are converting a C program to C++.
-This option applies only to @code{protoize}.
+Rename files to end in @samp{.C}, or @samp{.cc} for DOS-based file
+systems, instead of @samp{.c}. This is convenient if you are converting
+a C program to C++. This option applies only to @code{protoize}.
@item -g
Add explicit global declarations. This means inserting explicit