Changeset b4029ad in rtems for contrib/crossrpms/patches

Mar 18, 2010, 6:35:12 PM (10 years ago)
Ralf Corsepius <ralf.corsepius@…>
4.10, 4.11, 5, master

Remove stray backup file.

1 edited


  • contrib/crossrpms/patches/gcc-core-4.4.3-rtems4.10-20100315.diff

    r13540f8 rb4029ad  
    44814481 @subsection M32R/D Options
    44824482 @cindex M32R/D options
    4483 diff -Naur gcc-4.4.3.orig/gcc/doc/invoke.texi.orig gcc-4.4.3/gcc/doc/invoke.texi.orig
    4484 --- gcc-4.4.3.orig/gcc/doc/invoke.texi.orig     1970-01-01 01:00:00.000000000 +0100
    4485 +++ gcc-4.4.3/gcc/doc/invoke.texi.orig  2010-03-15 15:27:24.000000000 +0100
    4486 @@ -0,0 +1,16650 @@
    4487 +@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4488 +@c 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
    4489 +@c Free Software Foundation, Inc.
    4490 +@c This is part of the GCC manual.
    4491 +@c For copying conditions, see the file gcc.texi.
    4492 +
    4493 +@ignore
    4494 +@c man begin INCLUDE
    4495 +@include gcc-vers.texi
    4496 +@c man end
    4497 +
    4498 +@c man begin COPYRIGHT
    4499 +Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
    4500 +1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
    4501 +Free Software Foundation, Inc.
    4502 +
    4503 +Permission is granted to copy, distribute and/or modify this document
    4504 +under the terms of the GNU Free Documentation License, Version 1.2 or
    4505 +any later version published by the Free Software Foundation; with the
    4506 +Invariant Sections being ``GNU General Public License'' and ``Funding
    4507 +Free Software'', the Front-Cover texts being (a) (see below), and with
    4508 +the Back-Cover Texts being (b) (see below).  A copy of the license is
    4509 +included in the gfdl(7) man page.
    4510 +
    4511 +(a) The FSF's Front-Cover Text is:
    4512 +
    4513 +     A GNU Manual
    4514 +
    4515 +(b) The FSF's Back-Cover Text is:
    4516 +
    4517 +     You have freedom to copy and modify this GNU Manual, like GNU
    4518 +     software.  Copies published by the Free Software Foundation raise
    4519 +     funds for GNU development.
    4520 +@c man end
    4521 +@c Set file name and title for the man page.
    4522 +@setfilename gcc
    4523 +@settitle GNU project C and C++ compiler
    4524 +@c man begin SYNOPSIS
    4525 +gcc [@option{-c}|@option{-S}|@option{-E}] [@option{-std=}@var{standard}]
    4526 +    [@option{-g}] [@option{-pg}] [@option{-O}@var{level}]
    4527 +    [@option{-W}@var{warn}@dots{}] [@option{-pedantic}]
    4528 +    [@option{-I}@var{dir}@dots{}] [@option{-L}@var{dir}@dots{}]
    4529 +    [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}]
    4530 +    [@option{-f}@var{option}@dots{}] [@option{-m}@var{machine-option}@dots{}]
    4531 +    [@option{-o} @var{outfile}] [@@@var{file}] @var{infile}@dots{}
    4532 +
    4533 +Only the most useful options are listed here; see below for the
    4534 +remainder.  @samp{g++} accepts mostly the same options as @samp{gcc}.
    4535 +@c man end
    4536 +@c man begin SEEALSO
    4537 +gpl(7), gfdl(7), fsf-funding(7),
    4538 +cpp(1), gcov(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1)
    4539 +and the Info entries for @file{gcc}, @file{cpp}, @file{as},
    4540 +@file{ld}, @file{binutils} and @file{gdb}.
    4541 +@c man end
    4542 +@c man begin BUGS
    4543 +For instructions on reporting bugs, see
    4544 +@w{@value{BUGURL}}.
    4545 +@c man end
    4546 +@c man begin AUTHOR
    4547 +See the Info entry for @command{gcc}, or
    4548 +@w{@uref{}},
    4549 +for contributors to GCC@.
    4550 +@c man end
    4551 +@end ignore
    4552 +
    4553 +@node Invoking GCC
    4554 +@chapter GCC Command Options
    4555 +@cindex GCC command options
    4556 +@cindex command options
    4557 +@cindex options, GCC command
    4558 +
    4559 +@c man begin DESCRIPTION
    4560 +When you invoke GCC, it normally does preprocessing, compilation,
    4561 +assembly and linking.  The ``overall options'' allow you to stop this
    4562 +process at an intermediate stage.  For example, the @option{-c} option
    4563 +says not to run the linker.  Then the output consists of object files
    4564 +output by the assembler.
    4565 +
    4566 +Other options are passed on to one stage of processing.  Some options
    4567 +control the preprocessor and others the compiler itself.  Yet other
    4568 +options control the assembler and linker; most of these are not
    4569 +documented here, since you rarely need to use any of them.
    4570 +
    4571 +@cindex C compilation options
    4572 +Most of the command line options that you can use with GCC are useful
    4573 +for C programs; when an option is only useful with another language
    4574 +(usually C++), the explanation says so explicitly.  If the description
    4575 +for a particular option does not mention a source language, you can use
    4576 +that option with all supported languages.
    4577 +
    4578 +@cindex C++ compilation options
    4579 +@xref{Invoking G++,,Compiling C++ Programs}, for a summary of special
    4580 +options for compiling C++ programs.
    4581 +
    4582 +@cindex grouping options
    4583 +@cindex options, grouping
    4584 +The @command{gcc} program accepts options and file names as operands.  Many
    4585 +options have multi-letter names; therefore multiple single-letter options
    4586 +may @emph{not} be grouped: @option{-dv} is very different from @w{@samp{-d
    4587 +-v}}.
    4588 +
    4589 +@cindex order of options
    4590 +@cindex options, order
    4591 +You can mix options and other arguments.  For the most part, the order
    4592 +you use doesn't matter.  Order does matter when you use several
    4593 +options of the same kind; for example, if you specify @option{-L} more
    4594 +than once, the directories are searched in the order specified.  Also,
    4595 +the placement of the @option{-l} option is significant.
    4596 +
    4597 +Many options have long names starting with @samp{-f} or with
    4598 +@samp{-W}---for example,
    4599 +@option{-fmove-loop-invariants}, @option{-Wformat} and so on.  Most of
    4600 +these have both positive and negative forms; the negative form of
    4601 +@option{-ffoo} would be @option{-fno-foo}.  This manual documents
    4602 +only one of these two forms, whichever one is not the default.
    4603 +
    4604 +@c man end
    4605 +
    4606 +@xref{Option Index}, for an index to GCC's options.
    4607 +
    4608 +@menu
    4609 +* Option Summary::      Brief list of all options, without explanations.
    4610 +* Overall Options::     Controlling the kind of output:
    4611 +                        an executable, object files, assembler files,
    4612 +                        or preprocessed source.
    4613 +* Invoking G++::        Compiling C++ programs.
    4614 +* C Dialect Options::   Controlling the variant of C language compiled.
    4615 +* C++ Dialect Options:: Variations on C++.
    4616 +* Objective-C and Objective-C++ Dialect Options:: Variations on Objective-C
    4617 +                        and Objective-C++.
    4618 +* Language Independent Options:: Controlling how diagnostics should be
    4619 +                        formatted.
    4620 +* Warning Options::     How picky should the compiler be?
    4621 +* Debugging Options::   Symbol tables, measurements, and debugging dumps.
    4622 +* Optimize Options::    How much optimization?
    4623 +* Preprocessor Options:: Controlling header files and macro definitions.
    4624 +                         Also, getting dependency information for Make.
    4625 +* Assembler Options::   Passing options to the assembler.
    4626 +* Link Options::        Specifying libraries and so on.
    4627 +* Directory Options::   Where to find header files and libraries.
    4628 +                        Where to find the compiler executable files.
    4629 +* Spec Files::          How to pass switches to sub-processes.
    4630 +* Target Options::      Running a cross-compiler, or an old version of GCC.
    4631 +* Submodel Options::    Specifying minor hardware or convention variations,
    4632 +                        such as 68010 vs 68020.
    4633 +* Code Gen Options::    Specifying conventions for function calls, data layout
    4634 +                        and register usage.
    4635 +* Environment Variables:: Env vars that affect GCC.
    4636 +* Precompiled Headers:: Compiling a header once, and using it many times.
    4637 +* Running Protoize::    Automatically adding or removing function prototypes.
    4638 +@end menu
    4639 +
    4640 +@c man begin OPTIONS
    4641 +
    4642 +@node Option Summary
    4643 +@section Option Summary
    4644 +
    4645 +Here is a summary of all the options, grouped by type.  Explanations are
    4646 +in the following sections.
    4647 +
    4648 +@table @emph
    4649 +@item Overall Options
    4650 +@xref{Overall Options,,Options Controlling the Kind of Output}.
    4651 +@gccoptlist{-c  -S  -E  -o @var{file}  -combine  -pipe  -pass-exit-codes  @gol
    4652 +-x @var{language}  -v  -###  --help@r{[}=@var{class}@r{[},@dots{}@r{]]}  --target-help  @gol
    4653 +--version -wrapper@@@var{file}}
    4654 +
    4655 +@item C Language Options
    4656 +@xref{C Dialect Options,,Options Controlling C Dialect}.
    4657 +@gccoptlist{-ansi  -std=@var{standard}  -fgnu89-inline @gol
    4658 +-aux-info @var{filename} @gol
    4659 +-fno-asm  -fno-builtin  -fno-builtin-@var{function} @gol
    4660 +-fhosted  -ffreestanding -fopenmp -fms-extensions @gol
    4661 +-trigraphs  -no-integrated-cpp  -traditional  -traditional-cpp @gol
    4662 +-fallow-single-precision  -fcond-mismatch -flax-vector-conversions @gol
    4663 +-fsigned-bitfields  -fsigned-char @gol
    4664 +-funsigned-bitfields  -funsigned-char}
    4665 +
    4666 +@item C++ Language Options
    4667 +@xref{C++ Dialect Options,,Options Controlling C++ Dialect}.
    4668 +@gccoptlist{-fabi-version=@var{n}  -fno-access-control  -fcheck-new @gol
    4669 +-fconserve-space  -ffriend-injection @gol
    4670 +-fno-elide-constructors @gol
    4671 +-fno-enforce-eh-specs @gol
    4672 +-ffor-scope  -fno-for-scope  -fno-gnu-keywords @gol
    4673 +-fno-implicit-templates @gol
    4674 +-fno-implicit-inline-templates @gol
    4675 +-fno-implement-inlines  -fms-extensions @gol
    4676 +-fno-nonansi-builtins  -fno-operator-names @gol
    4677 +-fno-optional-diags  -fpermissive @gol
    4678 +-frepo  -fno-rtti  -fstats  -ftemplate-depth-@var{n} @gol
    4679 +-fno-threadsafe-statics -fuse-cxa-atexit  -fno-weak  -nostdinc++ @gol
    4680 +-fno-default-inline  -fvisibility-inlines-hidden @gol
    4681 +-fvisibility-ms-compat @gol
    4682 +-Wabi  -Wctor-dtor-privacy @gol
    4683 +-Wnon-virtual-dtor  -Wreorder @gol
    4684 +-Weffc++  -Wstrict-null-sentinel @gol
    4685 +-Wno-non-template-friend  -Wold-style-cast @gol
    4686 +-Woverloaded-virtual  -Wno-pmf-conversions @gol
    4687 +-Wsign-promo}
    4688 +
    4689 +@item Objective-C and Objective-C++ Language Options
    4690 +@xref{Objective-C and Objective-C++ Dialect Options,,Options Controlling
    4691 +Objective-C and Objective-C++ Dialects}.
    4692 +@gccoptlist{-fconstant-string-class=@var{class-name} @gol
    4693 +-fgnu-runtime  -fnext-runtime @gol
    4694 +-fno-nil-receivers @gol
    4695 +-fobjc-call-cxx-cdtors @gol
    4696 +-fobjc-direct-dispatch @gol
    4697 +-fobjc-exceptions @gol
    4698 +-fobjc-gc @gol
    4699 +-freplace-objc-classes @gol
    4700 +-fzero-link @gol
    4701 +-gen-decls @gol
    4702 +-Wassign-intercept @gol
    4703 +-Wno-protocol  -Wselector @gol
    4704 +-Wstrict-selector-match @gol
    4705 +-Wundeclared-selector}
    4706 +
    4707 +@item Language Independent Options
    4708 +@xref{Language Independent Options,,Options to Control Diagnostic Messages Formatting}.
    4709 +@gccoptlist{-fmessage-length=@var{n}  @gol
    4710 +-fdiagnostics-show-location=@r{[}once@r{|}every-line@r{]}  @gol
    4711 +-fdiagnostics-show-option}
    4712 +
    4713 +@item Warning Options
    4714 +@xref{Warning Options,,Options to Request or Suppress Warnings}.
    4715 +@gccoptlist{-fsyntax-only  -pedantic  -pedantic-errors @gol
    4716 +-w  -Wextra  -Wall  -Waddress  -Waggregate-return  -Warray-bounds @gol
    4717 +-Wno-attributes -Wno-builtin-macro-redefined @gol
    4718 +-Wc++-compat -Wc++0x-compat -Wcast-align  -Wcast-qual  @gol
    4719 +-Wchar-subscripts -Wclobbered  -Wcomment @gol
    4720 +-Wconversion  -Wcoverage-mismatch  -Wno-deprecated  @gol
    4721 +-Wno-deprecated-declarations -Wdisabled-optimization  @gol
    4722 +-Wno-div-by-zero -Wempty-body  -Wenum-compare -Wno-endif-labels @gol
    4723 +-Werror  -Werror=* @gol
    4724 +-Wfatal-errors  -Wfloat-equal  -Wformat  -Wformat=2 @gol
    4725 +-Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol
    4726 +-Wformat-security  -Wformat-y2k @gol
    4727 +-Wframe-larger-than=@var{len} -Wignored-qualifiers @gol
    4728 +-Wimplicit  -Wimplicit-function-declaration  -Wimplicit-int @gol
    4729 +-Winit-self  -Winline @gol
    4730 +-Wno-int-to-pointer-cast -Wno-invalid-offsetof @gol
    4731 +-Winvalid-pch -Wlarger-than=@var{len}  -Wunsafe-loop-optimizations @gol
    4732 +-Wlogical-op -Wlong-long @gol
    4733 +-Wmain  -Wmissing-braces  -Wmissing-field-initializers @gol
    4734 +-Wmissing-format-attribute  -Wmissing-include-dirs @gol
    4735 +-Wmissing-noreturn  -Wno-mudflap @gol
    4736 +-Wno-multichar  -Wnonnull  -Wno-overflow @gol
    4737 +-Woverlength-strings  -Wpacked  -Wpacked-bitfield-compat  -Wpadded @gol
    4738 +-Wparentheses  -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
    4739 +-Wpointer-arith  -Wno-pointer-to-int-cast @gol
    4740 +-Wredundant-decls @gol
    4741 +-Wreturn-type  -Wsequence-point  -Wshadow @gol
    4742 +-Wsign-compare  -Wsign-conversion  -Wstack-protector @gol
    4743 +-Wstrict-aliasing -Wstrict-aliasing=n @gol
    4744 +-Wstrict-overflow -Wstrict-overflow=@var{n} @gol
    4745 +-Wswitch  -Wswitch-default  -Wswitch-enum -Wsync-nand @gol
    4746 +-Wsystem-headers  -Wtrigraphs  -Wtype-limits  -Wundef  -Wuninitialized @gol
    4747 +-Wunknown-pragmas  -Wno-pragmas -Wunreachable-code @gol
    4748 +-Wunused  -Wunused-function  -Wunused-label  -Wunused-parameter @gol
    4749 +-Wunused-value  -Wunused-variable @gol
    4750 +-Wvariadic-macros -Wvla @gol
    4751 +-Wvolatile-register-var  -Wwrite-strings}
    4752 +
    4753 +@item C and Objective-C-only Warning Options
    4754 +@gccoptlist{-Wbad-function-cast  -Wmissing-declarations @gol
    4755 +-Wmissing-parameter-type  -Wmissing-prototypes  -Wnested-externs @gol
    4756 +-Wold-style-declaration  -Wold-style-definition @gol
    4757 +-Wstrict-prototypes  -Wtraditional  -Wtraditional-conversion @gol
    4758 +-Wdeclaration-after-statement -Wpointer-sign}
    4759 +
    4760 +@item Debugging Options
    4761 +@xref{Debugging Options,,Options for Debugging Your Program or GCC}.
    4762 +@gccoptlist{-d@var{letters}  -dumpspecs  -dumpmachine  -dumpversion @gol
    4763 +-fdbg-cnt-list -fdbg-cnt=@var{counter-value-list} @gol
    4764 +-fdump-noaddr -fdump-unnumbered @gol
    4765 +-fdump-translation-unit@r{[}-@var{n}@r{]} @gol
    4766 +-fdump-class-hierarchy@r{[}-@var{n}@r{]} @gol
    4767 +-fdump-ipa-all -fdump-ipa-cgraph -fdump-ipa-inline @gol
    4768 +-fdump-statistics @gol
    4769 +-fdump-tree-all @gol
    4770 +-fdump-tree-original@r{[}-@var{n}@r{]}  @gol
    4771 +-fdump-tree-optimized@r{[}-@var{n}@r{]} @gol
    4772 +-fdump-tree-cfg -fdump-tree-vcg -fdump-tree-alias @gol
    4773 +-fdump-tree-ch @gol
    4774 +-fdump-tree-ssa@r{[}-@var{n}@r{]} -fdump-tree-pre@r{[}-@var{n}@r{]} @gol
    4775 +-fdump-tree-ccp@r{[}-@var{n}@r{]} -fdump-tree-dce@r{[}-@var{n}@r{]} @gol
    4776 +-fdump-tree-gimple@r{[}-raw@r{]} -fdump-tree-mudflap@r{[}-@var{n}@r{]} @gol
    4777 +-fdump-tree-dom@r{[}-@var{n}@r{]} @gol
    4778 +-fdump-tree-dse@r{[}-@var{n}@r{]} @gol
    4779 +-fdump-tree-phiopt@r{[}-@var{n}@r{]} @gol
    4780 +-fdump-tree-forwprop@r{[}-@var{n}@r{]} @gol
    4781 +-fdump-tree-copyrename@r{[}-@var{n}@r{]} @gol
    4782 +-fdump-tree-nrv -fdump-tree-vect @gol
    4783 +-fdump-tree-sink @gol
    4784 +-fdump-tree-sra@r{[}-@var{n}@r{]} @gol
    4785 +-fdump-tree-fre@r{[}-@var{n}@r{]} @gol
    4786 +-fdump-tree-vrp@r{[}-@var{n}@r{]} @gol
    4787 +-ftree-vectorizer-verbose=@var{n} @gol
    4788 +-fdump-tree-storeccp@r{[}-@var{n}@r{]} @gol
    4789 +-feliminate-dwarf2-dups -feliminate-unused-debug-types @gol
    4790 +-feliminate-unused-debug-symbols -femit-class-debug-always @gol
    4791 +-fmem-report -fpre-ipa-mem-report -fpost-ipa-mem-report -fprofile-arcs @gol
    4792 +-frandom-seed=@var{string} -fsched-verbose=@var{n} @gol
    4793 +-fsel-sched-verbose -fsel-sched-dump-cfg -fsel-sched-pipelining-verbose @gol
    4794 +-ftest-coverage  -ftime-report -fvar-tracking @gol
    4795 +-g  -g@var{level}  -gcoff -gdwarf-2 @gol
    4796 +-ggdb  -gstabs  -gstabs+  -gvms  -gxcoff  -gxcoff+ @gol
    4797 +-fno-merge-debug-strings -fno-dwarf2-cfi-asm @gol
    4798 +-fdebug-prefix-map=@var{old}=@var{new} @gol
    4799 +-femit-struct-debug-baseonly -femit-struct-debug-reduced @gol
    4800 +-femit-struct-debug-detailed@r{[}=@var{spec-list}@r{]} @gol
    4801 +-p  -pg  -print-file-name=@var{library}  -print-libgcc-file-name @gol
    4802 +-print-multi-directory  -print-multi-lib @gol
    4803 +-print-prog-name=@var{program}  -print-search-dirs  -Q @gol
    4804 +-print-sysroot -print-sysroot-headers-suffix @gol
    4805 +-save-temps  -time}
    4806 +
    4807 +@item Optimization Options
    4808 +@xref{Optimize Options,,Options that Control Optimization}.
    4809 +@gccoptlist{
    4810 +-falign-functions[=@var{n}] -falign-jumps[=@var{n}] @gol
    4811 +-falign-labels[=@var{n}] -falign-loops[=@var{n}] -fassociative-math @gol
    4812 +-fauto-inc-dec -fbranch-probabilities -fbranch-target-load-optimize @gol
    4813 +-fbranch-target-load-optimize2 -fbtr-bb-exclusive -fcaller-saves @gol
    4814 +-fcheck-data-deps -fconserve-stack -fcprop-registers -fcrossjumping @gol
    4815 +-fcse-follow-jumps -fcse-skip-blocks -fcx-fortran-rules -fcx-limited-range @gol
    4816 +-fdata-sections -fdce -fdce @gol
    4817 +-fdelayed-branch -fdelete-null-pointer-checks -fdse -fdse @gol
    4818 +-fearly-inlining -fexpensive-optimizations -ffast-math @gol
    4819 +-ffinite-math-only -ffloat-store -fforward-propagate @gol
    4820 +-ffunction-sections -fgcse -fgcse-after-reload -fgcse-las -fgcse-lm @gol
    4821 +-fgcse-sm -fif-conversion -fif-conversion2 -findirect-inlining @gol
    4822 +-finline-functions -finline-functions-called-once -finline-limit=@var{n} @gol
    4823 +-finline-small-functions -fipa-cp -fipa-cp-clone -fipa-matrix-reorg -fipa-pta @gol
    4824 +-fipa-pure-const -fipa-reference -fipa-struct-reorg @gol
    4825 +-fipa-type-escape -fira-algorithm=@var{algorithm} @gol
    4826 +-fira-region=@var{region} -fira-coalesce -fno-ira-share-save-slots @gol
    4827 +-fno-ira-share-spill-slots -fira-verbose=@var{n} @gol
    4828 +-fivopts -fkeep-inline-functions -fkeep-static-consts @gol
    4829 +-floop-block -floop-interchange -floop-strip-mine @gol
    4830 +-fmerge-all-constants -fmerge-constants -fmodulo-sched @gol
    4831 +-fmodulo-sched-allow-regmoves -fmove-loop-invariants -fmudflap @gol
    4832 +-fmudflapir -fmudflapth -fno-branch-count-reg -fno-default-inline @gol
    4833 +-fno-defer-pop -fno-function-cse -fno-guess-branch-probability @gol
    4834 +-fno-inline -fno-math-errno -fno-peephole -fno-peephole2 @gol
    4835 +-fno-sched-interblock -fno-sched-spec -fno-signed-zeros @gol
    4836 +-fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss @gol
    4837 +-fomit-frame-pointer -foptimize-register-move -foptimize-sibling-calls @gol
    4838 +-fpeel-loops -fpredictive-commoning -fprefetch-loop-arrays @gol
    4839 +-fprofile-correction -fprofile-dir=@var{path} -fprofile-generate @gol
    4840 +-fprofile-generate=@var{path} @gol
    4841 +-fprofile-use -fprofile-use=@var{path} -fprofile-values @gol
    4842 +-freciprocal-math -fregmove -frename-registers -freorder-blocks @gol
    4843 +-freorder-blocks-and-partition -freorder-functions @gol
    4844 +-frerun-cse-after-loop -freschedule-modulo-scheduled-loops @gol
    4845 +-frounding-math -frtl-abstract-sequences -fsched2-use-superblocks @gol
    4846 +-fsched2-use-traces -fsched-spec-load -fsched-spec-load-dangerous @gol
    4847 +-fsched-stalled-insns-dep[=@var{n}] -fsched-stalled-insns[=@var{n}] @gol
    4848 +-fschedule-insns -fschedule-insns2 -fsection-anchors -fsee @gol
    4849 +-fselective-scheduling -fselective-scheduling2 @gol
    4850 +-fsel-sched-pipelining -fsel-sched-pipelining-outer-loops @gol
    4851 +-fsignaling-nans -fsingle-precision-constant -fsplit-ivs-in-unroller @gol
    4852 +-fsplit-wide-types -fstack-protector -fstack-protector-all @gol
    4853 +-fstrict-aliasing -fstrict-overflow -fthread-jumps -ftracer @gol
    4854 +-ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-copy-prop @gol
    4855 +-ftree-copyrename -ftree-dce @gol
    4856 +-ftree-dominator-opts -ftree-dse -ftree-fre -ftree-loop-im @gol
    4857 +-ftree-loop-distribution @gol
    4858 +-ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol
    4859 +-ftree-parallelize-loops=@var{n} -ftree-pre -ftree-reassoc @gol
    4860 +-ftree-sink -ftree-sra -ftree-switch-conversion @gol
    4861 +-ftree-ter -ftree-vect-loop-version -ftree-vectorize -ftree-vrp @gol
    4862 +-funit-at-a-time -funroll-all-loops -funroll-loops @gol
    4863 +-funsafe-loop-optimizations -funsafe-math-optimizations -funswitch-loops @gol
    4864 +-fvariable-expansion-in-unroller -fvect-cost-model -fvpt -fweb @gol
    4865 +-fwhole-program @gol
    4866 +--param @var{name}=@var{value}
    4867 +-O  -O0  -O1  -O2  -O3  -Os}
    4868 +
    4869 +@item Preprocessor Options
    4870 +@xref{Preprocessor Options,,Options Controlling the Preprocessor}.
    4871 +@gccoptlist{-A@var{question}=@var{answer} @gol
    4872 +-A-@var{question}@r{[}=@var{answer}@r{]} @gol
    4873 +-C  -dD  -dI  -dM  -dN @gol
    4874 +-D@var{macro}@r{[}=@var{defn}@r{]}  -E  -H @gol
    4875 +-idirafter @var{dir} @gol
    4876 +-include @var{file}  -imacros @var{file} @gol
    4877 +-iprefix @var{file}  -iwithprefix @var{dir} @gol
    4878 +-iwithprefixbefore @var{dir}  -isystem @var{dir} @gol
    4879 +-imultilib @var{dir} -isysroot @var{dir} @gol
    4880 +-M  -MM  -MF  -MG  -MP  -MQ  -MT  -nostdinc  @gol
    4881 +-P  -fworking-directory  -remap @gol
    4882 +-trigraphs  -undef  -U@var{macro}  -Wp,@var{option} @gol
    4883 +-Xpreprocessor @var{option}}
    4884 +
    4885 +@item Assembler Option
    4886 +@xref{Assembler Options,,Passing Options to the Assembler}.
    4887 +@gccoptlist{-Wa,@var{option}  -Xassembler @var{option}}
    4888 +
    4889 +@item Linker Options
    4890 +@xref{Link Options,,Options for Linking}.
    4891 +@gccoptlist{@var{object-file-name}  -l@var{library} @gol
    4892 +-nostartfiles  -nodefaultlibs  -nostdlib -pie -rdynamic @gol
    4893 +-s  -static  -static-libgcc  -shared  -shared-libgcc  -symbolic @gol
    4894 +-T @var{script}  -Wl,@var{option}  -Xlinker @var{option} @gol
    4895 +-u @var{symbol}}
    4896 +
    4897 +@item Directory Options
    4898 +@xref{Directory Options,,Options for Directory Search}.
    4899 +@gccoptlist{-B@var{prefix}  -I@var{dir}  -iquote@var{dir}  -L@var{dir}
    4900 +-specs=@var{file}  -I- --sysroot=@var{dir}}
    4901 +
    4902 +@item Target Options
    4903 +@c I wrote this xref this way to avoid overfull hbox. -- rms
    4904 +@xref{Target Options}.
    4905 +@gccoptlist{-V @var{version}  -b @var{machine}}
    4906 +
    4907 +@item Machine Dependent Options
    4908 +@xref{Submodel Options,,Hardware Models and Configurations}.
    4909 +@c This list is ordered alphanumerically by subsection name.
    4910 +@c Try and put the significant identifier (CPU or system) first,
    4911 +@c so users have a clue at guessing where the ones they want will be.
    4912 +
    4913 +@emph{ARC Options}
    4914 +@gccoptlist{-EB  -EL @gol
    4915 +-mmangle-cpu  -mcpu=@var{cpu}  -mtext=@var{text-section} @gol
    4916 +-mdata=@var{data-section}  -mrodata=@var{readonly-data-section}}
    4917 +
    4918 +@emph{ARM Options}
    4919 +@gccoptlist{-mapcs-frame  -mno-apcs-frame @gol
    4920 +-mabi=@var{name} @gol
    4921 +-mapcs-stack-check  -mno-apcs-stack-check @gol
    4922 +-mapcs-float  -mno-apcs-float @gol
    4923 +-mapcs-reentrant  -mno-apcs-reentrant @gol
    4924 +-msched-prolog  -mno-sched-prolog @gol
    4925 +-mlittle-endian  -mbig-endian  -mwords-little-endian @gol
    4926 +-mfloat-abi=@var{name}  -msoft-float  -mhard-float  -mfpe @gol
    4927 +-mthumb-interwork  -mno-thumb-interwork @gol
    4928 +-mcpu=@var{name}  -march=@var{name}  -mfpu=@var{name}  @gol
    4929 +-mstructure-size-boundary=@var{n} @gol
    4930 +-mabort-on-noreturn @gol
    4931 +-mlong-calls  -mno-long-calls @gol
    4932 +-msingle-pic-base  -mno-single-pic-base @gol
    4933 +-mpic-register=@var{reg} @gol
    4934 +-mnop-fun-dllimport @gol
    4935 +-mcirrus-fix-invalid-insns -mno-cirrus-fix-invalid-insns @gol
    4936 +-mpoke-function-name @gol
    4937 +-mthumb  -marm @gol
    4938 +-mtpcs-frame  -mtpcs-leaf-frame @gol
    4939 +-mcaller-super-interworking  -mcallee-super-interworking @gol
    4940 +-mtp=@var{name} @gol
    4941 +-mword-relocations @gol
    4942 +-mfix-cortex-m3-ldrd}
    4943 +
    4944 +@emph{AVR Options}
    4945 +@gccoptlist{-mmcu=@var{mcu}  -msize  -mno-interrupts @gol
    4946 +-mcall-prologues  -mno-tablejump  -mtiny-stack  -mint8}
    4947 +
    4948 +@emph{Blackfin Options}
    4949 +@gccoptlist{-mcpu=@var{cpu}@r{[}-@var{sirevision}@r{]} @gol
    4950 +-msim -momit-leaf-frame-pointer  -mno-omit-leaf-frame-pointer @gol
    4951 +-mspecld-anomaly  -mno-specld-anomaly  -mcsync-anomaly  -mno-csync-anomaly @gol
    4952 +-mlow-64k -mno-low64k  -mstack-check-l1  -mid-shared-library @gol
    4953 +-mno-id-shared-library  -mshared-library-id=@var{n} @gol
    4954 +-mleaf-id-shared-library  -mno-leaf-id-shared-library @gol
    4955 +-msep-data  -mno-sep-data  -mlong-calls  -mno-long-calls @gol
    4956 +-mfast-fp -minline-plt -mmulticore  -mcorea  -mcoreb  -msdram @gol
    4957 +-micplb}
    4958 +
    4959 +@emph{CRIS Options}
    4960 +@gccoptlist{-mcpu=@var{cpu}  -march=@var{cpu}  -mtune=@var{cpu} @gol
    4961 +-mmax-stack-frame=@var{n}  -melinux-stacksize=@var{n} @gol
    4962 +-metrax4  -metrax100  -mpdebug  -mcc-init  -mno-side-effects @gol
    4963 +-mstack-align  -mdata-align  -mconst-align @gol
    4964 +-m32-bit  -m16-bit  -m8-bit  -mno-prologue-epilogue  -mno-gotplt @gol
    4965 +-melf  -maout  -melinux  -mlinux  -sim  -sim2 @gol
    4966 +-mmul-bug-workaround  -mno-mul-bug-workaround}
    4967 +
    4968 +@emph{CRX Options}
    4969 +@gccoptlist{-mmac -mpush-args}
    4970 +
    4971 +@emph{Darwin Options}
    4972 +@gccoptlist{-all_load  -allowable_client  -arch  -arch_errors_fatal @gol
    4973 +-arch_only  -bind_at_load  -bundle  -bundle_loader @gol
    4974 +-client_name  -compatibility_version  -current_version @gol
    4975 +-dead_strip @gol
    4976 +-dependency-file  -dylib_file  -dylinker_install_name @gol
    4977 +-dynamic  -dynamiclib  -exported_symbols_list @gol
    4978 +-filelist  -flat_namespace  -force_cpusubtype_ALL @gol
    4979 +-force_flat_namespace  -headerpad_max_install_names @gol
    4980 +-iframework @gol
    4981 +-image_base  -init  -install_name  -keep_private_externs @gol
    4982 +-multi_module  -multiply_defined  -multiply_defined_unused @gol
    4983 +-noall_load   -no_dead_strip_inits_and_terms @gol
    4984 +-nofixprebinding -nomultidefs  -noprebind  -noseglinkedit @gol
    4985 +-pagezero_size  -prebind  -prebind_all_twolevel_modules @gol
    4986 +-private_bundle  -read_only_relocs  -sectalign @gol
    4987 +-sectobjectsymbols  -whyload  -seg1addr @gol
    4988 +-sectcreate  -sectobjectsymbols  -sectorder @gol
    4989 +-segaddr -segs_read_only_addr -segs_read_write_addr @gol
    4990 +-seg_addr_table  -seg_addr_table_filename  -seglinkedit @gol
    4991 +-segprot  -segs_read_only_addr  -segs_read_write_addr @gol
    4992 +-single_module  -static  -sub_library  -sub_umbrella @gol
    4993 +-twolevel_namespace  -umbrella  -undefined @gol
    4994 +-unexported_symbols_list  -weak_reference_mismatches @gol
    4995 +-whatsloaded -F -gused -gfull -mmacosx-version-min=@var{version} @gol
    4996 +-mkernel -mone-byte-bool}
    4997 +
    4998 +@emph{DEC Alpha Options}
    4999 +@gccoptlist{-mno-fp-regs  -msoft-float  -malpha-as  -mgas @gol
    5000 +-mieee  -mieee-with-inexact  -mieee-conformant @gol
    5001 +-mfp-trap-mode=@var{mode}  -mfp-rounding-mode=@var{mode} @gol
    5002 +-mtrap-precision=@var{mode}  -mbuild-constants @gol
    5003 +-mcpu=@var{cpu-type}  -mtune=@var{cpu-type} @gol
    5004 +-mbwx  -mmax  -mfix  -mcix @gol
    5005 +-mfloat-vax  -mfloat-ieee @gol
    5006 +-mexplicit-relocs  -msmall-data  -mlarge-data @gol
    5007 +-msmall-text  -mlarge-text @gol
    5008 +-mmemory-latency=@var{time}}
    5009 +
    5010 +@emph{DEC Alpha/VMS Options}
    5011 +@gccoptlist{-mvms-return-codes}
    5012 +
    5013 +@emph{FR30 Options}
    5014 +@gccoptlist{-msmall-model -mno-lsim}
    5015 +
    5016 +@emph{FRV Options}
    5017 +@gccoptlist{-mgpr-32  -mgpr-64  -mfpr-32  -mfpr-64 @gol
    5018 +-mhard-float  -msoft-float @gol
    5019 +-malloc-cc  -mfixed-cc  -mdword  -mno-dword @gol
    5020 +-mdouble  -mno-double @gol
    5021 +-mmedia  -mno-media  -mmuladd  -mno-muladd @gol
    5022 +-mfdpic  -minline-plt -mgprel-ro  -multilib-library-pic @gol
    5023 +-mlinked-fp  -mlong-calls  -malign-labels @gol
    5024 +-mlibrary-pic  -macc-4  -macc-8 @gol
    5025 +-mpack  -mno-pack  -mno-eflags  -mcond-move  -mno-cond-move @gol
    5026 +-moptimize-membar -mno-optimize-membar @gol
    5027 +-mscc  -mno-scc  -mcond-exec  -mno-cond-exec @gol
    5028 +-mvliw-branch  -mno-vliw-branch @gol
    5029 +-mmulti-cond-exec  -mno-multi-cond-exec  -mnested-cond-exec @gol
    5030 +-mno-nested-cond-exec  -mtomcat-stats @gol
    5031 +-mTLS -mtls @gol
    5032 +-mcpu=@var{cpu}}
    5033 +
    5034 +@emph{GNU/Linux Options}
    5035 +@gccoptlist{-muclibc}
    5036 +
    5037 +@emph{H8/300 Options}
    5038 +@gccoptlist{-mrelax  -mh  -ms  -mn  -mint32  -malign-300}
    5039 +
    5040 +@emph{HPPA Options}
    5041 +@gccoptlist{-march=@var{architecture-type} @gol
    5042 +-mbig-switch  -mdisable-fpregs  -mdisable-indexing @gol
    5043 +-mfast-indirect-calls  -mgas  -mgnu-ld   -mhp-ld @gol
    5044 +-mfixed-range=@var{register-range} @gol
    5045 +-mjump-in-delay -mlinker-opt -mlong-calls @gol
    5046 +-mlong-load-store  -mno-big-switch  -mno-disable-fpregs @gol
    5047 +-mno-disable-indexing  -mno-fast-indirect-calls  -mno-gas @gol
    5048 +-mno-jump-in-delay  -mno-long-load-store @gol
    5049 +-mno-portable-runtime  -mno-soft-float @gol
    5050 +-mno-space-regs  -msoft-float  -mpa-risc-1-0 @gol
    5051 +-mpa-risc-1-1  -mpa-risc-2-0  -mportable-runtime @gol
    5052 +-mschedule=@var{cpu-type}  -mspace-regs  -msio  -mwsio @gol
    5053 +-munix=@var{unix-std}  -nolibdld  -static  -threads}
    5054 +
    5055 +@emph{i386 and x86-64 Options}
    5056 +@gccoptlist{-mtune=@var{cpu-type}  -march=@var{cpu-type} @gol
    5057 +-mfpmath=@var{unit} @gol
    5058 +-masm=@var{dialect}  -mno-fancy-math-387 @gol
    5059 +-mno-fp-ret-in-387  -msoft-float @gol
    5060 +-mno-wide-multiply  -mrtd  -malign-double @gol
    5061 +-mpreferred-stack-boundary=@var{num}
    5062 +-mincoming-stack-boundary=@var{num}
    5063 +-mcld -mcx16 -msahf -mrecip @gol
    5064 +-mmmx  -msse  -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4 -mavx @gol
    5065 +-maes -mpclmul @gol
    5066 +-msse4a -m3dnow -mpopcnt -mabm -msse5 @gol
    5067 +-mthreads  -mno-align-stringops  -minline-all-stringops @gol
    5068 +-minline-stringops-dynamically -mstringop-strategy=@var{alg} @gol
    5069 +-mpush-args  -maccumulate-outgoing-args  -m128bit-long-double @gol
    5070 +-m96bit-long-double  -mregparm=@var{num}  -msseregparm @gol
    5071 +-mveclibabi=@var{type} -mpc32 -mpc64 -mpc80 -mstackrealign @gol
    5072 +-momit-leaf-frame-pointer  -mno-red-zone -mno-tls-direct-seg-refs @gol
    5073 +-mcmodel=@var{code-model} @gol
    5074 +-m32  -m64 -mlarge-data-threshold=@var{num} @gol
    5075 +-mfused-madd -mno-fused-madd -msse2avx}
    5076 +
    5077 +@emph{IA-64 Options}
    5078 +@gccoptlist{-mbig-endian  -mlittle-endian  -mgnu-as  -mgnu-ld  -mno-pic @gol
    5079 +-mvolatile-asm-stop  -mregister-names  -mno-sdata @gol
    5080 +-mconstant-gp  -mauto-pic  -minline-float-divide-min-latency @gol
    5081 +-minline-float-divide-max-throughput @gol
    5082 +-minline-int-divide-min-latency @gol
    5083 +-minline-int-divide-max-throughput  @gol
    5084 +-minline-sqrt-min-latency -minline-sqrt-max-throughput @gol
    5085 +-mno-dwarf2-asm -mearly-stop-bits @gol
    5086 +-mfixed-range=@var{register-range} -mtls-size=@var{tls-size} @gol
    5087 +-mtune=@var{cpu-type} -mt -pthread -milp32 -mlp64 @gol
    5088 +-mno-sched-br-data-spec -msched-ar-data-spec -mno-sched-control-spec @gol
    5089 +-msched-br-in-data-spec -msched-ar-in-data-spec -msched-in-control-spec @gol
    5090 +-msched-ldc -mno-sched-control-ldc -mno-sched-spec-verbose @gol
    5091 +-mno-sched-prefer-non-data-spec-insns @gol
    5092 +-mno-sched-prefer-non-control-spec-insns @gol
    5093 +-mno-sched-count-spec-in-critical-path}
    5094 +
    5095 +@emph{M32R/D Options}
    5096 +@gccoptlist{-m32r2 -m32rx -m32r @gol
    5097 +-mdebug @gol
    5098 +-malign-loops -mno-align-loops @gol
    5099 +-missue-rate=@var{number} @gol
    5100 +-mbranch-cost=@var{number} @gol
    5101 +-mmodel=@var{code-size-model-type} @gol
    5102 +-msdata=@var{sdata-type} @gol
    5103 +-mno-flush-func -mflush-func=@var{name} @gol
    5104 +-mno-flush-trap -mflush-trap=@var{number} @gol
    5105 +-G @var{num}}
    5106 +
    5107 +@emph{M32C Options}
    5108 +@gccoptlist{-mcpu=@var{cpu} -msim -memregs=@var{number}}
    5109 +
    5110 +@emph{M680x0 Options}
    5111 +@gccoptlist{-march=@var{arch}  -mcpu=@var{cpu}  -mtune=@var{tune}
    5112 +-m68000  -m68020  -m68020-40  -m68020-60  -m68030  -m68040 @gol
    5113 +-m68060  -mcpu32  -m5200  -m5206e  -m528x  -m5307  -m5407 @gol
    5114 +-mcfv4e  -mbitfield  -mno-bitfield  -mc68000  -mc68020 @gol
    5115 +-mnobitfield  -mrtd  -mno-rtd  -mdiv  -mno-div  -mshort @gol
    5116 +-mno-short  -mhard-float  -m68881  -msoft-float  -mpcrel @gol
    5117 +-malign-int  -mstrict-align  -msep-data  -mno-sep-data @gol
    5118 +-mshared-library-id=n  -mid-shared-library  -mno-id-shared-library @gol
    5119 +-mxgot -mno-xgot}
    5120 +
    5121 +@emph{M68hc1x Options}
    5122 +@gccoptlist{-m6811  -m6812  -m68hc11  -m68hc12   -m68hcs12 @gol
    5123 +-mauto-incdec  -minmax  -mlong-calls  -mshort @gol
    5124 +-msoft-reg-count=@var{count}}
    5125 +
    5126 +@emph{MCore Options}
    5127 +@gccoptlist{-mhardlit  -mno-hardlit  -mdiv  -mno-div  -mrelax-immediates @gol
    5128 +-mno-relax-immediates  -mwide-bitfields  -mno-wide-bitfields @gol
    5129 +-m4byte-functions  -mno-4byte-functions  -mcallgraph-data @gol
    5130 +-mno-callgraph-data  -mslow-bytes  -mno-slow-bytes  -mno-lsim @gol
    5131 +-mlittle-endian  -mbig-endian  -m210  -m340  -mstack-increment}
    5132 +
    5133 +@emph{MIPS Options}
    5134 +@gccoptlist{-EL  -EB  -march=@var{arch}  -mtune=@var{arch} @gol
    5135 +-mips1  -mips2  -mips3  -mips4  -mips32  -mips32r2 @gol
    5136 +-mips64  -mips64r2 @gol
    5137 +-mips16  -mno-mips16  -mflip-mips16 @gol
    5138 +-minterlink-mips16  -mno-interlink-mips16 @gol
    5139 +-mabi=@var{abi}  -mabicalls  -mno-abicalls @gol
    5140 +-mshared  -mno-shared  -mplt  -mno-plt  -mxgot  -mno-xgot @gol
    5141 +-mgp32  -mgp64  -mfp32  -mfp64  -mhard-float  -msoft-float @gol
    5142 +-msingle-float  -mdouble-float  -mdsp  -mno-dsp  -mdspr2  -mno-dspr2 @gol
    5143 +-mfpu=@var{fpu-type} @gol
    5144 +-msmartmips  -mno-smartmips @gol
    5145 +-mpaired-single  -mno-paired-single  -mdmx  -mno-mdmx @gol
    5146 +-mips3d  -mno-mips3d  -mmt  -mno-mt  -mllsc  -mno-llsc @gol
    5147 +-mlong64  -mlong32  -msym32  -mno-sym32 @gol
    5148 +-G@var{num}  -mlocal-sdata  -mno-local-sdata @gol
    5149 +-mextern-sdata  -mno-extern-sdata  -mgpopt  -mno-gopt @gol
    5150 +-membedded-data  -mno-embedded-data @gol
    5151 +-muninit-const-in-rodata  -mno-uninit-const-in-rodata @gol
    5152 +-mcode-readable=@var{setting} @gol
    5153 +-msplit-addresses  -mno-split-addresses @gol
    5154 +-mexplicit-relocs  -mno-explicit-relocs @gol
    5155 +-mcheck-zero-division  -mno-check-zero-division @gol
    5156 +-mdivide-traps  -mdivide-breaks @gol
    5157 +-mmemcpy  -mno-memcpy  -mlong-calls  -mno-long-calls @gol
    5158 +-mmad  -mno-mad  -mfused-madd  -mno-fused-madd  -nocpp @gol
    5159 +-mfix-r4000  -mno-fix-r4000  -mfix-r4400  -mno-fix-r4400 @gol
    5160 +-mfix-r10000 -mno-fix-r10000  -mfix-vr4120  -mno-fix-vr4120 @gol
    5161 +-mfix-vr4130  -mno-fix-vr4130  -mfix-sb1  -mno-fix-sb1 @gol
    5162 +-mflush-func=@var{func}  -mno-flush-func @gol
    5163 +-mbranch-cost=@var{num}  -mbranch-likely  -mno-branch-likely @gol
    5164 +-mfp-exceptions -mno-fp-exceptions @gol
    5165 +-mvr4130-align -mno-vr4130-align}
    5166 +
    5167 +@emph{MMIX Options}
    5168 +@gccoptlist{-mlibfuncs  -mno-libfuncs  -mepsilon  -mno-epsilon  -mabi=gnu @gol
    5169 +-mabi=mmixware  -mzero-extend  -mknuthdiv  -mtoplevel-symbols @gol
    5170 +-melf  -mbranch-predict  -mno-branch-predict  -mbase-addresses @gol
    5171 +-mno-base-addresses  -msingle-exit  -mno-single-exit}
    5172 +
    5173 +@emph{MN10300 Options}
    5174 +@gccoptlist{-mmult-bug  -mno-mult-bug @gol
    5175 +-mam33  -mno-am33 @gol
    5176 +-mam33-2  -mno-am33-2 @gol
    5177 +-mreturn-pointer-on-d0 @gol
    5178 +-mno-crt0  -mrelax}
    5179 +
    5180 +@emph{PDP-11 Options}
    5181 +@gccoptlist{-mfpu  -msoft-float  -mac0  -mno-ac0  -m40  -m45  -m10 @gol
    5182 +-mbcopy  -mbcopy-builtin  -mint32  -mno-int16 @gol
    5183 +-mint16  -mno-int32  -mfloat32  -mno-float64 @gol
    5184 +-mfloat64  -mno-float32  -mabshi  -mno-abshi @gol
    5185 +-mbranch-expensive  -mbranch-cheap @gol
    5186 +-msplit  -mno-split  -munix-asm  -mdec-asm}
    5187 +
    5188 +@emph{picoChip Options}
    5189 +@gccoptlist{-mae=@var{ae_type} -mvliw-lookahead=@var{N}
    5190 +-msymbol-as-address -mno-inefficient-warnings}
    5191 +
    5192 +@emph{PowerPC Options}
    5193 +See RS/6000 and PowerPC Options.
    5194 +
    5195 +@emph{RS/6000 and PowerPC Options}
    5196 +@gccoptlist{-mcpu=@var{cpu-type} @gol
    5197 +-mtune=@var{cpu-type} @gol
    5198 +-mpower  -mno-power  -mpower2  -mno-power2 @gol
    5199 +-mpowerpc  -mpowerpc64  -mno-powerpc @gol
    5200 +-maltivec  -mno-altivec @gol
    5201 +-mpowerpc-gpopt  -mno-powerpc-gpopt @gol
    5202 +-mpowerpc-gfxopt  -mno-powerpc-gfxopt @gol
    5203 +-mmfcrf  -mno-mfcrf  -mpopcntb  -mno-popcntb  -mfprnd  -mno-fprnd @gol
    5204 +-mcmpb -mno-cmpb -mmfpgpr -mno-mfpgpr -mhard-dfp -mno-hard-dfp @gol
    5205 +-mnew-mnemonics  -mold-mnemonics @gol
    5206 +-mfull-toc   -mminimal-toc  -mno-fp-in-toc  -mno-sum-in-toc @gol
    5207 +-m64  -m32  -mxl-compat  -mno-xl-compat  -mpe @gol
    5208 +-malign-power  -malign-natural @gol
    5209 +-msoft-float  -mhard-float  -mmultiple  -mno-multiple @gol
    5210 +-msingle-float -mdouble-float -msimple-fpu @gol
    5211 +-mstring  -mno-string  -mupdate  -mno-update @gol
    5212 +-mavoid-indexed-addresses  -mno-avoid-indexed-addresses @gol
    5213 +-mfused-madd  -mno-fused-madd  -mbit-align  -mno-bit-align @gol
    5214 +-mstrict-align  -mno-strict-align  -mrelocatable @gol
    5215 +-mno-relocatable  -mrelocatable-lib  -mno-relocatable-lib @gol
    5216 +-mtoc  -mno-toc  -mlittle  -mlittle-endian  -mbig  -mbig-endian @gol
    5217 +-mdynamic-no-pic  -maltivec  -mswdiv @gol
    5218 +-mprioritize-restricted-insns=@var{priority} @gol
    5219 +-msched-costly-dep=@var{dependence_type} @gol
    5220 +-minsert-sched-nops=@var{scheme} @gol
    5221 +-mcall-sysv  -mcall-netbsd @gol
    5222 +-maix-struct-return  -msvr4-struct-return @gol
    5223 +-mabi=@var{abi-type} -msecure-plt -mbss-plt @gol
    5224 +-misel -mno-isel @gol
    5225 +-misel=yes  -misel=no @gol
    5226 +-mspe -mno-spe @gol
    5227 +-mspe=yes  -mspe=no @gol
    5228 +-mpaired @gol
    5229 +-mgen-cell-microcode -mwarn-cell-microcode @gol
    5230 +-mvrsave -mno-vrsave @gol
    5231 +-mmulhw -mno-mulhw @gol
    5232 +-mdlmzb -mno-dlmzb @gol
    5233 +-mfloat-gprs=yes  -mfloat-gprs=no -mfloat-gprs=single -mfloat-gprs=double @gol
    5234 +-mprototype  -mno-prototype @gol
    5235 +-msim  -mmvme  -mads  -myellowknife  -memb  -msdata @gol
    5236 +-msdata=@var{opt}  -mvxworks  -G @var{num}  -pthread}
    5237 +
    5238 +@emph{S/390 and zSeries Options}
    5239 +@gccoptlist{-mtune=@var{cpu-type}  -march=@var{cpu-type} @gol
    5240 +-mhard-float  -msoft-float  -mhard-dfp -mno-hard-dfp @gol
    5241 +-mlong-double-64 -mlong-double-128 @gol
    5242 +-mbackchain  -mno-backchain -mpacked-stack  -mno-packed-stack @gol
    5243 +-msmall-exec  -mno-small-exec  -mmvcle -mno-mvcle @gol
    5244 +-m64  -m31  -mdebug  -mno-debug  -mesa  -mzarch @gol
    5245 +-mtpf-trace -mno-tpf-trace  -mfused-madd  -mno-fused-madd @gol
    5246 +-mwarn-framesize  -mwarn-dynamicstack  -mstack-size -mstack-guard}
    5247 +
    5248 +@emph{Score Options}
    5249 +@gccoptlist{-meb -mel @gol
    5250 +-mnhwloop @gol
    5251 +-muls @gol
    5252 +-mmac @gol
    5253 +-mscore5 -mscore5u -mscore7 -mscore7d}
    5254 +
    5255 +@emph{SH Options}
    5256 +@gccoptlist{-m1  -m2  -m2e  -m3  -m3e @gol
    5257 +-m4-nofpu  -m4-single-only  -m4-single  -m4 @gol
    5258 +-m4a-nofpu -m4a-single-only -m4a-single -m4a -m4al @gol
    5259 +-m5-64media  -m5-64media-nofpu @gol
    5260 +-m5-32media  -m5-32media-nofpu @gol
    5261 +-m5-compact  -m5-compact-nofpu @gol
    5262 +-mb  -ml  -mdalign  -mrelax @gol
    5263 +-mbigtable  -mfmovd  -mhitachi -mrenesas -mno-renesas -mnomacsave @gol
    5264 +-mieee  -mbitops  -misize  -minline-ic_invalidate -mpadstruct  -mspace @gol
    5265 +-mprefergot  -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
    5266 +-mdivsi3_libfunc=@var{name} -mfixed-range=@var{register-range} @gol
    5267 +-madjust-unroll -mindexed-addressing -mgettrcost=@var{number} -mpt-fixed @gol
    5268 +-minvalid-symbols}
    5269 +
    5270 +@emph{SPARC Options}
    5271 +@gccoptlist{-mcpu=@var{cpu-type} @gol
    5272 +-mtune=@var{cpu-type} @gol
    5273 +-mcmodel=@var{code-model} @gol
    5274 +-m32  -m64  -mapp-regs  -mno-app-regs @gol
    5275 +-mfaster-structs  -mno-faster-structs @gol
    5276 +-mfpu  -mno-fpu  -mhard-float  -msoft-float @gol
    5277 +-mhard-quad-float  -msoft-quad-float @gol
    5278 +-mimpure-text  -mno-impure-text  -mlittle-endian @gol
    5279 +-mstack-bias  -mno-stack-bias @gol
    5280 +-munaligned-doubles  -mno-unaligned-doubles @gol
    5281 +-mv8plus  -mno-v8plus  -mvis  -mno-vis
    5282 +-threads -pthreads -pthread}
    5283 +
    5284 +@emph{SPU Options}
    5285 +@gccoptlist{-mwarn-reloc -merror-reloc @gol
    5286 +-msafe-dma -munsafe-dma @gol
    5287 +-mbranch-hints @gol
    5288 +-msmall-mem -mlarge-mem -mstdmain @gol
    5289 +-mfixed-range=@var{register-range}}
    5290 +
    5291 +@emph{System V Options}
    5292 +@gccoptlist{-Qy  -Qn  -YP,@var{paths}  -Ym,@var{dir}}
    5293 +
    5294 +@emph{V850 Options}
    5295 +@gccoptlist{-mlong-calls  -mno-long-calls  -mep  -mno-ep @gol
    5296 +-mprolog-function  -mno-prolog-function  -mspace @gol
    5297 +-mtda=@var{n}  -msda=@var{n}  -mzda=@var{n} @gol
    5298 +-mapp-regs  -mno-app-regs @gol
    5299 +-mdisable-callt  -mno-disable-callt @gol
    5300 +-mv850e1 @gol
    5301 +-mv850e @gol
    5302 +-mv850  -mbig-switch}
    5303 +
    5304 +@emph{VAX Options}
    5305 +@gccoptlist{-mg  -mgnu  -munix}
    5306 +
    5307 +@emph{VxWorks Options}
    5308 +@gccoptlist{-mrtp  -non-static  -Bstatic  -Bdynamic @gol
    5309 +-Xbind-lazy  -Xbind-now}
    5310 +
    5311 +@emph{x86-64 Options}
    5312 +See i386 and x86-64 Options.
    5313 +
    5314 +@emph{i386 and x86-64 Windows Options}
    5315 +@gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll
    5316 +-mnop-fun-dllimport -mthread -mwin32 -mwindows}
    5317 +
    5318 +@emph{Xstormy16 Options}
    5319 +@gccoptlist{-msim}
    5320 +
    5321 +@emph{Xtensa Options}
    5322 +@gccoptlist{-mconst16 -mno-const16 @gol
    5323 +-mfused-madd  -mno-fused-madd @gol
    5324 +-mserialize-volatile  -mno-serialize-volatile @gol
    5325 +-mtext-section-literals  -mno-text-section-literals @gol
    5326 +-mtarget-align  -mno-target-align @gol
    5327 +-mlongcalls  -mno-longcalls}
    5328 +
    5329 +@emph{zSeries Options}
    5330 +See S/390 and zSeries Options.
    5331 +
    5332 +@item Code Generation Options
    5333 +@xref{Code Gen Options,,Options for Code Generation Conventions}.
    5334 +@gccoptlist{-fcall-saved-@var{reg}  -fcall-used-@var{reg} @gol
    5335 +-ffixed-@var{reg}  -fexceptions @gol
    5336 +-fnon-call-exceptions  -funwind-tables @gol
    5337 +-fasynchronous-unwind-tables @gol
    5338 +-finhibit-size-directive  -finstrument-functions @gol
    5339 +-finstrument-functions-exclude-function-list=@var{sym},@var{sym},@dots{} @gol
    5340 +-finstrument-functions-exclude-file-list=@var{file},@var{file},@dots{} @gol
    5341 +-fno-common  -fno-ident @gol
    5342 +-fpcc-struct-return  -fpic  -fPIC -fpie -fPIE @gol
    5343 +-fno-jump-tables @gol
    5344 +-frecord-gcc-switches @gol
    5345 +-freg-struct-return  -fshort-enums @gol
    5346 +-fshort-double  -fshort-wchar @gol
    5347 +-fverbose-asm  -fpack-struct[=@var{n}]  -fstack-check @gol
    5348 +-fstack-limit-register=@var{reg}  -fstack-limit-symbol=@var{sym} @gol
    5349 +-fno-stack-limit  -fargument-alias  -fargument-noalias @gol
    5350 +-fargument-noalias-global  -fargument-noalias-anything @gol
    5351 +-fleading-underscore  -ftls-model=@var{model} @gol
    5352 +-ftrapv  -fwrapv  -fbounds-check @gol
    5353 +-fvisibility}
    5354 +@end table
    5355 +
    5356 +@menu
    5357 +* Overall Options::     Controlling the kind of output:
    5358 +                        an executable, object files, assembler files,
    5359 +                        or preprocessed source.
    5360 +* C Dialect Options::   Controlling the variant of C language compiled.
    5361 +* C++ Dialect Options:: Variations on C++.
    5362 +* Objective-C and Objective-C++ Dialect Options:: Variations on Objective-C
    5363 +                        and Objective-C++.
    5364 +* Language Independent Options:: Controlling how diagnostics should be
    5365 +                        formatted.
    5366 +* Warning Options::     How picky should the compiler be?
    5367 +* Debugging Options::   Symbol tables, measurements, and debugging dumps.
    5368 +* Optimize Options::    How much optimization?
    5369 +* Preprocessor Options:: Controlling header files and macro definitions.
    5370 +                         Also, getting dependency information for Make.
    5371 +* Assembler Options::   Passing options to the assembler.
    5372 +* Link Options::        Specifying libraries and so on.
    5373 +* Directory Options::   Where to find header files and libraries.
    5374 +                        Where to find the compiler executable files.
    5375 +* Spec Files::          How to pass switches to sub-processes.
    5376 +* Target Options::      Running a cross-compiler, or an old version of GCC.
    5377 +@end menu
    5378 +
    5379 +@node Overall Options
    5380 +@section Options Controlling the Kind of Output
    5381 +
    5382 +Compilation can involve up to four stages: preprocessing, compilation
    5383 +proper, assembly and linking, always in that order.  GCC is capable of
    5384 +preprocessing and compiling several files either into several
    5385 +assembler input files, or into one assembler input file; then each
    5386 +assembler input file produces an object file, and linking combines all
    5387 +the object files (those newly compiled, and those specified as input)
    5388 +into an executable file.
    5389 +
    5390 +@cindex file name suffix
    5391 +For any given input file, the file name suffix determines what kind of
    5392 +compilation is done:
    5393 +
    5394 +@table @gcctabopt
    5395 +@item @var{file}.c
    5396 +C source code which must be preprocessed.
    5397 +
    5398 +@item @var{file}.i
    5399 +C source code which should not be preprocessed.
    5400 +
    5401 +@item @var{file}.ii
    5402 +C++ source code which should not be preprocessed.
    5403 +
    5404 +@item @var{file}.m
    5405 +Objective-C source code.  Note that you must link with the @file{libobjc}
    5406 +library to make an Objective-C program work.
    5407 +
    5408 +@item @var{file}.mi
    5409 +Objective-C source code which should not be preprocessed.
    5410 +
    5411 +@item @var{file}.mm
    5412 +@itemx @var{file}.M
    5413 +Objective-C++ source code.  Note that you must link with the @file{libobjc}
    5414 +library to make an Objective-C++ program work.  Note that @samp{.M} refers
    5415 +to a literal capital M@.
    5416 +
    5417 +@item @var{file}.mii
    5418 +Objective-C++ source code which should not be preprocessed.
    5419 +
    5420 +@item @var{file}.h
    5421 +C, C++, Objective-C or Objective-C++ header file to be turned into a
    5422 +precompiled header.
    5423 +
    5424 +@item @var{file}.cc
    5425 +@itemx @var{file}.cp
    5426 +@itemx @var{file}.cxx
    5427 +@itemx @var{file}.cpp
    5428 +@itemx @var{file}.CPP
    5429 +@itemx @var{file}.c++
    5430 +@itemx @var{file}.C
    5431 +C++ source code which must be preprocessed.  Note that in @samp{.cxx},
    5432 +the last two letters must both be literally @samp{x}.  Likewise,
    5433 +@samp{.C} refers to a literal capital C@.
    5434 +
    5435 +@item @var{file}.mm
    5436 +@itemx @var{file}.M
    5437 +Objective-C++ source code which must be preprocessed.
    5438 +
    5439 +@item @var{file}.mii
    5440 +Objective-C++ source code which should not be preprocessed.
    5441 +
    5442 +@item @var{file}.hh
    5443 +@itemx @var{file}.H
    5444 +@itemx @var{file}.hp
    5445 +@itemx @var{file}.hxx
    5446 +@itemx @var{file}.hpp
    5447 +@itemx @var{file}.HPP
    5448 +@itemx @var{file}.h++
    5449 +@itemx @var{file}.tcc
    5450 +C++ header file to be turned into a precompiled header.
    5451 +
    5452 +@item @var{file}.f
    5453 +@itemx @var{file}.for
    5454 +@itemx @var{file}.ftn
    5455 +Fixed form Fortran source code which should not be preprocessed.
    5456 +
    5457 +@item @var{file}.F
    5458 +@itemx @var{file}.FOR
    5459 +@itemx @var{file}.fpp
    5460 +@itemx @var{file}.FPP
    5461 +@itemx @var{file}.FTN
    5462 +Fixed form Fortran source code which must be preprocessed (with the traditional
    5463 +preprocessor).
    5464 +
    5465 +@item @var{file}.f90
    5466 +@itemx @var{file}.f95
    5467 +@itemx @var{file}.f03
    5468 +@itemx @var{file}.f08
    5469 +Free form Fortran source code which should not be preprocessed.
    5470 +
    5471 +@item @var{file}.F90
    5472 +@itemx @var{file}.F95
    5473 +@itemx @var{file}.F03
    5474 +@itemx @var{file}.F08
    5475 +Free form Fortran source code which must be preprocessed (with the
    5476 +traditional preprocessor).
    5477 +
    5478 +@c FIXME: Descriptions of Java file types.
    5479 +@c @var{file}.java
    5480 +@c @var{file}.class
    5481 +@c @var{file}.zip
    5482 +@c @var{file}.jar
    5483 +
    5484 +@item @var{file}.ads
    5485 +Ada source code file which contains a library unit declaration (a
    5486 +declaration of a package, subprogram, or generic, or a generic
    5487 +instantiation), or a library unit renaming declaration (a package,
    5488 +generic, or subprogram renaming declaration).  Such files are also
    5489 +called @dfn{specs}.
    5490 +
    5491 +@item @var{file}.adb
    5492 +Ada source code file containing a library unit body (a subprogram or
    5493 +package body).  Such files are also called @dfn{bodies}.
    5494 +
    5495 +@c GCC also knows about some suffixes for languages not yet included:
    5496 +@c Pascal:
    5497 +@c @var{file}.p
    5498 +@c @var{file}.pas
    5499 +@c Ratfor:
    5500 +@c @var{file}.r
    5501 +
    5502 +@item @var{file}.s
    5503 +Assembler code.
    5504 +
    5505 +@item @var{file}.S
    5506 +@itemx @var{file}.sx
    5507 +Assembler code which must be preprocessed.
    5508 +
    5509 +@item @var{other}
    5510 +An object file to be fed straight into linking.
    5511 +Any file name with no recognized suffix is treated this way.
    5512 +@end table
    5513 +
    5514 +@opindex x
    5515 +You can specify the input language explicitly with the @option{-x} option:
    5516 +
    5517 +@table @gcctabopt
    5518 +@item -x @var{language}
    5519 +Specify explicitly the @var{language} for the following input files
    5520 +(rather than letting the compiler choose a default based on the file
    5521 +name suffix).  This option applies to all following input files until
    5522 +the next @option{-x} option.  Possible values for @var{language} are:
    5523 +@smallexample
    5524 +c  c-header  c-cpp-output
    5525 +c++  c++-header  c++-cpp-output
    5526 +objective-c  objective-c-header  objective-c-cpp-output
    5527 +objective-c++ objective-c++-header objective-c++-cpp-output
    5528 +assembler  assembler-with-cpp
    5529 +ada
    5530 +f77  f77-cpp-input f95  f95-cpp-input
    5531 +java
    5532 +@end smallexample
    5533 +
    5534 +@item -x none
    5535 +Turn off any specification of a language, so that subsequent files are
    5536 +handled according to their file name suffixes (as they are if @option{-x}
    5537 +has not been used at all).
    5538 +
    5539 +@item -pass-exit-codes
    5540 +@opindex pass-exit-codes
    5541 +Normally the @command{gcc} program will exit with the code of 1 if any
    5542 +phase of the compiler returns a non-success return code.  If you specify
    5543 +@option{-pass-exit-codes}, the @command{gcc} program will instead return with
    5544 +numerically highest error produced by any phase that returned an error
    5545 +indication.  The C, C++, and Fortran frontends return 4, if an internal
    5546 +compiler error is encountered.
    5547 +@end table
    5548 +
    5549 +If you only want some of the stages of compilation, you can use
    5550 +@option{-x} (or filename suffixes) to tell @command{gcc} where to start, and
    5551 +one of the options @option{-c}, @option{-S}, or @option{-E} to say where
    5552 +@command{gcc} is to stop.  Note that some combinations (for example,
    5553 +@samp{-x cpp-output -E}) instruct @command{gcc} to do nothing at all.
    5554 +
    5555 +@table @gcctabopt
    5556 +@item -c
    5557 +@opindex c
    5558 +Compile or assemble the source files, but do not link.  The linking
    5559 +stage simply is not done.  The ultimate output is in the form of an
    5560 +object file for each source file.
    5561 +
    5562 +By default, the object file name for a source file is made by replacing
    5563 +the suffix @samp{.c}, @samp{.i}, @samp{.s}, etc., with @samp{.o}.
    5564 +
    5565 +Unrecognized input files, not requiring compilation or assembly, are
    5566 +ignored.
    5567 +
    5568 +@item -S
    5569 +@opindex S
    5570 +Stop after the stage of compilation proper; do not assemble.  The output
    5571 +is in the form of an assembler code file for each non-assembler input
    5572 +file specified.
    5573 +
    5574 +By default, the assembler file name for a source file is made by
    5575 +replacing the suffix @samp{.c}, @samp{.i}, etc., with @samp{.s}.
    5576 +
    5577 +Input files that don't require compilation are ignored.
    5578 +
    5579 +@item -E
    5580 +@opindex E
    5581 +Stop after the preprocessing stage; do not run the compiler proper.  The
    5582 +output is in the form of preprocessed source code, which is sent to the
    5583 +standard output.
    5584 +
    5585 +Input files which don't require preprocessing are ignored.
    5586 +
    5587 +@cindex output file option
    5588 +@item -o @var{file}
    5589 +@opindex o
    5590 +Place output in file @var{file}.  This applies regardless to whatever
    5591 +sort of output is being produced, whether it be an executable file,
    5592 +an object file, an assembler file or preprocessed C code.
    5593 +
    5594 +If @option{-o} is not specified, the default is to put an executable
    5595 +file in @file{a.out}, the object file for
    5596 +@file{@var{source}.@var{suffix}} in @file{@var{source}.o}, its
    5597 +assembler file in @file{@var{source}.s}, a precompiled header file in
    5598 +@file{@var{source}.@var{suffix}.gch}, and all preprocessed C source on
    5599 +standard output.
    5600 +
    5601 +@item -v
    5602 +@opindex v
    5603 +Print (on standard error output) the commands executed to run the stages
    5604 +of compilation.  Also print the version number of the compiler driver
    5605 +program and of the preprocessor and the compiler proper.
    5606 +
    5607 +@item -###
    5608 +@opindex ###
    5609 +Like @option{-v} except the commands are not executed and all command
    5610 +arguments are quoted.  This is useful for shell scripts to capture the
    5611 +driver-generated command lines.
    5612 +
    5613 +@item -pipe
    5614 +@opindex pipe
    5615 +Use pipes rather than temporary files for communication between the
    5616 +various stages of compilation.  This fails to work on some systems where
    5617 +the assembler is unable to read from a pipe; but the GNU assembler has
    5618 +no trouble.
    5619 +
    5620 +@item -combine
    5621 +@opindex combine
    5622 +If you are compiling multiple source files, this option tells the driver
    5623 +to pass all the source files to the compiler at once (for those
    5624 +languages for which the compiler can handle this).  This will allow
    5625 +intermodule analysis (IMA) to be performed by the compiler.  Currently the only
    5626 +language for which this is supported is C@.  If you pass source files for
    5627 +multiple languages to the driver, using this option, the driver will invoke
    5628 +the compiler(s) that support IMA once each, passing each compiler all the
    5629 +source files appropriate for it.  For those languages that do not support
    5630 +IMA this option will be ignored, and the compiler will be invoked once for
    5631 +each source file in that language.  If you use this option in conjunction
    5632 +with @option{-save-temps}, the compiler will generate multiple
    5633 +pre-processed files
    5634 +(one for each source file), but only one (combined) @file{.o} or
    5635 +@file{.s} file.
    5636 +
    5637 +@item --help
    5638 +@opindex help
    5639 +Print (on the standard output) a description of the command line options
    5640 +understood by @command{gcc}.  If the @option{-v} option is also specified
    5641 +then @option{--help} will also be passed on to the various processes
    5642 +invoked by @command{gcc}, so that they can display the command line options
    5643 +they accept.  If the @option{-Wextra} option has also been specified
    5644 +(prior to the @option{--help} option), then command line options which
    5645 +have no documentation associated with them will also be displayed.
    5646 +
    5647 +@item --target-help
    5648 +@opindex target-help
    5649 +Print (on the standard output) a description of target-specific command
    5650 +line options for each tool.  For some targets extra target-specific
    5651 +information may also be printed.
    5652 +
    5653 +@item --help=@{@var{class}@r{|[}^@r{]}@var{qualifier}@}@r{[},@dots{}@r{]}
    5654 +Print (on the standard output) a description of the command line
    5655 +options understood by the compiler that fit into all specified classes
    5656 +and qualifiers.  These are the supported classes:
    5657 +
    5658 +@table @asis
    5659 +@item @samp{optimizers}
    5660 +This will display all of the optimization options supported by the
    5661 +compiler.
    5662 +
    5663 +@item @samp{warnings}
    5664 +This will display all of the options controlling warning messages
    5665 +produced by the compiler.
    5666 +
    5667 +@item @samp{target}
    5668 +This will display target-specific options.  Unlike the
    5669 +@option{--target-help} option however, target-specific options of the
    5670 +linker and assembler will not be displayed.  This is because those
    5671 +tools do not currently support the extended @option{--help=} syntax.
    5672 +
    5673 +@item @samp{params}
    5674 +This will display the values recognized by the @option{--param}
    5675 +option.
    5676 +
    5677 +@item @var{language}
    5678 +This will display the options supported for @var{language}, where
    5679 +@var{language} is the name of one of the languages supported in this
    5680 +version of GCC.
    5681 +
    5682 +@item @samp{common}
    5683 +This will display the options that are common to all languages.
    5684 +@end table
    5685 +
    5686 +These are the supported qualifiers:
    5687 +
    5688 +@table @asis
    5689 +@item @samp{undocumented}
    5690 +Display only those options which are undocumented.
    5691 +
    5692 +@item @samp{joined}
    5693 +Display options which take an argument that appears after an equal
    5694 +sign in the same continuous piece of text, such as:
    5695 +@samp{--help=target}.
    5696 +
    5697 +@item @samp{separate}
    5698 +Display options which take an argument that appears as a separate word
    5699 +following the original option, such as: @samp{-o output-file}.
    5700 +@end table
    5701 +
    5702 +Thus for example to display all the undocumented target-specific
    5703 +switches supported by the compiler the following can be used:
    5704 +
    5705 +@smallexample
    5706 +--help=target,undocumented
    5707 +@end smallexample
    5708 +
    5709 +The sense of a qualifier can be inverted by prefixing it with the
    5710 +@samp{^} character, so for example to display all binary warning
    5711 +options (i.e., ones that are either on or off and that do not take an
    5712 +argument), which have a description the following can be used:
    5713 +
    5714 +@smallexample
    5715 +--help=warnings,^joined,^undocumented
    5716 +@end smallexample
    5717 +
    5718 +The argument to @option{--help=} should not consist solely of inverted
    5719 +qualifiers.
    5720 +
    5721 +Combining several classes is possible, although this usually
    5722 +restricts the output by so much that there is nothing to display.  One
    5723 +case where it does work however is when one of the classes is
    5724 +@var{target}.  So for example to display all the target-specific
    5725 +optimization options the following can be used:
    5726 +
    5727 +@smallexample
    5728 +--help=target,optimizers
    5729 +@end smallexample
    5730 +
    5731 +The @option{--help=} option can be repeated on the command line.  Each
    5732 +successive use will display its requested class of options, skipping
    5733 +those that have already been displayed.
    5734 +
    5735 +If the @option{-Q} option appears on the command line before the
    5736 +@option{--help=} option, then the descriptive text displayed by
    5737 +@option{--help=} is changed.  Instead of describing the displayed
    5738 +options, an indication is given as to whether the option is enabled,
    5739 +disabled or set to a specific value (assuming that the compiler
    5740 +knows this at the point where the @option{--help=} option is used).
    5741 +
    5742 +Here is a truncated example from the ARM port of @command{gcc}:
    5743 +
    5744 +@smallexample
    5745 +  % gcc -Q -mabi=2 --help=target -c
    5746 +  The following options are target specific:
    5747 +  -mabi=                                2
    5748 +  -mabort-on-noreturn                   [disabled]
    5749 +  -mapcs                                [disabled]
    5750 +@end smallexample
    5751 +
    5752 +The output is sensitive to the effects of previous command line
    5753 +options, so for example it is possible to find out which optimizations
    5754 +are enabled at @option{-O2} by using:
    5755 +
    5756 +@smallexample
    5757 +-Q -O2 --help=optimizers
    5758 +@end smallexample
    5759 +
    5760 +Alternatively you can discover which binary optimizations are enabled
    5761 +by @option{-O3} by using:
    5762 +
    5763 +@smallexample
    5764 +gcc -c -Q -O3 --help=optimizers > /tmp/O3-opts
    5765 +gcc -c -Q -O2 --help=optimizers > /tmp/O2-opts
    5766 +diff /tmp/O2-opts /tmp/O3-opts | grep enabled
    5767 +@end smallexample
    5768 +
    5769 +@item --version
    5770 +@opindex version
    5771 +Display the version number and copyrights of the invoked GCC@.
    5772 +
    5773 +@item -wrapper
    5774 +@opindex wrapper
    5775 +Invoke all subcommands under a wrapper program. It takes a single
    5776 +comma separated list as an argument, which will be used to invoke
    5777 +the wrapper:
    5778 +
    5779 +@smallexample
    5780 +gcc -c t.c -wrapper gdb,--args
    5781 +@end smallexample
    5782 +
    5783 +This will invoke all subprograms of gcc under "gdb --args",
    5784 +thus cc1 invocation will be "gdb --args cc1 ...".
    5785 +
    5786 +@include @value{srcdir}/../libiberty/at-file.texi
    5787 +@end table
    5788 +
    5789 +@node Invoking G++
    5790 +@section Compiling C++ Programs
    5791 +
    5792 +@cindex suffixes for C++ source
    5793 +@cindex C++ source file suffixes
    5794 +C++ source files conventionally use one of the suffixes @samp{.C},
    5795 +@samp{.cc}, @samp{.cpp}, @samp{.CPP}, @samp{.c++}, @samp{.cp}, or
    5796 +@samp{.cxx}; C++ header files often use @samp{.hh}, @samp{.hpp},
    5797 +@samp{.H}, or (for shared template code) @samp{.tcc}; and
    5798 +preprocessed C++ files use the suffix @samp{.ii}.  GCC recognizes
    5799 +files with these names and compiles them as C++ programs even if you
    5800 +call the compiler the same way as for compiling C programs (usually
    5801 +with the name @command{gcc}).
    5802 +
    5803 +@findex g++
    5804 +@findex c++
    5805 +However, the use of @command{gcc} does not add the C++ library.
    5806 +@command{g++} is a program that calls GCC and treats @samp{.c},
    5807 +@samp{.h} and @samp{.i} files as C++ source files instead of C source
    5808 +files unless @option{-x} is used, and automatically specifies linking
    5809 +against the C++ library.  This program is also useful when
    5810 +precompiling a C header file with a @samp{.h} extension for use in C++
    5811 +compilations.  On many systems, @command{g++} is also installed with
    5812 +the name @command{c++}.
    5813 +
    5814 +@cindex invoking @command{g++}
    5815 +When you compile C++ programs, you may specify many of the same
    5816 +command-line options that you use for compiling programs in any
    5817 +language; or command-line options meaningful for C and related
    5818 +languages; or options that are meaningful only for C++ programs.
    5819 +@xref{C Dialect Options,,Options Controlling C Dialect}, for
    5820 +explanations of options for languages related to C@.
    5821 +@xref{C++ Dialect Options,,Options Controlling C++ Dialect}, for
    5822 +explanations of options that are meaningful only for C++ programs.
    5823 +
    5824 +@node C Dialect Options
    5825 +@section Options Controlling C Dialect
    5826 +@cindex dialect options
    5827 +@cindex language dialect options
    5828 +@cindex options, dialect
    5829 +
    5830 +The following options control the dialect of C (or languages derived
    5831 +from C, such as C++, Objective-C and Objective-C++) that the compiler
    5832 +accepts:
    5833 +
    5834 +@table @gcctabopt
    5835 +@cindex ANSI support
    5836 +@cindex ISO support
    5837 +@item -ansi
    5838 +@opindex ansi
    5839 +In C mode, this is equivalent to @samp{-std=c89}. In C++ mode, it is
    5840 +equivalent to @samp{-std=c++98}.
    5841 +
    5842 +This turns off certain features of GCC that are incompatible with ISO
    5843 +C90 (when compiling C code), or of standard C++ (when compiling C++ code),
    5844 +such as the @code{asm} and @code{typeof} keywords, and
    5845 +predefined macros such as @code{unix} and @code{vax} that identify the
    5846 +type of system you are using.  It also enables the undesirable and
    5847 +rarely used ISO trigraph feature.  For the C compiler,
    5848 +it disables recognition of C++ style @samp{//} comments as well as
    5849 +the @code{inline} keyword.
    5850 +
    5851 +The alternate keywords @code{__asm__}, @code{__extension__},
    5852 +@code{__inline__} and @code{__typeof__} continue to work despite
    5853 +@option{-ansi}.  You would not want to use them in an ISO C program, of
    5854 +course, but it is useful to put them in header files that might be included
    5855 +in compilations done with @option{-ansi}.  Alternate predefined macros
    5856 +such as @code{__unix__} and @code{__vax__} are also available, with or
    5857 +without @option{-ansi}.
    5858 +
    5859 +The @option{-ansi} option does not cause non-ISO programs to be
    5860 +rejected gratuitously.  For that, @option{-pedantic} is required in
    5861 +addition to @option{-ansi}.  @xref{Warning Options}.
    5862 +
    5863 +The macro @code{__STRICT_ANSI__} is predefined when the @option{-ansi}
    5864 +option is used.  Some header files may notice this macro and refrain
    5865 +from declaring certain functions or defining certain macros that the
    5866 +ISO standard doesn't call for; this is to avoid interfering with any
    5867 +programs that might use these names for other things.
    5868 +
    5869 +Functions that would normally be built in but do not have semantics
    5870 +defined by ISO C (such as @code{alloca} and @code{ffs}) are not built-in
    5871 +functions when @option{-ansi} is used.  @xref{Other Builtins,,Other
    5872 +built-in functions provided by GCC}, for details of the functions
    5873 +affected.
    5874 +
    5875 +@item -std=
    5876 +@opindex std
    5877 +Determine the language standard. @xref{Standards,,Language Standards
    5878 +Supported by GCC}, for details of these standard versions.  This option
    5879 +is currently only supported when compiling C or C++.
    5880 +
    5881 +The compiler can accept several base standards, such as @samp{c89} or
    5882 +@samp{c++98}, and GNU dialects of those standards, such as
    5883 +@samp{gnu89} or @samp{gnu++98}.  By specifying a base standard, the
    5884 +compiler will accept all programs following that standard and those
    5885 +using GNU extensions that do not contradict it.  For example,
    5886 +@samp{-std=c89} turns off certain features of GCC that are
    5887 +incompatible with ISO C90, such as the @code{asm} and @code{typeof}
    5888 +keywords, but not other GNU extensions that do not have a meaning in
    5889 +ISO C90, such as omitting the middle term of a @code{?:}
    5890 +expression. On the other hand, by specifying a GNU dialect of a
    5891 +standard, all features the compiler support are enabled, even when
    5892 +those features change the meaning of the base standard and some
    5893 +strict-conforming programs may be rejected.  The particular standard
    5894 +is used by @option{-pedantic} to identify which features are GNU
    5895 +extensions given that version of the standard. For example
    5896 +@samp{-std=gnu89 -pedantic} would warn about C++ style @samp{//}
    5897 +comments, while @samp{-std=gnu99 -pedantic} would not.
    5898 +
    5899 +A value for this option must be provided; possible values are
    5900 +
    5901 +@table @samp
    5902 +@item c89
    5903 +@itemx iso9899:1990
    5904 +Support all ISO C90 programs (certain GNU extensions that conflict
    5905 +with ISO C90 are disabled). Same as @option{-ansi} for C code.
    5906 +
    5907 +@item iso9899:199409
    5908 +ISO C90 as modified in amendment 1.
    5909 +
    5910 +@item c99
    5911 +@itemx c9x
    5912 +@itemx iso9899:1999
    5913 +@itemx iso9899:199x
    5914 +ISO C99.  Note that this standard is not yet fully supported; see
    5915 +@w{@uref{}} for more information.  The
    5916 +names @samp{c9x} and @samp{iso9899:199x} are deprecated.
    5917 +
    5918 +@item gnu89
    5919 +GNU dialect of ISO C90 (including some C99 features). This
    5920 +is the default for C code.
    5921 +
    5922 +@item gnu99
    5923 +@itemx gnu9x
    5924 +GNU dialect of ISO C99.  When ISO C99 is fully implemented in GCC,
    5925 +this will become the default.  The name @samp{gnu9x} is deprecated.
    5926 +
    5927 +@item c++98
    5928 +The 1998 ISO C++ standard plus amendments. Same as @option{-ansi} for
    5929 +C++ code.
    5930 +
    5931 +@item gnu++98
    5932 +GNU dialect of @option{-std=c++98}.  This is the default for
    5933 +C++ code.
    5934 +
    5935 +@item c++0x
    5936 +The working draft of the upcoming ISO C++0x standard. This option
    5937 +enables experimental features that are likely to be included in
    5938 +C++0x. The working draft is constantly changing, and any feature that is
    5939 +enabled by this flag may be removed from future versions of GCC if it is
    5940 +not part of the C++0x standard.
    5941 +
    5942 +@item gnu++0x
    5943 +GNU dialect of @option{-std=c++0x}. This option enables
    5944 +experimental features that may be removed in future versions of GCC.
    5945 +@end table
    5946 +
    5947 +@item -fgnu89-inline
    5948 +@opindex fgnu89-inline
    5949 +The option @option{-fgnu89-inline} tells GCC to use the traditional
    5950 +GNU semantics for @code{inline} functions when in C99 mode.
    5951 +@xref{Inline,,An Inline Function is As Fast As a Macro}.  This option
    5952 +is accepted and ignored by GCC versions 4.1.3 up to but not including
    5953 +4.3.  In GCC versions 4.3 and later it changes the behavior of GCC in
    5954 +C99 mode.  Using this option is roughly equivalent to adding the
    5955 +@code{gnu_inline} function attribute to all inline functions
    5956 +(@pxref{Function Attributes}).
    5957 +
    5958 +The option @option{-fno-gnu89-inline} explicitly tells GCC to use the
    5959 +C99 semantics for @code{inline} when in C99 or gnu99 mode (i.e., it
    5960 +specifies the default behavior).  This option was first supported in
    5961 +GCC 4.3.  This option is not supported in C89 or gnu89 mode.
    5962 +
    5963 +The preprocessor macros @code{__GNUC_GNU_INLINE__} and
    5964 +@code{__GNUC_STDC_INLINE__} may be used to check which semantics are
    5965 +in effect for @code{inline} functions.  @xref{Common Predefined
    5966 +Macros,,,cpp,The C Preprocessor}.
    5967 +
    5968 +@item -aux-info @var{filename}
    5969 +@opindex aux-info
    5970 +Output to the given filename prototyped declarations for all functions
    5971 +declared and/or defined in a translation unit, including those in header
    5972 +files.  This option is silently ignored in any language other than C@.
    5973 +
    5974 +Besides declarations, the file indicates, in comments, the origin of
    5975 +each declaration (source file and line), whether the declaration was
    5976 +implicit, prototyped or unprototyped (@samp{I}, @samp{N} for new or
    5977 +@samp{O} for old, respectively, in the first character after the line
    5978 +number and the colon), and whether it came from a declaration or a
    5979 +definition (@samp{C} or @samp{F}, respectively, in the following
    5980 +character).  In the case of function definitions, a K&R-style list of
    5981 +arguments followed by their declarations is also provided, inside
    5982 +comments, after the declaration.
    5983 +
    5984 +@item -fno-asm
    5985 +@opindex fno-asm
    5986 +Do not recognize @code{asm}, @code{inline} or @code{typeof} as a
    5987 +keyword, so that code can use these words as identifiers.  You can use
    5988 +the keywords @code{__asm__}, @code{__inline__} and @code{__typeof__}
    5989 +instead.  @option{-ansi} implies @option{-fno-asm}.
    5990 +
    5991 +In C++, this switch only affects the @code{typeof} keyword, since
    5992 +@code{asm} and @code{inline} are standard keywords.  You may want to
    5993 +use the @option{-fno-gnu-keywords} flag instead, which has the same
    5994 +effect.  In C99 mode (@option{-std=c99} or @option{-std=gnu99}), this
    5995 +switch only affects the @code{asm} and @code{typeof} keywords, since
    5996 +@code{inline} is a standard keyword in ISO C99.
    5997 +
    5998 +@item -fno-builtin
    5999 +@itemx -fno-builtin-@var{function}
    6000 +@opindex fno-builtin
    6001 +@cindex built-in functions
    6002 +Don't recognize built-in functions that do not begin with
    6003 +@samp{__builtin_} as prefix.  @xref{Other Builtins,,Other built-in
    6004 +functions provided by GCC}, for details of the functions affected,
    6005 +including those which are not built-in functions when @option{-ansi} or
    6006 +@option{-std} options for strict ISO C conformance are used because they
    6007 +do not have an ISO standard meaning.
    6008 +
    6009 +GCC normally generates special code to handle certain built-in functions
    6010 +more efficiently; for instance, calls to @code{alloca} may become single
    6011 +instructions that adjust the stack directly, and calls to @code{memcpy}
    6012 +may become inline copy loops.  The resulting code is often both smaller
    6013 +and faster, but since the function calls no longer appear as such, you
    6014 +cannot set a breakpoint on those calls, nor can you change the behavior
    6015 +of the functions by linking with a different library.  In addition,
    6016 +when a function is recognized as a built-in function, GCC may use
    6017 +information about that function to warn about problems with calls to
    6018 +that function, or to generate more efficient code, even if the
    6019 +resulting code still contains calls to that function.  For example,
    6020 +warnings are given with @option{-Wformat} for bad calls to
    6021 +@code{printf}, when @code{printf} is built in, and @code{strlen} is
    6022 +known not to modify global memory.
    6023 +
    6024 +With the @option{-fno-builtin-@var{function}} option
    6025 +only the built-in function @var{function} is
    6026 +disabled.  @var{function} must not begin with @samp{__builtin_}.  If a
    6027 +function is named that is not built-in in this version of GCC, this
    6028 +option is ignored.  There is no corresponding
    6029 +@option{-fbuiltin-@var{function}} option; if you wish to enable
    6030 +built-in functions selectively when using @option{-fno-builtin} or
    6031 +@option{-ffreestanding}, you may define macros such as:
    6032 +
    6033 +@smallexample
    6034 +#define abs(n)          __builtin_abs ((n))
    6035 +#define strcpy(d, s)    __builtin_strcpy ((d), (s))
    6036 +@end smallexample
    6037 +
    6038 +@item -fhosted
    6039 +@opindex fhosted
    6040 +@cindex hosted environment
    6041 +
    6042 +Assert that compilation takes place in a hosted environment.  This implies
    6043 +@option{-fbuiltin}.  A hosted environment is one in which the
    6044 +entire standard library is available, and in which @code{main} has a return
    6045 +type of @code{int}.  Examples are nearly everything except a kernel.
    6046 +This is equivalent to @option{-fno-freestanding}.
    6047 +
    6048 +@item -ffreestanding
    6049 +@opindex ffreestanding
    6050 +@cindex hosted environment
    6051 +
    6052 +Assert that compilation takes place in a freestanding environment.  This
    6053 +implies @option{-fno-builtin}.  A freestanding environment
    6054 +is one in which the standard library may not exist, and program startup may
    6055 +not necessarily be at @code{main}.  The most obvious example is an OS kernel.
    6056 +This is equivalent to @option{-fno-hosted}.
    6057 +
    6058 +@xref{Standards,,Language Standards Supported by GCC}, for details of
    6059 +freestanding and hosted environments.
    6060 +
    6061 +@item -fopenmp
    6062 +@opindex fopenmp
    6063 +@cindex openmp parallel
    6064 +Enable handling of OpenMP directives @code{#pragma omp} in C/C++ and
    6065 +@code{!$omp} in Fortran.  When @option{-fopenmp} is specified, the
    6066 +compiler generates parallel code according to the OpenMP Application
    6067 +Program Interface v2.5 @w{@uref{}}.  This option
    6068 +implies @option{-pthread}, and thus is only supported on targets that
    6069 +have support for @option{-pthread}.
    6070 +
    6071 +@item -fms-extensions
    6072 +@opindex fms-extensions
    6073 +Accept some non-standard constructs used in Microsoft header files.
    6074 +
    6075 +Some cases of unnamed fields in structures and unions are only
    6076 +accepted with this option.  @xref{Unnamed Fields,,Unnamed struct/union
    6077 +fields within structs/unions}, for details.
    6078 +
    6079 +@item -trigraphs
    6080 +@opindex trigraphs
    6081 +Support ISO C trigraphs.  The @option{-ansi} option (and @option{-std}
    6082 +options for strict ISO C conformance) implies @option{-trigraphs}.
    6083 +
    6084 +@item -no-integrated-cpp
    6085 +@opindex no-integrated-cpp
    6086 +Performs a compilation in two passes: preprocessing and compiling.  This
    6087 +option allows a user supplied "cc1", "cc1plus", or "cc1obj" via the
    6088 +@option{-B} option.  The user supplied compilation step can then add in
    6089 +an additional preprocessing step after normal preprocessing but before
    6090 +compiling.  The default is to use the integrated cpp (internal cpp)
    6091 +
    6092 +The semantics of this option will change if "cc1", "cc1plus", and
    6093 +"cc1obj" are merged.
    6094 +
    6095 +@cindex traditional C language
    6096 +@cindex C language, traditional
    6097 +@item -traditional
    6098 +@itemx -traditional-cpp
    6099 +@opindex traditional-cpp
    6100 +@opindex traditional
    6101 +Formerly, these options caused GCC to attempt to emulate a pre-standard
    6102 +C compiler.  They are now only supported with the @option{-E} switch.
    6103 +The preprocessor continues to support a pre-standard mode.  See the GNU
    6104 +CPP manual for details.
    6105 +
    6106 +@item -fcond-mismatch
    6107 +@opindex fcond-mismatch
    6108 +Allow conditional expressions with mismatched types in the second and
    6109 +third arguments.  The value of such an expression is void.  This option
    6110 +is not supported for C++.
    6111 +
    6112 +@item -flax-vector-conversions
    6113 +@opindex flax-vector-conversions
    6114 +Allow implicit conversions between vectors with differing numbers of
    6115 +elements and/or incompatible element types.  This option should not be
    6116 +used for new code.
    6117 +
    6118 +@item -funsigned-char
    6119 +@opindex funsigned-char
    6120 +Let the type @code{char} be unsigned, like @code{unsigned char}.
    6121 +
    6122 +Each kind of machine has a default for what @code{char} should
    6123 +be.  It is either like @code{unsigned char} by default or like
    6124 +@code{signed char} by default.
    6125 +
    6126 +Ideally, a portable program should always use @code{signed char} or
    6127 +@code{unsigned char} when it depends on the signedness of an object.
    6128 +But many programs have been written to use plain @code{char} and
    6129 +expect it to be signed, or expect it to be unsigned, depending on the
    6130 +machines they were written for.  This option, and its inverse, let you
    6131 +make such a program work with the opposite default.
    6132 +
    6133 +The type @code{char} is always a distinct type from each of
    6134 +@code{signed char} or @code{unsigned char}, even though its behavior
    6135 +is always just like one of those two.
    6136 +
    6137 +@item -fsigned-char
    6138 +@opindex fsigned-char
    6139 +Let the type @code{char} be signed, like @code{signed char}.
    6140 +
    6141 +Note that this is equivalent to @option{-fno-unsigned-char}, which is
    6142 +the negative form of @option{-funsigned-char}.  Likewise, the option
    6143 +@option{-fno-signed-char} is equivalent to @option{-funsigned-char}.
    6144 +
    6145 +@item -fsigned-bitfields
    6146 +@itemx -funsigned-bitfields
    6147 +@itemx -fno-signed-bitfields
    6148 +@itemx -fno-unsigned-bitfields
    6149 +@opindex fsigned-bitfields
    6150 +@opindex funsigned-bitfields
    6151 +@opindex fno-signed-bitfields
    6152 +@opindex fno-unsigned-bitfields
    6153 +These options control whether a bit-field is signed or unsigned, when the
    6154 +declaration does not use either @code{signed} or @code{unsigned}.  By
    6155 +default, such a bit-field is signed, because this is consistent: the
    6156 +basic integer types such as @code{int} are signed types.
    6157 +@end table
    6158 +
    6159 +@node C++ Dialect Options
    6160 +@section Options Controlling C++ Dialect
    6161 +
    6162 +@cindex compiler options, C++
    6163 +@cindex C++ options, command line
    6164 +@cindex options, C++
    6165 +This section describes the command-line options that are only meaningful
    6166 +for C++ programs; but you can also use most of the GNU compiler options
    6167 +regardless of what language your program is in.  For example, you
    6168 +might compile a file @code{firstClass.C} like this:
    6169 +
    6170 +@smallexample
    6171 +g++ -g -frepo -O -c firstClass.C
    6172 +@end smallexample
    6173 +
    6174 +@noindent
    6175 +In this example, only @option{-frepo} is an option meant
    6176 +only for C++ programs; you can use the other options with any
    6177 +language supported by GCC@.
    6178 +
    6179 +Here is a list of options that are @emph{only} for compiling C++ programs:
    6180 +
    6181 +@table @gcctabopt
    6182 +
    6183 +@item -fabi-version=@var{n}
    6184 +@opindex fabi-version
    6185 +Use version @var{n} of the C++ ABI@.  Version 2 is the version of the
    6186 +C++ ABI that first appeared in G++ 3.4.  Version 1 is the version of
    6187 +the C++ ABI that first appeared in G++ 3.2.  Version 0 will always be
    6188 +the version that conforms most closely to the C++ ABI specification.
    6189 +Therefore, the ABI obtained using version 0 will change as ABI bugs
    6190 +are fixed.
    6191 +
    6192 +The default is version 2.
    6193 +
    6194 +@item -fno-access-control
    6195 +@opindex fno-access-control
    6196 +Turn off all access checking.  This switch is mainly useful for working
    6197 +around bugs in the access control code.
    6198 +
    6199 +@item -fcheck-new
    6200 +@opindex fcheck-new
    6201 +Check that the pointer returned by @code{operator new} is non-null
    6202 +before attempting to modify the storage allocated.  This check is
    6203 +normally unnecessary because the C++ standard specifies that
    6204 +@code{operator new} will only return @code{0} if it is declared
    6205 +@samp{throw()}, in which case the compiler will always check the
    6206 +return value even without this option.  In all other cases, when
    6207 +@code{operator new} has a non-empty exception specification, memory
    6208 +exhaustion is signalled by throwing @code{std::bad_alloc}.  See also
    6209 +@samp{new (nothrow)}.
    6210 +
    6211 +@item -fconserve-space
    6212 +@opindex fconserve-space
    6213 +Put uninitialized or runtime-initialized global variables into the
    6214 +common segment, as C does.  This saves space in the executable at the
    6215 +cost of not diagnosing duplicate definitions.  If you compile with this
    6216 +flag and your program mysteriously crashes after @code{main()} has
    6217 +completed, you may have an object that is being destroyed twice because
    6218 +two definitions were merged.
    6219 +
    6220 +This option is no longer useful on most targets, now that support has
    6221 +been added for putting variables into BSS without making them common.
    6222 +
    6223 +@item -fno-deduce-init-list
    6224 +@opindex fno-deduce-init-list
    6225 +Disable deduction of a template type parameter as
    6226 +std::initializer_list from a brace-enclosed initializer list, i.e.
    6227 +
    6228 +@smallexample
    6229 +template <class T> auto forward(T t) -> decltype (realfn (t))
    6230 +@{
    6231 +  return realfn (t);
    6232 +@}
    6233 +
    6234 +void f()
    6235 +@{
    6236 +  forward(@{1,2@}); // call forward<std::initializer_list<int>>
    6237 +@}
    6238 +@end smallexample
    6239 +
    6240 +This option is present because this deduction is an extension to the
    6241 +current specification in the C++0x working draft, and there was
    6242 +some concern about potential overload resolution problems.
    6243 +
    6244 +@item -ffriend-injection
    6245 +@opindex ffriend-injection
    6246 +Inject friend functions into the enclosing namespace, so that they are
    6247 +visible outside the scope of the class in which they are declared.
    6248 +Friend functions were documented to work this way in the old Annotated
    6249 +C++ Reference Manual, and versions of G++ before 4.1 always worked
    6250 +that way.  However, in ISO C++ a friend function which is not declared
    6251 +in an enclosing scope can only be found using argument dependent
    6252 +lookup.  This option causes friends to be injected as they were in
    6253 +earlier releases.
    6254 +
    6255 +This option is for compatibility, and may be removed in a future
    6256 +release of G++.
    6257 +
    6258 +@item -fno-elide-constructors
    6259 +@opindex fno-elide-constructors
    6260 +The C++ standard allows an implementation to omit creating a temporary
    6261 +which is only used to initialize another object of the same type.
    6262 +Specifying this option disables that optimization, and forces G++ to
    6263 +call the copy constructor in all cases.
    6264 +
    6265 +@item -fno-enforce-eh-specs
    6266 +@opindex fno-enforce-eh-specs
    6267 +Don't generate code to check for violation of exception specifications
    6268 +at runtime.  This option violates the C++ standard, but may be useful
    6269 +for reducing code size in production builds, much like defining
    6270 +@samp{NDEBUG}.  This does not give user code permission to throw
    6271 +exceptions in violation of the exception specifications; the compiler
    6272 +will still optimize based on the specifications, so throwing an
    6273 +unexpected exception will result in undefined behavior.
    6274 +
    6275 +@item -ffor-scope
    6276 +@itemx -fno-for-scope
    6277 +@opindex ffor-scope
    6278 +@opindex fno-for-scope
    6279 +If @option{-ffor-scope} is specified, the scope of variables declared in
    6280 +a @i{for-init-statement} is limited to the @samp{for} loop itself,
    6281 +as specified by the C++ standard.
    6282 +If @option{-fno-for-scope} is specified, the scope of variables declared in
    6283 +a @i{for-init-statement} extends to the end of the enclosing scope,
    6284 +as was the case in old versions of G++, and other (traditional)
    6285 +implementations of C++.
    6286 +
    6287 +The default if neither flag is given to follow the standard,
    6288 +but to allow and give a warning for old-style code that would
    6289 +otherwise be invalid, or have different behavior.
    6290 +
    6291 +@item -fno-gnu-keywords
    6292 +@opindex fno-gnu-keywords
    6293 +Do not recognize @code{typeof} as a keyword, so that code can use this
    6294 +word as an identifier.  You can use the keyword @code{__typeof__} instead.
    6295 +@option{-ansi} implies @option{-fno-gnu-keywords}.
    6296 +
    6297 +@item -fno-implicit-templates
    6298 +@opindex fno-implicit-templates
    6299 +Never emit code for non-inline templates which are instantiated
    6300 +implicitly (i.e.@: by use); only emit code for explicit instantiations.
    6301 +@xref{Template Instantiation}, for more information.
    6302 +
    6303 +@item -fno-implicit-inline-templates
    6304 +@opindex fno-implicit-inline-templates
    6305 +Don't emit code for implicit instantiations of inline templates, either.
    6306 +The default is to handle inlines differently so that compiles with and
    6307 +without optimization will need the same set of explicit instantiations.
    6308 +
    6309 +@item -fno-implement-inlines
    6310 +@opindex fno-implement-inlines
    6311 +To save space, do not emit out-of-line copies of inline functions
    6312 +controlled by @samp{#pragma implementation}.  This will cause linker
    6313 +errors if these functions are not inlined everywhere they are called.
    6314 +
    6315 +@item -fms-extensions
    6316 +@opindex fms-extensions
    6317 +Disable pedantic warnings about constructs used in MFC, such as implicit
    6318 +int and getting a pointer to member function via non-standard syntax.
    6319 +
    6320 +@item -fno-nonansi-builtins
    6321 +@opindex fno-nonansi-builtins
    6322 +Disable built-in declarations of functions that are not mandated by
    6323 +ANSI/ISO C@.  These include @code{ffs}, @code{alloca}, @code{_exit},
    6324 +@code{index}, @code{bzero}, @code{conjf}, and other related functions.
    6325 +
    6326 +@item -fno-operator-names
    6327 +@opindex fno-operator-names
    6328 +Do not treat the operator name keywords @code{and}, @code{bitand},
    6329 +@code{bitor}, @code{compl}, @code{not}, @code{or} and @code{xor} as
    6330 +synonyms as keywords.
    6331 +
    6332 +@item -fno-optional-diags
    6333 +@opindex fno-optional-diags
    6334 +Disable diagnostics that the standard says a compiler does not need to
    6335 +issue.  Currently, the only such diagnostic issued by G++ is the one for
    6336 +a name having multiple meanings within a class.
    6337 +
    6338 +@item -fpermissive
    6339 +@opindex fpermissive
    6340 +Downgrade some diagnostics about nonconformant code from errors to
    6341 +warnings.  Thus, using @option{-fpermissive} will allow some
    6342 +nonconforming code to compile.
    6343 +
    6344 +@item -frepo
    6345 +@opindex frepo
    6346 +Enable automatic template instantiation at link time.  This option also
    6347 +implies @option{-fno-implicit-templates}.  @xref{Template
    6348 +Instantiation}, for more information.
    6349 +
    6350 +@item -fno-rtti
    6351 +@opindex fno-rtti
    6352 +Disable generation of information about every class with virtual
    6353 +functions for use by the C++ runtime type identification features
    6354 +(@samp{dynamic_cast} and @samp{typeid}).  If you don't use those parts
    6355 +of the language, you can save some space by using this flag.  Note that
    6356 +exception handling uses the same information, but it will generate it as
    6357 +needed. The @samp{dynamic_cast} operator can still be used for casts that
    6358 +do not require runtime type information, i.e.@: casts to @code{void *} or to
    6359 +unambiguous base classes.
    6360 +
    6361 +@item -fstats
    6362 +@opindex fstats
    6363 +Emit statistics about front-end processing at the end of the compilation.
    6364 +This information is generally only useful to the G++ development team.
    6365 +
    6366 +@item -ftemplate-depth-@var{n}
    6367 +@opindex ftemplate-depth
    6368 +Set the maximum instantiation depth for template classes to @var{n}.
    6369 +A limit on the template instantiation depth is needed to detect
    6370 +endless recursions during template class instantiation.  ANSI/ISO C++
    6371 +conforming programs must not rely on a maximum depth greater than 17.
    6372 +
    6373 +@item -fno-threadsafe-statics
    6374 +@opindex fno-threadsafe-statics
    6375 +Do not emit the extra code to use the routines specified in the C++
    6376 +ABI for thread-safe initialization of local statics.  You can use this
    6377 +option to reduce code size slightly in code that doesn't need to be
    6378 +thread-safe.
    6379 +
    6380 +@item -fuse-cxa-atexit
    6381 +@opindex fuse-cxa-atexit
    6382 +Register destructors for objects with static storage duration with the
    6383 +@code{__cxa_atexit} function rather than the @code{atexit} function.
    6384 +This option is required for fully standards-compliant handling of static
    6385 +destructors, but will only work if your C library supports
    6386 +@code{__cxa_atexit}.
    6387 +
    6388 +@item -fno-use-cxa-get-exception-ptr
    6389 +@opindex fno-use-cxa-get-exception-ptr
    6390 +Don't use the @code{__cxa_get_exception_ptr} runtime routine.  This
    6391 +will cause @code{std::uncaught_exception} to be incorrect, but is necessary
    6392 +if the runtime routine is not available.
    6393 +
    6394 +@item -fvisibility-inlines-hidden
    6395 +@opindex fvisibility-inlines-hidden
    6396 +This switch declares that the user does not attempt to compare
    6397 +pointers to inline methods where the addresses of the two functions
    6398 +were taken in different shared objects.
    6399 +
    6400 +The effect of this is that GCC may, effectively, mark inline methods with
    6401 +@code{__attribute__ ((visibility ("hidden")))} so that they do not
    6402 +appear in the export table of a DSO and do not require a PLT indirection
    6403 +when used within the DSO@.  Enabling this option can have a dramatic effect
    6404 +on load and link times of a DSO as it massively reduces the size of the
    6405 +dynamic export table when the library makes heavy use of templates.
    6406 +
    6407 +The behavior of this switch is not quite the same as marking the
    6408 +methods as hidden directly, because it does not affect static variables
    6409 +local to the function or cause the compiler to deduce that
    6410 +the function is defined in only one shared object.
    6411 +
    6412 +You may mark a method as having a visibility explicitly to negate the
    6413 +effect of the switch for that method.  For example, if you do want to
    6414 +compare pointers to a particular inline method, you might mark it as
    6415 +having default visibility.  Marking the enclosing class with explicit
    6416 +visibility will have no effect.
    6417 +
    6418 +Explicitly instantiated inline methods are unaffected by this option
    6419 +as their linkage might otherwise cross a shared library boundary.
    6420 +@xref{Template Instantiation}.
    6421 +
    6422 +@item -fvisibility-ms-compat
    6423 +@opindex fvisibility-ms-compat
    6424 +This flag attempts to use visibility settings to make GCC's C++
    6425 +linkage model compatible with that of Microsoft Visual Studio.
    6426 +
    6427 +The flag makes these changes to GCC's linkage model:
    6428 +
    6429 +@enumerate
    6430 +@item
    6431 +It sets the default visibility to @code{hidden}, like
    6432 +@option{-fvisibility=hidden}.
    6433 +
    6434 +@item
    6435 +Types, but not their members, are not hidden by default.
    6436 +
    6437 +@item
    6438 +The One Definition Rule is relaxed for types without explicit
    6439 +visibility specifications which are defined in more than one different
    6440 +shared object: those declarations are permitted if they would have
    6441 +been permitted when this option was not used.
    6442 +@end enumerate
    6443 +
    6444 +In new code it is better to use @option{-fvisibility=hidden} and
    6445 +export those classes which are intended to be externally visible.
    6446 +Unfortunately it is possible for code to rely, perhaps accidentally,
    6447 +on the Visual Studio behavior.
    6448 +
    6449 +Among the consequences of these changes are that static data members
    6450 +of the same type with the same name but defined in different shared
    6451 +objects will be different, so changing one will not change the other;
    6452 +and that pointers to function members defined in different shared
    6453 +objects may not compare equal.  When this flag is given, it is a
    6454 +violation of the ODR to define types with the same name differently.
    6455 +
    6456 +@item -fno-weak
    6457 +@opindex fno-weak
    6458 +Do not use weak symbol support, even if it is provided by the linker.
    6459 +By default, G++ will use weak symbols if they are available.  This
    6460 +option exists only for testing, and should not be used by end-users;
    6461 +it will result in inferior code and has no benefits.  This option may
    6462 +be removed in a future release of G++.
    6463 +
    6464 +@item -nostdinc++
    6465 +@opindex nostdinc++
    6466 +Do not search for header files in the standard directories specific to
    6467 +C++, but do still search the other standard directories.  (This option
    6468 +is used when building the C++ library.)
    6469 +@end table
    6470 +
    6471 +In addition, these optimization, warning, and code generation options
    6472 +have meanings only for C++ programs:
    6473 +
    6474 +@table @gcctabopt
    6475 +@item -fno-default-inline
    6476 +@opindex fno-default-inline
    6477 +Do not assume @samp{inline} for functions defined inside a class scope.
    6478 +@xref{Optimize Options,,Options That Control Optimization}.  Note that these
    6479 +functions will have linkage like inline functions; they just won't be
    6480 +inlined by default.
    6481 +
    6482 +@item -Wabi @r{(C, Objective-C, C++ and Objective-C++ only)}
    6483 +@opindex Wabi
    6484 +@opindex Wno-abi
    6485 +Warn when G++ generates code that is probably not compatible with the
    6486 +vendor-neutral C++ ABI@.  Although an effort has been made to warn about
    6487 +all such cases, there are probably some cases that are not warned about,
    6488 +even though G++ is generating incompatible code.  There may also be
    6489 +cases where warnings are emitted even though the code that is generated
    6490 +will be compatible.
    6491 +
    6492 +You should rewrite your code to avoid these warnings if you are
    6493 +concerned about the fact that code generated by G++ may not be binary
    6494 +compatible with code generated by other compilers.
    6495 +
    6496 +The known incompatibilities at this point include:
    6497 +
    6498 +@itemize @bullet
    6499 +
    6500 +@item
    6501 +Incorrect handling of tail-padding for bit-fields.  G++ may attempt to
    6502 +pack data into the same byte as a base class.  For example:
    6503 +
    6504 +@smallexample
    6505 +struct A @{ virtual void f(); int f1 : 1; @};
    6506 +struct B : public A @{ int f2 : 1; @};
    6507 +@end smallexample
    6508 +
    6509 +@noindent
    6510 +In this case, G++ will place @code{B::f2} into the same byte
    6511 +as@code{A::f1}; other compilers will not.  You can avoid this problem
    6512 +by explicitly padding @code{A} so that its size is a multiple of the
    6513 +byte size on your platform; that will cause G++ and other compilers to
    6514 +layout @code{B} identically.
    6515 +
    6516 +@item
    6517 +Incorrect handling of tail-padding for virtual bases.  G++ does not use
    6518 +tail padding when laying out virtual bases.  For example:
    6519 +
    6520 +@smallexample
    6521 +struct A @{ virtual void f(); char c1; @};
    6522 +struct B @{ B(); char c2; @};
    6523 +struct C : public A, public virtual B @{@};
    6524 +@end smallexample
    6525 +
    6526 +@noindent
    6527 +In this case, G++ will not place @code{B} into the tail-padding for
    6528 +@code{A}; other compilers will.  You can avoid this problem by
    6529 +explicitly padding @code{A} so that its size is a multiple of its
    6530 +alignment (ignoring virtual base classes); that will cause G++ and other
    6531 +compilers to layout @code{C} identically.
    6532 +
    6533 +@item
    6534 +Incorrect handling of bit-fields with declared widths greater than that
    6535 +of their underlying types, when the bit-fields appear in a union.  For
    6536 +example:
    6537 +
    6538 +@smallexample
    6539 +union U @{ int i : 4096; @};
    6540 +@end smallexample
    6541 +
    6542 +@noindent
    6543 +Assuming that an @code{int} does not have 4096 bits, G++ will make the
    6544 +union too small by the number of bits in an @code{int}.
    6545 +
    6546 +@item
    6547 +Empty classes can be placed at incorrect offsets.  For example:
    6548 +
    6549 +@smallexample
    6550 +struct A @{@};
    6551 +
    6552 +struct B @{
    6553 +  A a;
    6554 +  virtual void f ();
    6555 +@};
    6556 +
    6557 +struct C : public B, public A @{@};
    6558 +@end smallexample
    6559 +
    6560 +@noindent
    6561 +G++ will place the @code{A} base class of @code{C} at a nonzero offset;
    6562 +it should be placed at offset zero.  G++ mistakenly believes that the
    6563 +@code{A} data member of @code{B} is already at offset zero.
    6564 +
    6565 +@item
    6566 +Names of template functions whose types involve @code{typename} or
    6567 +template template parameters can be mangled incorrectly.
    6568 +
    6569 +@smallexample
    6570 +template <typename Q>
    6571 +void f(typename Q::X) @{@}
    6572 +
    6573 +template <template <typename> class Q>
    6574 +void f(typename Q<int>::X) @{@}
    6575 +@end smallexample
    6576 +
    6577 +@noindent
    6578 +Instantiations of these templates may be mangled incorrectly.
    6579 +
    6580 +@end itemize
    6581 +
    6582 +It also warns psABI related changes.  The known psABI changes at this
    6583 +point include:
    6584 +
    6585 +@itemize @bullet
    6586 +
    6587 +@item
    6588 +For SYSV/x86-64, when passing union with long double, it is changed to
    6589 +pass in memory as specified in psABI.  For example:
    6590 +
    6591 +@smallexample
    6592 +union U @{
    6593 +  long double ld;
    6594 +  int i;
    6595 +@};
    6596 +@end smallexample
    6597 +
    6598 +@noindent
    6599 +@code{union U} will always be passed in memory.
    6600 +
    6601 +@end itemize
    6602 +
    6603 +@item -Wctor-dtor-privacy @r{(C++ and Objective-C++ only)}
    6604 +@opindex Wctor-dtor-privacy
    6605 +@opindex Wno-ctor-dtor-privacy
    6606 +Warn when a class seems unusable because all the constructors or
    6607 +destructors in that class are private, and it has neither friends nor
    6608 +public static member functions.
    6609 +
    6610 +@item -Wnon-virtual-dtor @r{(C++ and Objective-C++ only)}
    6611 +@opindex Wnon-virtual-dtor
    6612 +@opindex Wno-non-virtual-dtor
    6613 +Warn when a class has virtual functions and accessible non-virtual
    6614 +destructor, in which case it would be possible but unsafe to delete
    6615 +an instance of a derived class through a pointer to the base class.
    6616 +This warning is also enabled if -Weffc++ is specified.
    6617 +
    6618 +@item -Wreorder @r{(C++ and Objective-C++ only)}
    6619 +@opindex Wreorder
    6620 +@opindex Wno-reorder
    6621 +@cindex reordering, warning
    6622 +@cindex warning for reordering of member initializers
    6623 +Warn when the order of member initializers given in the code does not
    6624 +match the order in which they must be executed.  For instance:
    6625 +
    6626 +@smallexample
    6627 +struct A @{
    6628 +  int i;
    6629 +  int j;
    6630 +  A(): j (0), i (1) @{ @}
    6631 +@};
    6632 +@end smallexample
    6633 +
    6634 +The compiler will rearrange the member initializers for @samp{i}
    6635 +and @samp{j} to match the declaration order of the members, emitting
    6636 +a warning to that effect.  This warning is enabled by @option{-Wall}.
    6637 +@end table
    6638 +
    6639 +The following @option{-W@dots{}} options are not affected by @option{-Wall}.
    6640 +
    6641 +@table @gcctabopt
    6642 +@item -Weffc++ @r{(C++ and Objective-C++ only)}
    6643 +@opindex Weffc++
    6644 +@opindex Wno-effc++
    6645 +Warn about violations of the following style guidelines from Scott Meyers'
    6646 +@cite{Effective C++} book:
    6647 +
    6648 +@itemize @bullet
    6649 +@item
    6650 +Item 11:  Define a copy constructor and an assignment operator for classes
    6651 +with dynamically allocated memory.
    6652 +
    6653 +@item
    6654 +Item 12:  Prefer initialization to assignment in constructors.
    6655 +
    6656 +@item
    6657 +Item 14:  Make destructors virtual in base classes.
    6658 +
    6659 +@item
    6660 +Item 15:  Have @code{operator=} return a reference to @code{*this}.
    6661 +
    6662 +@item
    6663 +Item 23:  Don't try to return a reference when you must return an object.
    6664 +
    6665 +@end itemize
    6666 +
    6667 +Also warn about violations of the following style guidelines from
    6668 +Scott Meyers' @cite{More Effective C++} book:
    6669 +
    6670 +@itemize @bullet
    6671 +@item
    6672 +Item 6:  Distinguish between prefix and postfix forms of increment and
    6673 +decrement operators.
    6674 +
    6675 +@item
    6676 +Item 7:  Never overload @code{&&}, @code{||}, or @code{,}.
    6677 +
    6678 +@end itemize
    6679 +
    6680 +When selecting this option, be aware that the standard library
    6681 +headers do not obey all of these guidelines; use @samp{grep -v}
    6682 +to filter out those warnings.
    6683 +
    6684 +@item -Wstrict-null-sentinel @r{(C++ and Objective-C++ only)}
    6685 +@opindex Wstrict-null-sentinel
    6686 +@opindex Wno-strict-null-sentinel
    6687 +Warn also about the use of an uncasted @code{NULL} as sentinel.  When
    6688 +compiling only with GCC this is a valid sentinel, as @code{NULL} is defined
    6689 +to @code{__null}.  Although it is a null pointer constant not a null pointer,
    6690 +it is guaranteed to be of the same size as a pointer.  But this use is
    6691 +not portable across different compilers.
    6692 +
    6693 +@item -Wno-non-template-friend @r{(C++ and Objective-C++ only)}
    6694 +@opindex Wno-non-template-friend
    6695 +@opindex Wnon-template-friend
    6696 +Disable warnings when non-templatized friend functions are declared
    6697 +within a template.  Since the advent of explicit template specification
    6698 +support in G++, if the name of the friend is an unqualified-id (i.e.,
    6699 +@samp{friend foo(int)}), the C++ language specification demands that the
    6700 +friend declare or define an ordinary, nontemplate function.  (Section
    6701 +14.5.3).  Before G++ implemented explicit specification, unqualified-ids
    6702 +could be interpreted as a particular specialization of a templatized
    6703 +function.  Because this non-conforming behavior is no longer the default
    6704 +behavior for G++, @option{-Wnon-template-friend} allows the compiler to
    6705 +check existing code for potential trouble spots and is on by default.
    6706 +This new compiler behavior can be turned off with
    6707 +@option{-Wno-non-template-friend} which keeps the conformant compiler code
    6708 +but disables the helpful warning.
    6709 +
    6710 +@item -Wold-style-cast @r{(C++ and Objective-C++ only)}
    6711 +@opindex Wold-style-cast
    6712 +@opindex Wno-old-style-cast
    6713 +Warn if an old-style (C-style) cast to a non-void type is used within
    6714 +a C++ program.  The new-style casts (@samp{dynamic_cast},
    6715 +@samp{static_cast}, @samp{reinterpret_cast}, and @samp{const_cast}) are
    6716 +less vulnerable to unintended effects and much easier to search for.
    6717 +
    6718 +@item -Woverloaded-virtual @r{(C++ and Objective-C++ only)}
    6719 +@opindex Woverloaded-virtual
    6720 +@opindex Wno-overloaded-virtual
    6721 +@cindex overloaded virtual fn, warning
    6722 +@cindex warning for overloaded virtual fn
    6723 +Warn when a function declaration hides virtual functions from a
    6724 +base class.  For example, in:
    6725 +
    6726 +@smallexample
    6727 +struct A @{
    6728 +  virtual void f();
    6729 +@};
    6730 +
    6731 +struct B: public A @{
    6732 +  void f(int);
    6733 +@};
    6734 +@end smallexample
    6735 +
    6736 +the @code{A} class version of @code{f} is hidden in @code{B}, and code
    6737 +like:
    6738 +
    6739 +@smallexample
    6740 +B* b;
    6741 +b->f();
    6742 +@end smallexample
    6743 +
    6744 +will fail to compile.
    6745 +
    6746 +@item -Wno-pmf-conversions @r{(C++ and Objective-C++ only)}
    6747 +@opindex Wno-pmf-conversions
    6748 +@opindex Wpmf-conversions
    6749 +Disable the diagnostic for converting a bound pointer to member function
    6750 +to a plain pointer.
    6751 +
    6752 +@item -Wsign-promo @r{(C++ and Objective-C++ only)}
    6753 +@opindex Wsign-promo
    6754 +@opindex Wno-sign-promo
    6755 +Warn when overload resolution chooses a promotion from unsigned or
    6756 +enumerated type to a signed type, over a conversion to an unsigned type of
    6757 +the same size.  Previous versions of G++ would try to preserve
    6758 +unsignedness, but the standard mandates the current behavior.
    6759 +
    6760 +@smallexample
    6761 +struct A @{
    6762 +  operator int ();
    6763 +  A& operator = (int);
    6764 +@};
    6765 +
    6766 +main ()
    6767 +@{
    6768 +  A a,b;
    6769 +  a = b;
    6770 +@}
    6771 +@end smallexample
    6772 +
    6773 +In this example, G++ will synthesize a default @samp{A& operator =
    6774 +(const A&);}, while cfront will use the user-defined @samp{operator =}.
    6775 +@end table
    6776 +
    6777 +@node Objective-C and Objective-C++ Dialect Options
    6778 +@section Options Controlling Objective-C and Objective-C++ Dialects
    6779 +
    6780 +@cindex compiler options, Objective-C and Objective-C++
    6781 +@cindex Objective-C and Objective-C++ options, command line
    6782 +@cindex options, Objective-C and Objective-C++
    6783 +(NOTE: This manual does not describe the Objective-C and Objective-C++
    6784 +languages themselves.  See @xref{Standards,,Language Standards
    6785 +Supported by GCC}, for references.)
    6786 +
    6787 +This section describes the command-line options that are only meaningful
    6788 +for Objective-C and Objective-C++ programs, but you can also use most of
    6789 +the language-independent GNU compiler options.
    6790 +For example, you might compile a file @code{some_class.m} like this:
    6791 +
    6792 +@smallexample
    6793 +gcc -g -fgnu-runtime -O -c some_class.m
    6794 +@end smallexample
    6795 +
    6796 +@noindent
    6797 +In this example, @option{-fgnu-runtime} is an option meant only for
    6798 +Objective-C and Objective-C++ programs; you can use the other options with
    6799 +any language supported by GCC@.
    6800 +
    6801 +Note that since Objective-C is an extension of the C language, Objective-C
    6802 +compilations may also use options specific to the C front-end (e.g.,
    6803 +@option{-Wtraditional}).  Similarly, Objective-C++ compilations may use
    6804 +C++-specific options (e.g., @option{-Wabi}).
    6805 +
    6806 +Here is a list of options that are @emph{only} for compiling Objective-C
    6807 +and Objective-C++ programs:
    6808 +
    6809 +@table @gcctabopt
    6810 +@item -fconstant-string-class=@var{class-name}
    6811 +@opindex fconstant-string-class
    6812 +Use @var{class-name} as the name of the class to instantiate for each
    6813 +literal string specified with the syntax @code{@@"@dots{}"}.  The default
    6814 +class name is @code{NXConstantString} if the GNU runtime is being used, and
    6815 +@code{NSConstantString} if the NeXT runtime is being used (see below).  The
    6816 +@option{-fconstant-cfstrings} option, if also present, will override the
    6817 +@option{-fconstant-string-class} setting and cause @code{@@"@dots{}"} literals
    6818 +to be laid out as constant CoreFoundation strings.
    6819 +
    6820 +@item -fgnu-runtime
    6821 +@opindex fgnu-runtime
    6822 +Generate object code compatible with the standard GNU Objective-C
    6823 +runtime.  This is the default for most types of systems.
    6824 +
    6825 +@item -fnext-runtime
    6826 +@opindex fnext-runtime
    6827 +Generate output compatible with the NeXT runtime.  This is the default
    6828 +for NeXT-based systems, including Darwin and Mac OS X@.  The macro
    6829 +@code{__NEXT_RUNTIME__} is predefined if (and only if) this option is
    6830 +used.
    6831 +
    6832 +@item -fno-nil-receivers
    6833 +@opindex fno-nil-receivers
    6834 +Assume that all Objective-C message dispatches (e.g.,
    6835 +@code{[receiver message:arg]}) in this translation unit ensure that the receiver
    6836 +is not @code{nil}.  This allows for more efficient entry points in the runtime
    6837 +to be used.  Currently, this option is only available in conjunction with
    6838 +the NeXT runtime on Mac OS X 10.3 and later.
    6839 +
    6840 +@item -fobjc-call-cxx-cdtors
    6841 +@opindex fobjc-call-cxx-cdtors
    6842 +For each Objective-C class, check if any of its instance variables is a
    6843 +C++ object with a non-trivial default constructor.  If so, synthesize a
    6844 +special @code{- (id) .cxx_construct} instance method that will run
    6845 +non-trivial default constructors on any such instance variables, in order,
    6846 +and then return @code{self}.  Similarly, check if any instance variable
    6847 +is a C++ object with a non-trivial destructor, and if so, synthesize a
    6848 +special @code{- (void) .cxx_destruct} method that will run
    6849 +all such default destructors, in reverse order.
    6850 +
    6851 +The @code{- (id) .cxx_construct} and/or @code{- (void) .cxx_destruct} methods
    6852 +thusly generated will only operate on instance variables declared in the
    6853 +current Objective-C class, and not those inherited from superclasses.  It
    6854 +is the responsibility of the Objective-C runtime to invoke all such methods
    6855 +in an object's inheritance hierarchy.  The @code{- (id) .cxx_construct} methods
    6856 +will be invoked by the runtime immediately after a new object
    6857 +instance is allocated; the @code{- (void) .cxx_destruct} methods will
    6858 +be invoked immediately before the runtime deallocates an object instance.
    6859 +
    6860 +As of this writing, only the NeXT runtime on Mac OS X 10.4 and later has
    6861 +support for invoking the @code{- (id) .cxx_construct} and
    6862 +@code{- (void) .cxx_destruct} methods.
    6863 +
    6864 +@item -fobjc-direct-dispatch
    6865 +@opindex fobjc-direct-dispatch
    6866 +Allow fast jumps to the message dispatcher.  On Darwin this is
    6867 +accomplished via the comm page.
    6868 +
    6869 +@item -fobjc-exceptions
    6870 +@opindex fobjc-exceptions
    6871 +Enable syntactic support for structured exception handling in Objective-C,
    6872 +similar to what is offered by C++ and Java.  This option is
    6873 +unavailable in conjunction with the NeXT runtime on Mac OS X 10.2 and
    6874 +earlier.
    6875 +
    6876 +@smallexample
    6877 +  @@try @{
    6878 +    @dots{}
    6879 +       @@throw expr;
    6880 +    @dots{}
    6881 +  @}
    6882 +  @@catch (AnObjCClass *exc) @{
    6883 +    @dots{}
    6884 +      @@throw expr;
    6885 +    @dots{}
    6886 +      @@throw;
    6887 +    @dots{}
    6888 +  @}
    6889 +  @@catch (AnotherClass *exc) @{
    6890 +    @dots{}
    6891 +  @}
    6892 +  @@catch (id allOthers) @{
    6893 +    @dots{}
    6894 +  @}
    6895 +  @@finally @{
    6896 +    @dots{}
    6897 +      @@throw expr;
    6898 +    @dots{}
    6899 +  @}
    6900 +@end smallexample
    6901 +
    6902 +The @code{@@throw} statement may appear anywhere in an Objective-C or
    6903 +Objective-C++ program; when used inside of a @code{@@catch} block, the
    6904 +@code{@@throw} may appear without an argument (as shown above), in which case
    6905 +the object caught by the @code{@@catch} will be rethrown.
    6906 +
    6907 +Note that only (pointers to) Objective-C objects may be thrown and
    6908 +caught using this scheme.  When an object is thrown, it will be caught
    6909 +by the nearest @code{@@catch} clause capable of handling objects of that type,
    6910 +analogously to how @code{catch} blocks work in C++ and Java.  A
    6911 +@code{@@catch(id @dots{})} clause (as shown above) may also be provided to catch
    6912 +any and all Objective-C exceptions not caught by previous @code{@@catch}
    6913 +clauses (if any).
    6914 +
    6915 +The @code{@@finally} clause, if present, will be executed upon exit from the
    6916 +immediately preceding @code{@@try @dots{} @@catch} section.  This will happen
    6917 +regardless of whether any exceptions are thrown, caught or rethrown
    6918 +inside the @code{@@try @dots{} @@catch} section, analogously to the behavior
    6919 +of the @code{finally} clause in Java.
    6920 +
    6921 +There are several caveats to using the new exception mechanism:
    6922 +
    6923 +@itemize @bullet
    6924 +@item
    6925 +Although currently designed to be binary compatible with @code{NS_HANDLER}-style
    6926 +idioms provided by the @code{NSException} class, the new
    6927 +exceptions can only be used on Mac OS X 10.3 (Panther) and later
    6928 +systems, due to additional functionality needed in the (NeXT) Objective-C
    6929 +runtime.
    6930 +
    6931 +@item
    6932 +As mentioned above, the new exceptions do not support handling
    6933 +types other than Objective-C objects.   Furthermore, when used from
    6934 +Objective-C++, the Objective-C exception model does not interoperate with C++
    6935 +exceptions at this time.  This means you cannot @code{@@throw} an exception
    6936 +from Objective-C and @code{catch} it in C++, or vice versa
    6937 +(i.e., @code{throw @dots{} @@catch}).
    6938 +@end itemize
    6939 +
    6940 +The @option{-fobjc-exceptions} switch also enables the use of synchronization
    6941 +blocks for thread-safe execution:
    6942 +
    6943 +@smallexample
    6944 +  @@synchronized (ObjCClass *guard) @{
    6945 +    @dots{}
    6946 +  @}
    6947 +@end smallexample
    6948 +
    6949 +Upon entering the @code{@@synchronized} block, a thread of execution shall
    6950 +first check whether a lock has been placed on the corresponding @code{guard}
    6951 +object by another thread.  If it has, the current thread shall wait until
    6952 +the other thread relinquishes its lock.  Once @code{guard} becomes available,
    6953 +the current thread will place its own lock on it, execute the code contained in
    6954 +the @code{@@synchronized} block, and finally relinquish the lock (thereby
    6955 +making @code{guard} available to other threads).
    6956 +
    6957 +Unlike Java, Objective-C does not allow for entire methods to be marked
    6958 +@code{@@synchronized}.  Note that throwing exceptions out of
    6959 +@code{@@synchronized} blocks is allowed, and will cause the guarding object
    6960 +to be unlocked properly.
    6961 +
    6962 +@item -fobjc-gc
    6963 +@opindex fobjc-gc
    6964 +Enable garbage collection (GC) in Objective-C and Objective-C++ programs.
    6965 +
    6966 +@item -freplace-objc-classes
    6967 +@opindex freplace-objc-classes
    6968 +Emit a special marker instructing @command{ld(1)} not to statically link in
    6969 +the resulting object file, and allow @command{dyld(1)} to load it in at
    6970 +run time instead.  This is used in conjunction with the Fix-and-Continue
    6971 +debugging mode, where the object file in question may be recompiled and
    6972 +dynamically reloaded in the course of program execution, without the need
    6973 +to restart the program itself.  Currently, Fix-and-Continue functionality
    6974 +is only available in conjunction with the NeXT runtime on Mac OS X 10.3
    6975 +and later.
    6976 +
    6977 +@item -fzero-link
    6978 +@opindex fzero-link
    6979 +When compiling for the NeXT runtime, the compiler ordinarily replaces calls
    6980 +to @code{objc_getClass("@dots{}")} (when the name of the class is known at
    6981 +compile time) with static class references that get initialized at load time,
    6982 +which improves run-time performance.  Specifying the @option{-fzero-link} flag
    6983 +suppresses this behavior and causes calls to @code{objc_getClass("@dots{}")}
    6984 +to be retained.  This is useful in Zero-Link debugging mode, since it allows
    6985 +for individual class implementations to be modified during program execution.
    6986 +
    6987 +@item -gen-decls
    6988 +@opindex gen-decls
    6989 +Dump interface declarations for all classes seen in the source file to a
    6990 +file named @file{@var{sourcename}.decl}.
    6991 +
    6992 +@item -Wassign-intercept @r{(Objective-C and Objective-C++ only)}
    6993 +@opindex Wassign-intercept
    6994 +@opindex Wno-assign-intercept
    6995 +Warn whenever an Objective-C assignment is being intercepted by the
    6996 +garbage collector.
    6997 +
    6998 +@item -Wno-protocol @r{(Objective-C and Objective-C++ only)}
    6999 +@opindex Wno-protocol
    7000 +@opindex Wprotocol
    7001 +If a class is declared to implement a protocol, a warning is issued for
    7002 +every method in the protocol that is not implemented by the class.  The
    7003 +default behavior is to issue a warning for every method not explicitly
    7004 +implemented in the class, even if a method implementation is inherited
    7005 +from the superclass.  If you use the @option{-Wno-protocol} option, then
    7006 +methods inherited from the superclass are considered to be implemented,
    7007 +and no warning is issued for them.
    7008 +
    7009 +@item -Wselector @r{(Objective-C and Objective-C++ only)}
    7010 +@opindex Wselector
    7011 +@opindex Wno-selector
    7012 +Warn if multiple methods of different types for the same selector are
    7013 +found during compilation.  The check is performed on the list of methods
    7014 +in the final stage of compilation.  Additionally, a check is performed
    7015 +for each selector appearing in a @code{@@selector(@dots{})}
    7016 +expression, and a corresponding method for that selector has been found
    7017 +during compilation.  Because these checks scan the method table only at
    7018 +the end of compilation, these warnings are not produced if the final
    7019 +stage of compilation is not reached, for example because an error is
    7020 +found during compilation, or because the @option{-fsyntax-only} option is
    7021 +being used.
    7022 +
    7023 +@item -Wstrict-selector-match @r{(Objective-C and Objective-C++ only)}
    7024 +@opindex Wstrict-selector-match
    7025 +@opindex Wno-strict-selector-match
    7026 +Warn if multiple methods with differing argument and/or return types are
    7027 +found for a given selector when attempting to send a message using this
    7028 +selector to a receiver of type @code{id} or @code{Class}.  When this flag
    7029 +is off (which is the default behavior), the compiler will omit such warnings
    7030 +if any differences found are confined to types which share the same size
    7031 +and alignment.
    7032 +
    7033 +@item -Wundeclared-selector @r{(Objective-C and Objective-C++ only)}
    7034 +@opindex Wundeclared-selector
    7035 +@opindex Wno-undeclared-selector
    7036 +Warn if a @code{@@selector(@dots{})} expression referring to an
    7037 +undeclared selector is found.  A selector is considered undeclared if no
    7038 +method with that name has been declared before the
    7039 +@code{@@selector(@dots{})} expression, either explicitly in an
    7040 +@code{@@interface} or @code{@@protocol} declaration, or implicitly in
    7041 +an @code{@@implementation} section.  This option always performs its
    7042 +checks as soon as a @code{@@selector(@dots{})} expression is found,
    7043 +while @option{-Wselector} only performs its checks in the final stage of
    7044 +compilation.  This also enforces the coding style convention
    7045 +that methods and selectors must be declared before being used.
    7046 +
    7047 +@item -print-objc-runtime-info
    7048 +@opindex print-objc-runtime-info
    7049 +Generate C header describing the largest structure that is passed by
    7050 +value, if any.
    7051 +
    7052 +@end table
    7053 +
    7054 +@node Language Independent Options
    7055 +@section Options to Control Diagnostic Messages Formatting
    7056 +@cindex options to control diagnostics formatting
    7057 +@cindex diagnostic messages
    7058 +@cindex message formatting
    7059 +
    7060 +Traditionally, diagnostic messages have been formatted irrespective of
    7061 +the output device's aspect (e.g.@: its width, @dots{}).  The options described
    7062 +below can be used to control the diagnostic messages formatting
    7063 +algorithm, e.g.@: how many characters per line, how often source location
    7064 +information should be reported.  Right now, only the C++ front end can
    7065 +honor these options.  However it is expected, in the near future, that
    7066 +the remaining front ends would be able to digest them correctly.
    7067 +
    7068 +@table @gcctabopt
    7069 +@item -fmessage-length=@var{n}
    7070 +@opindex fmessage-length
    7071 +Try to format error messages so that they fit on lines of about @var{n}
    7072 +characters.  The default is 72 characters for @command{g++} and 0 for the rest of
    7073 +the front ends supported by GCC@.  If @var{n} is zero, then no
    7074 +line-wrapping will be done; each error message will appear on a single
    7075 +line.
    7076 +
    7077 +@opindex fdiagnostics-show-location
    7078 +@item -fdiagnostics-show-location=once
    7079 +Only meaningful in line-wrapping mode.  Instructs the diagnostic messages
    7080 +reporter to emit @emph{once} source location information; that is, in
    7081 +case the message is too long to fit on a single physical line and has to
    7082 +be wrapped, the source location won't be emitted (as prefix) again,
    7083 +over and over, in subsequent continuation lines.  This is the default
    7084 +behavior.
    7085 +
    7086 +@item -fdiagnostics-show-location=every-line
    7087 +Only meaningful in line-wrapping mode.  Instructs the diagnostic
    7088 +messages reporter to emit the same source location information (as
    7089 +prefix) for physical lines that result from the process of breaking
    7090 +a message which is too long to fit on a single line.
    7091 +
    7092 +@item -fdiagnostics-show-option
    7093 +@opindex fdiagnostics-show-option
    7094 +This option instructs the diagnostic machinery to add text to each
    7095 +diagnostic emitted, which indicates which command line option directly
    7096 +controls that diagnostic, when such an option is known to the
    7097 +diagnostic machinery.
    7098 +
    7099 +@item -Wcoverage-mismatch
    7100 +@opindex Wcoverage-mismatch
    7101 +Warn if feedback profiles do not match when using the
    7102 +@option{-fprofile-use} option.
    7103 +If a source file was changed between @option{-fprofile-gen} and
    7104 +@option{-fprofile-use}, the files with the profile feedback can fail
    7105 +to match the source file and GCC can not use the profile feedback
    7106 +information.  By default, GCC emits an error message in this case.
    7107 +The option @option{-Wcoverage-mismatch} emits a warning instead of an
    7108 +error.  GCC does not use appropriate feedback profiles, so using this
    7109 +option can result in poorly optimized code.  This option is useful
    7110 +only in the case of very minor changes such as bug fixes to an
    7111 +existing code-base.
    7112 +
    7113 +@end table
    7114 +
    7115 +@node Warning Options
    7116 +@section Options to Request or Suppress Warnings
    7117 +@cindex options to control warnings
    7118 +@cindex warning messages
    7119 +@cindex messages, warning
    7120 +@cindex suppressing warnings
    7121 +
    7122 +Warnings are diagnostic messages that report constructions which
    7123 +are not inherently erroneous but which are risky or suggest there
    7124 +may have been an error.
    7125 +
    7126 +The following language-independent options do not enable specific
    7127 +warnings but control the kinds of diagnostics produced by GCC.
    7128 +
    7129 +@table @gcctabopt
    7130 +@cindex syntax checking
    7131 +@item -fsyntax-only
    7132 +@opindex fsyntax-only
    7133 +Check the code for syntax errors, but don't do anything beyond that.
    7134 +
    7135 +@item -w
    7136 +@opindex w
    7137 +Inhibit all warning messages.
    7138 +
    7139 +@item -Werror
    7140 +@opindex Werror
    7141 +@opindex Wno-error
    7142 +Make all warnings into errors.
    7143 +
    7144 +@item -Werror=
    7145 +@opindex Werror=
    7146 +@opindex Wno-error=
    7147 +Make the specified warning into an error.  The specifier for a warning
    7148 +is appended, for example @option{-Werror=switch} turns the warnings
    7149 +controlled by @option{-Wswitch} into errors.  This switch takes a
    7150 +negative form, to be used to negate @option{-Werror} for specific
    7151 +warnings, for example @option{-Wno-error=switch} makes
    7152 +@option{-Wswitch} warnings not be errors, even when @option{-Werror}
    7153 +is in effect.  You can use the @option{-fdiagnostics-show-option}
    7154 +option to have each controllable warning amended with the option which
    7155 +controls it, to determine what to use with this option.
    7156 +
    7157 +Note that specifying @option{-Werror=}@var{foo} automatically implies
    7158 +@option{-W}@var{foo}.  However, @option{-Wno-error=}@var{foo} does not
    7159 +imply anything.
    7160 +
    7161 +@item -Wfatal-errors
    7162 +@opindex Wfatal-errors
    7163 +@opindex Wno-fatal-errors
    7164 +This option causes the compiler to abort compilation on the first error
    7165 +occurred rather than trying to keep going and printing further error
    7166 +messages.
    7167 +
    7168 +@end table
    7169 +
    7170 +You can request many specific warnings with options beginning
    7171 +@samp{-W}, for example @option{-Wimplicit} to request warnings on
    7172 +implicit declarations.  Each of these specific warning options also
    7173 +has a negative form beginning @samp{-Wno-} to turn off warnings; for
    7174 +example, @option{-Wno-implicit}.  This manual lists only one of the
    7175 +two forms, whichever is not the default.  For further,
    7176 +language-specific options also refer to @ref{C++ Dialect Options} and
    7177 +@ref{Objective-C and Objective-C++ Dialect Options}.
    7178 +
    7179 +@table @gcctabopt
    7180 +@item -pedantic
    7181 +@opindex pedantic
    7182 +Issue all the warnings demanded by strict ISO C and ISO C++;
    7183 +reject all programs that use forbidden extensions, and some other
    7184 +programs that do not follow ISO C and ISO C++.  For ISO C, follows the
    7185 +version of the ISO C standard specified by any @option{-std} option used.
    7186 +
    7187 +Valid ISO C and ISO C++ programs should compile properly with or without
    7188 +this option (though a rare few will require @option{-ansi} or a
    7189 +@option{-std} option specifying the required version of ISO C)@.  However,
    7190 +without this option, certain GNU extensions and traditional C and C++
    7191 +features are supported as well.  With this option, they are rejected.
    7192 +
    7193 +@option{-pedantic} does not cause warning messages for use of the
    7194 +alternate keywords whose names begin and end with @samp{__}.  Pedantic
    7195 +warnings are also disabled in the expression that follows
    7196 +@code{__extension__}.  However, only system header files should use
    7197 +these escape routes; application programs should avoid them.
    7198 +@xref{Alternate Keywords}.
    7199 +
    7200 +Some users try to use @option{-pedantic} to check programs for strict ISO
    7201 +C conformance.  They soon find that it does not do quite what they want:
    7202 +it finds some non-ISO practices, but not all---only those for which
    7203 +ISO C @emph{requires} a diagnostic, and some others for which
    7204 +diagnostics have been added.
    7205 +
    7206 +A feature to report any failure to conform to ISO C might be useful in
    7207 +some instances, but would require considerable additional work and would
    7208 +be quite different from @option{-pedantic}.  We don't have plans to
    7209 +support such a feature in the near future.
    7210 +
    7211 +Where the standard specified with @option{-std} represents a GNU
    7212 +extended dialect of C, such as @samp{gnu89} or @samp{gnu99}, there is a
    7213 +corresponding @dfn{base standard}, the version of ISO C on which the GNU
    7214 +extended dialect is based.  Warnings from @option{-pedantic} are given
    7215 +where they are required by the base standard.  (It would not make sense
    7216 +for such warnings to be given only for features not in the specified GNU
    7217 +C dialect, since by definition the GNU dialects of C include all
    7218 +features the compiler supports with the given option, and there would be
    7219 +nothing to warn about.)
    7220 +
    7221 +@item -pedantic-errors
    7222 +@opindex pedantic-errors
    7223 +Like @option{-pedantic}, except that errors are produced rather than
    7224 +warnings.
    7225 +
    7226 +@item -Wall
    7227 +@opindex Wall
    7228 +@opindex Wno-all
    7229 +This enables all the warnings about constructions that some users
    7230 +consider questionable, and that are easy to avoid (or modify to
    7231 +prevent the warning), even in conjunction with macros.  This also
    7232 +enables some language-specific warnings described in @ref{C++ Dialect
    7233 +Options} and @ref{Objective-C and Objective-C++ Dialect Options}.
    7234 +
    7235 +@option{-Wall} turns on the following warning flags:
    7236 +
    7237 +@gccoptlist{-Waddress   @gol
    7238 +-Warray-bounds @r{(only with} @option{-O2}@r{)}  @gol
    7239 +-Wc++0x-compat  @gol
    7240 +-Wchar-subscripts  @gol
    7241 +-Wimplicit-int  @gol
    7242 +-Wimplicit-function-declaration  @gol
    7243 +-Wcomment  @gol
    7244 +-Wformat   @gol
    7245 +-Wmain @r{(only for C/ObjC and unless} @option{-ffreestanding}@r{)}  @gol
    7246 +-Wmissing-braces  @gol
    7247 +-Wnonnull  @gol
    7248 +-Wparentheses  @gol
    7249 +-Wpointer-sign  @gol
    7250 +-Wreorder   @gol
    7251 +-Wreturn-type  @gol
    7252 +-Wsequence-point  @gol
    7253 +-Wsign-compare @r{(only in C++)}  @gol
    7254 +-Wstrict-aliasing  @gol
    7255 +-Wstrict-overflow=1  @gol
    7256 +-Wswitch  @gol
    7257 +-Wtrigraphs  @gol
    7258 +-Wuninitialized  @gol
    7259 +-Wunknown-pragmas  @gol
    7260 +-Wunused-function  @gol
    7261 +-Wunused-label     @gol
    7262 +-Wunused-value     @gol
    7263 +-Wunused-variable  @gol
    7264 +-Wvolatile-register-var @gol
    7265 +}
    7266 +
    7267 +Note that some warning flags are not implied by @option{-Wall}.  Some of
    7268 +them warn about constructions that users generally do not consider
    7269 +questionable, but which occasionally you might wish to check for;
    7270 +others warn about constructions that are necessary or hard to avoid in
    7271 +some cases, and there is no simple way to modify the code to suppress
    7272 +the warning. Some of them are enabled by @option{-Wextra} but many of
    7273 +them must be enabled individually.
    7274 +
    7275 +@item -Wextra
    7276 +@opindex W
    7277 +@opindex Wextra
    7278 +@opindex Wno-extra
    7279 +This enables some extra warning flags that are not enabled by
    7280 +@option{-Wall}. (This option used to be called @option{-W}.  The older
    7281 +name is still supported, but the newer name is more descriptive.)
    7282 +
    7283 +@gccoptlist{-Wclobbered  @gol
    7284 +-Wempty-body  @gol
    7285 +-Wignored-qualifiers @gol
    7286 +-Wmissing-field-initializers  @gol
    7287 +-Wmissing-parameter-type @r{(C only)}  @gol
    7288 +-Wold-style-declaration @r{(C only)}  @gol
    7289 +-Woverride-init  @gol
    7290 +-Wsign-compare  @gol
    7291 +-Wtype-limits  @gol
    7292 +-Wuninitialized  @gol
    7293 +-Wunused-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)}  @gol
    7294 +}
    7295 +
    7296 +The option @option{-Wextra} also prints warning messages for the
    7297 +following cases:
    7298 +
    7299 +@itemize @bullet
    7300 +
    7301 +@item
    7302 +A pointer is compared against integer zero with @samp{<}, @samp{<=},
    7303 +@samp{>}, or @samp{>=}.
    7304 +
    7305 +@item
    7306 +(C++ only) An enumerator and a non-enumerator both appear in a
    7307 +conditional expression.
    7308 +
    7309 +@item
    7310 +(C++ only) Ambiguous virtual bases.
    7311 +
    7312 +@item
    7313 +(C++ only) Subscripting an array which has been declared @samp{register}.
    7314 +
    7315 +@item
    7316 +(C++ only) Taking the address of a variable which has been declared
    7317 +@samp{register}.
    7318 +
    7319 +@item
    7320 +(C++ only) A base class is not initialized in a derived class' copy
    7321 +constructor.
    7322 +
    7323 +@end itemize
    7324 +
    7325 +@item -Wchar-subscripts
    7326 +@opindex Wchar-subscripts
    7327 +@opindex Wno-char-subscripts
    7328 +Warn if an array subscript has type @code{char}.  This is a common cause
    7329 +of error, as programmers often forget that this type is signed on some
    7330 +machines.
    7331 +This warning is enabled by @option{-Wall}.
    7332 +
    7333 +@item -Wcomment
    7334 +@opindex Wcomment
    7335 +@opindex Wno-comment
    7336 +Warn whenever a comment-start sequence @samp{/*} appears in a @samp{/*}
    7337 +comment, or whenever a Backslash-Newline appears in a @samp{//} comment.
    7338 +This warning is enabled by @option{-Wall}.
    7339 +
    7340 +@item -Wformat
    7341 +@opindex Wformat
    7342 +@opindex Wno-format
    7343 +@opindex ffreestanding
    7344 +@opindex fno-builtin
    7345 +Check calls to @code{printf} and @code{scanf}, etc., to make sure that
    7346 +the arguments supplied have types appropriate to the format string
    7347 +specified, and that the conversions specified in the format string make
    7348 +sense.  This includes standard functions, and others specified by format
    7349 +attributes (@pxref{Function Attributes}), in the @code{printf},
    7350 +@code{scanf}, @code{strftime} and @code{strfmon} (an X/Open extension,
    7351 +not in the C standard) families (or other target-specific families).
    7352 +Which functions are checked without format attributes having been
    7353 +specified depends on the standard version selected, and such checks of
    7354 +functions without the attribute specified are disabled by
    7355 +@option{-ffreestanding} or @option{-fno-builtin}.
    7356 +
    7357 +The formats are checked against the format features supported by GNU
    7358 +libc version 2.2.  These include all ISO C90 and C99 features, as well
    7359 +as features from the Single Unix Specification and some BSD and GNU
    7360 +extensions.  Other library implementations may not support all these
    7361 +features; GCC does not support warning about features that go beyond a
    7362 +particular library's limitations.  However, if @option{-pedantic} is used
    7363 +with @option{-Wformat}, warnings will be given about format features not
    7364 +in the selected standard version (but not for @code{strfmon} formats,
    7365 +since those are not in any version of the C standard).  @xref{C Dialect
    7366 +Options,,Options Controlling C Dialect}.
    7367 +
    7368 +Since @option{-Wformat} also checks for null format arguments for
    7369 +several functions, @option{-Wformat} also implies @option{-Wnonnull}.
    7370 +
    7371 +@option{-Wformat} is included in @option{-Wall}.  For more control over some
    7372 +aspects of format checking, the options @option{-Wformat-y2k},
    7373 +@option{-Wno-format-extra-args}, @option{-Wno-format-zero-length},
    7374 +@option{-Wformat-nonliteral}, @option{-Wformat-security}, and
    7375 +@option{-Wformat=2} are available, but are not included in @option{-Wall}.
    7376 +
    7377 +@item -Wformat-y2k
    7378 +@opindex Wformat-y2k
    7379 +@opindex Wno-format-y2k
    7380 +If @option{-Wformat} is specified, also warn about @code{strftime}
    7381 +formats which may yield only a two-digit year.
    7382 +
    7383 +@item -Wno-format-contains-nul
    7384 +@opindex Wno-format-contains-nul
    7385 +@opindex Wformat-contains-nul
    7386 +If @option{-Wformat} is specified, do not warn about format strings that
    7387 +contain NUL bytes.
    7388 +
    7389 +@item -Wno-format-extra-args
    7390 +@opindex Wno-format-extra-args
    7391 +@opindex Wformat-extra-args
    7392 +If @option{-Wformat} is specified, do not warn about excess arguments to a
    7393 +@code{printf} or @code{scanf} format function.  The C standard specifies
    7394 +that such arguments are ignored.
    7395 +
    7396 +Where the unused arguments lie between used arguments that are
    7397 +specified with @samp{$} operand number specifications, normally
    7398 +warnings are still given, since the implementation could not know what
    7399 +type to pass to @code{va_arg} to skip the unused arguments.  However,
    7400 +in the case of @code{scanf} formats, this option will suppress the
    7401 +warning if the unused arguments are all pointers, since the Single
    7402 +Unix Specification says that such unused arguments are allowed.
    7403 +
    7404 +@item -Wno-format-zero-length @r{(C and Objective-C only)}
    7405 +@opindex Wno-format-zero-length
    7406 +@opindex Wformat-zero-length
    7407 +If @option{-Wformat} is specified, do not warn about zero-length formats.
    7408 +The C standard specifies that zero-length formats are allowed.
    7409 +
    7410 +@item -Wformat-nonliteral
    7411 +@opindex Wformat-nonliteral
    7412 +@opindex Wno-format-nonliteral
    7413 +If @option{-Wformat} is specified, also warn if the format string is not a
    7414 +string literal and so cannot be checked, unless the format function
    7415 +takes its format arguments as a @code{va_list}.
    7416 +
    7417 +@item -Wformat-security
    7418 +@opindex Wformat-security
    7419 +@opindex Wno-format-security
    7420 +If @option{-Wformat} is specified, also warn about uses of format
    7421 +functions that represent possible security problems.  At present, this
    7422 +warns about calls to @code{printf} and @code{scanf} functions where the
    7423 +format string is not a string literal and there are no format arguments,
    7424 +as in @code{printf (foo);}.  This may be a security hole if the format
    7425 +string came from untrusted input and contains @samp{%n}.  (This is
    7426 +currently a subset of what @option{-Wformat-nonliteral} warns about, but
    7427 +in future warnings may be added to @option{-Wformat-security} that are not
    7428 +included in @option{-Wformat-nonliteral}.)
    7429 +
    7430 +@item -Wformat=2
    7431 +@opindex Wformat=2
    7432 +@opindex Wno-format=2
    7433 +Enable @option{-Wformat} plus format checks not included in
    7434 +@option{-Wformat}.  Currently equivalent to @samp{-Wformat
    7435 +-Wformat-nonliteral -Wformat-security -Wformat-y2k}.
    7436 +
    7437 +@item -Wnonnull @r{(C and Objective-C only)}
    7438 +@opindex Wnonnull
    7439 +@opindex Wno-nonnull
    7440 +Warn about passing a null pointer for arguments marked as
    7441 +requiring a non-null value by the @code{nonnull} function attribute.
    7442 +
    7443 +@option{-Wnonnull} is included in @option{-Wall} and @option{-Wformat}.  It
    7444 +can be disabled with the @option{-Wno-nonnull} option.
    7445 +
    7446 +@item -Winit-self @r{(C, C++, Objective-C and Objective-C++ only)}
    7447 +@opindex Winit-self
    7448 +@opindex Wno-init-self
    7449 +Warn about uninitialized variables which are initialized with themselves.
    7450 +Note this option can only be used with the @option{-Wuninitialized} option.
    7451 +
    7452 +For example, GCC will warn about @code{i} being uninitialized in the
    7453 +following snippet only when @option{-Winit-self} has been specified:
    7454 +@smallexample
    7455 +@group
    7456 +int f()
    7457 +@{
    7458 +  int i = i;
    7459 +  return i;
    7460 +@}
    7461 +@end group
    7462 +@end smallexample
    7463 +
    7464 +@item -Wimplicit-int @r{(C and Objective-C only)}
    7465 +@opindex Wimplicit-int
    7466 +@opindex Wno-implicit-int
    7467 +Warn when a declaration does not specify a type.
    7468 +This warning is enabled by @option{-Wall}.
    7469 +
    7470 +@item -Wimplicit-function-declaration @r{(C and Objective-C only)}
    7471 +@opindex Wimplicit-function-declaration
    7472 +@opindex Wno-implicit-function-declaration
    7473 +Give a warning whenever a function is used before being declared. In
    7474 +C99 mode (@option{-std=c99} or @option{-std=gnu99}), this warning is
    7475 +enabled by default and it is made into an error by
    7476 +@option{-pedantic-errors}. This warning is also enabled by
    7477 +@option{-Wall}.
    7478 +
    7479 +@item -Wimplicit
    7480 +@opindex Wimplicit
    7481 +@opindex Wno-implicit
    7482 +Same as @option{-Wimplicit-int} and @option{-Wimplicit-function-declaration}.
    7483 +This warning is enabled by @option{-Wall}.
    7484 +
    7485 +@item -Wignored-qualifiers @r{(C and C++ only)}
    7486 +@opindex Wignored-qualifiers
    7487 +@opindex Wno-ignored-qualifiers
    7488 +Warn if the return type of a function has a type qualifier
    7489 +such as @code{const}.  For ISO C such a type qualifier has no effect,
    7490 +since the value returned by a function is not an lvalue.
    7491 +For C++, the warning is only emitted for scalar types or @code{void}.
    7492 +ISO C prohibits qualified @code{void} return types on function
    7493 +definitions, so such return types always receive a warning
    7494 +even without this option.
    7495 +
    7496 +This warning is also enabled by @option{-Wextra}.
    7497 +
    7498 +@item -Wmain
    7499 +@opindex Wmain
    7500 +@opindex Wno-main
    7501 +Warn if the type of @samp{main} is suspicious.  @samp{main} should be
    7502 +a function with external linkage, returning int, taking either zero
    7503 +arguments, two, or three arguments of appropriate types.  This warning
    7504 +is enabled by default in C++ and is enabled by either @option{-Wall}
    7505 +or @option{-pedantic}.
    7506 +
    7507 +@item -Wmissing-braces
    7508 +@opindex Wmissing-braces
    7509 +@opindex Wno-missing-braces
    7510 +Warn if an aggregate or union initializer is not fully bracketed.  In
    7511 +the following example, the initializer for @samp{a} is not fully
    7512 +bracketed, but that for @samp{b} is fully bracketed.
    7513 +
    7514 +@smallexample
    7515 +int a[2][2] = @{ 0, 1, 2, 3 @};
    7516 +int b[2][2] = @{ @{ 0, 1 @}, @{ 2, 3 @} @};
    7517 +@end smallexample
    7518 +
    7519 +This warning is enabled by @option{-Wall}.
    7520 +
    7521 +@item -Wmissing-include-dirs @r{(C, C++, Objective-C and Objective-C++ only)}
    7522 +@opindex Wmissing-include-dirs
    7523 +@opindex Wno-missing-include-dirs
    7524 +Warn if a user-supplied include directory does not exist.
    7525 +
    7526 +@item -Wparentheses
    7527 +@opindex Wparentheses
    7528 +@opindex Wno-parentheses
    7529 +Warn if parentheses are omitted in certain contexts, such
    7530 +as when there is an assignment in a context where a truth value
    7531 +is expected, or when operators are nested whose precedence people
    7532 +often get confused about.
    7533 +
    7534 +Also warn if a comparison like @samp{x<=y<=z} appears; this is
    7535 +equivalent to @samp{(x<=y ? 1 : 0) <= z}, which is a different
    7536 +interpretation from that of ordinary mathematical notation.
    7537 +
    7538 +Also warn about constructions where there may be confusion to which
    7539 +@code{if} statement an @code{else} branch belongs.  Here is an example of
    7540 +such a case:
    7541 +
    7542 +@smallexample
    7543 +@group
    7544 +@{
    7545 +  if (a)
    7546 +    if (b)
    7547 +      foo ();
    7548 +  else
    7549 +    bar ();
    7550 +@}
    7551 +@end group
    7552 +@end smallexample
    7553 +
    7554 +In C/C++, every @code{else} branch belongs to the innermost possible
    7555 +@code{if} statement, which in this example is @code{if (b)}.  This is
    7556 +often not what the programmer expected, as illustrated in the above
    7557 +example by indentation the programmer chose.  When there is the
    7558 +potential for this confusion, GCC will issue a warning when this flag
    7559 +is specified.  To eliminate the warning, add explicit braces around
    7560 +the innermost @code{if} statement so there is no way the @code{else}
    7561 +could belong to the enclosing @code{if}.  The resulting code would
    7562 +look like this:
    7563 +
    7564 +@smallexample
    7565 +@group
    7566 +@{
    7567 +  if (a)
    7568 +    @{
    7569 +      if (b)
    7570 +        foo ();
    7571 +      else
    7572 +        bar ();
    7573 +    @}
    7574 +@}
    7575 +@end group
    7576 +@end smallexample
    7577 +
    7578 +This warning is enabled by @option{-Wall}.
    7579 +
    7580 +@item -Wsequence-point
    7581 +@opindex Wsequence-point
    7582 +@opindex Wno-sequence-point
    7583 +Warn about code that may have undefined semantics because of violations
    7584 +of sequence point rules in the C and C++ standards.
    7585 +
    7586 +The C and C++ standards defines the order in which expressions in a C/C++
    7587 +program are evaluated in terms of @dfn{sequence points}, which represent
    7588 +a partial ordering between the execution of parts of the program: those
    7589 +executed before the sequence point, and those executed after it.  These
    7590 +occur after the evaluation of a full expression (one which is not part
    7591 +of a larger expression), after the evaluation of the first operand of a
    7592 +@code{&&}, @code{||}, @code{? :} or @code{,} (comma) operator, before a
    7593 +function is called (but after the evaluation of its arguments and the
    7594 +expression denoting the called function), and in certain other places.
    7595 +Other than as expressed by the sequence point rules, the order of
    7596 +evaluation of subexpressions of an expression is not specified.  All
    7597 +these rules describe only a partial order rather than a total order,
    7598 +since, for example, if two functions are called within one expression
    7599 +with no sequence point between them, the order in which the functions
    7600 +are called is not specified.  However, the standards committee have
    7601 +ruled that function calls do not overlap.
    7602 +
    7603 +It is not specified when between sequence points modifications to the
    7604 +values of objects take effect.  Programs whose behavior depends on this
    7605 +have undefined behavior; the C and C++ standards specify that ``Between
    7606 +the previous and next sequence point an object shall have its stored
    7607 +value modified at most once by the evaluation of an expression.
    7608 +Furthermore, the prior value shall be read only to determine the value
    7609 +to be stored.''.  If a program breaks these rules, the results on any
    7610 +particular implementation are entirely unpredictable.
    7611 +
    7612 +Examples of code with undefined behavior are @code{a = a++;}, @code{a[n]
    7613 += b[n++]} and @code{a[i++] = i;}.  Some more complicated cases are not
    7614 +diagnosed by this option, and it may give an occasional false positive
    7615 +result, but in general it has been found fairly effective at detecting
    7616 +this sort of problem in programs.
    7617 +
    7618 +The standard is worded confusingly, therefore there is some debate
    7619 +over the precise meaning of the sequence point rules in subtle cases.
    7620 +Links to discussions of the problem, including proposed formal
    7621 +definitions, may be found on the GCC readings page, at
    7622 +@w{@uref{}}.
    7623 +
    7624 +This warning is enabled by @option{-Wall} for C and C++.
    7625 +
    7626 +@item -Wreturn-type
    7627 +@opindex Wreturn-type
    7628 +@opindex Wno-return-type
    7629 +Warn whenever a function is defined with a return-type that defaults
    7630 +to @code{int}.  Also warn about any @code{return} statement with no
    7631 +return-value in a function whose return-type is not @code{void}
    7632 +(falling off the end of the function body is considered returning
    7633 +without a value), and about a @code{return} statement with a
    7634 +expression in a function whose return-type is @code{void}.
    7635 +
    7636 +For C++, a function without return type always produces a diagnostic
    7637 +message, even when @option{-Wno-return-type} is specified.  The only
    7638 +exceptions are @samp{main} and functions defined in system headers.
    7639 +
    7640 +This warning is enabled by @option{-Wall}.
    7641 +
    7642 +@item -Wswitch
    7643 +@opindex Wswitch
    7644 +@opindex Wno-switch
    7645 +Warn whenever a @code{switch} statement has an index of enumerated type
    7646 +and lacks a @code{case} for one or more of the named codes of that
    7647 +enumeration.  (The presence of a @code{default} label prevents this
    7648 +warning.)  @code{case} labels outside the enumeration range also
    7649 +provoke warnings when this option is used.
    7650 +This warning is enabled by @option{-Wall}.
    7651 +
    7652 +@item -Wswitch-default
    7653 +@opindex Wswitch-default
    7654 +@opindex Wno-switch-default
    7655 +Warn whenever a @code{switch} statement does not have a @code{default}
    7656 +case.
    7657 +
    7658 +@item -Wswitch-enum
    7659 +@opindex Wswitch-enum
    7660 +@opindex Wno-switch-enum
    7661 +Warn whenever a @code{switch} statement has an index of enumerated type
    7662 +and lacks a @code{case} for one or more of the named codes of that
    7663 +enumeration.  @code{case} labels outside the enumeration range also
    7664 +provoke warnings when this option is used.
    7665 +
    7666 +@item -Wsync-nand @r{(C and C++ only)}
    7667 +@opindex Wsync-nand
    7668 +@opindex Wno-sync-nand
    7669 +Warn when @code{__sync_fetch_and_nand} and @code{__sync_nand_and_fetch}
    7670 +built-in functions are used.  These functions changed semantics in GCC 4.4.
    7671 +
    7672 +@item -Wtrigraphs
    7673 +@opindex Wtrigraphs
    7674 +@opindex Wno-trigraphs
    7675 +Warn if any trigraphs are encountered that might change the meaning of
    7676 +the program (trigraphs within comments are not warned about).
    7677 +This warning is enabled by @option{-Wall}.
    7678 +
    7679 +@item -Wunused-function
    7680 +@opindex Wunused-function
    7681 +@opindex Wno-unused-function
    7682 +Warn whenever a static function is declared but not defined or a
    7683 +non-inline static function is unused.
    7684 +This warning is enabled by @option{-Wall}.
    7685 +
    7686 +@item -Wunused-label
    7687 +@opindex Wunused-label
    7688 +@opindex Wno-unused-label
    7689 +Warn whenever a label is declared but not used.
    7690 +This warning is enabled by @option{-Wall}.
    7691 +
    7692 +To suppress this warning use the @samp{unused} attribute
    7693 +(@pxref{Variable Attributes}).
    7694 +
    7695 +@item -Wunused-parameter
    7696 +@opindex Wunused-parameter
    7697 +@opindex Wno-unused-parameter
    7698 +Warn whenever a function parameter is unused aside from its declaration.
    7699 +
    7700 +To suppress this warning use the @samp{unused} attribute
    7701 +(@pxref{Variable Attributes}).
    7702 +
    7703 +@item -Wunused-variable
    7704 +@opindex Wunused-variable
    7705 +@opindex Wno-unused-variable
    7706 +Warn whenever a local variable or non-constant static variable is unused
    7707 +aside from its declaration.
    7708 +This warning is enabled by @option{-Wall}.
    7709 +
    7710 +To suppress this warning use the @samp{unused} attribute
    7711 +(@pxref{Variable Attributes}).
    7712 +
    7713 +@item -Wunused-value
    7714 +@opindex Wunused-value
    7715 +@opindex Wno-unused-value
    7716 +Warn whenever a statement computes a result that is explicitly not
    7717 +used. To suppress this warning cast the unused expression to
    7718 +@samp{void}. This includes an expression-statement or the left-hand
    7719 +side of a comma expression that contains no side effects. For example,
    7720 +an expression such as @samp{x[i,j]} will cause a warning, while
    7721 +@samp{x[(void)i,j]} will not.
    7722 +
    7723 +This warning is enabled by @option{-Wall}.
    7724 +
    7725 +@item -Wunused
    7726 +@opindex Wunused
    7727 +@opindex Wno-unused
    7728 +All the above @option{-Wunused} options combined.
    7729 +
    7730 +In order to get a warning about an unused function parameter, you must
    7731 +either specify @samp{-Wextra -Wunused} (note that @samp{-Wall} implies
    7732 +@samp{-Wunused}), or separately specify @option{-Wunused-parameter}.
    7733 +
    7734 +@item -Wuninitialized
    7735 +@opindex Wuninitialized
    7736 +@opindex Wno-uninitialized
    7737 +Warn if an automatic variable is used without first being initialized
    7738 +or if a variable may be clobbered by a @code{setjmp} call. In C++,
    7739 +warn if a non-static reference or non-static @samp{const} member
    7740 +appears in a class without constructors.
    7741 +
    7742 +If you want to warn about code which uses the uninitialized value of the
    7743 +variable in its own initializer, use the @option{-Winit-self} option.
    7744 +
    7745 +These warnings occur for individual uninitialized or clobbered
    7746 +elements of structure, union or array variables as well as for
    7747 +variables which are uninitialized or clobbered as a whole.  They do
    7748 +not occur for variables or elements declared @code{volatile}.  Because
    7749 +these warnings depend on optimization, the exact variables or elements
    7750 +for which there are warnings will depend on the precise optimization
    7751 +options and version of GCC used.
    7752 +
    7753 +Note that there may be no warning about a variable that is used only
    7754 +to compute a value that itself is never used, because such
    7755 +computations may be deleted by data flow analysis before the warnings
    7756 +are printed.
    7757 +
    7758 +These warnings are made optional because GCC is not smart
    7759 +enough to see all the reasons why the code might be correct
    7760 +despite appearing to have an error.  Here is one example of how
    7761 +this can happen:
    7762 +
    7763 +@smallexample
    7764 +@group
    7765 +@{
    7766 +  int x;
    7767 +  switch (y)
    7768 +    @{
    7769 +    case 1: x = 1;
    7770 +      break;
    7771 +    case 2: x = 4;
    7772 +      break;
    7773 +    case 3: x = 5;
    7774 +    @}
    7775 +  foo (x);
    7776 +@}
    7777 +@end group
    7778 +@end smallexample
    7779 +
    7780 +@noindent
    7781 +If the value of @code{y} is always 1, 2 or 3, then @code{x} is
    7782 +always initialized, but GCC doesn't know this.  Here is
    7783 +another common case:
    7784 +
    7785 +@smallexample
    7786 +@{
    7787 +  int save_y;
    7788 +  if (change_y) save_y = y, y = new_y;
    7789 +  @dots{}
    7790 +  if (change_y) y = save_y;
    7791 +@}
    7792 +@end smallexample
    7793 +
    7794 +@noindent
    7795 +This has no bug because @code{save_y} is used only if it is set.
    7796 +
    7797 +@cindex @code{longjmp} warnings
    7798 +This option also warns when a non-volatile automatic variable might be
    7799 +changed by a call to @code{longjmp}.  These warnings as well are possible
    7800 +only in optimizing compilation.
    7801 +
    7802 +The compiler sees only the calls to @code{setjmp}.  It cannot know
    7803 +where @code{longjmp} will be called; in fact, a signal handler could
    7804 +call it at any point in the code.  As a result, you may get a warning
    7805 +even when there is in fact no problem because @code{longjmp} cannot
    7806 +in fact be called at the place which would cause a problem.
    7807 +
    7808 +Some spurious warnings can be avoided if you declare all the functions
    7809 +you use that never return as @code{noreturn}.  @xref{Function
    7810 +Attributes}.
    7811 +
    7812 +This warning is enabled by @option{-Wall} or @option{-Wextra}.
    7813 +
    7814 +@item -Wunknown-pragmas
    7815 +@opindex Wunknown-pragmas
    7816 +@opindex Wno-unknown-pragmas
    7817 +@cindex warning for unknown pragmas
    7818 +@cindex unknown pragmas, warning
    7819 +@cindex pragmas, warning of unknown
    7820 +Warn when a #pragma directive is encountered which is not understood by
    7821 +GCC@.  If this command line option is used, warnings will even be issued
    7822 +for unknown pragmas in system header files.  This is not the case if
    7823 +the warnings were only enabled by the @option{-Wall} command line option.
    7824 +
    7825 +@item -Wno-pragmas
    7826 +@opindex Wno-pragmas
    7827 +@opindex Wpragmas
    7828 +Do not warn about misuses of pragmas, such as incorrect parameters,
    7829 +invalid syntax, or conflicts between pragmas.  See also
    7830 +@samp{-Wunknown-pragmas}.
    7831 +
    7832 +@item -Wstrict-aliasing
    7833 +@opindex Wstrict-aliasing
    7834 +@opindex Wno-strict-aliasing
    7835 +This option is only active when @option{-fstrict-aliasing} is active.
    7836 +It warns about code which might break the strict aliasing rules that the
    7837 +compiler is using for optimization.  The warning does not catch all
    7838 +cases, but does attempt to catch the more common pitfalls.  It is
    7839 +included in @option{-Wall}.
    7840 +It is equivalent to @option{-Wstrict-aliasing=3}
    7841 +
    7842 +@item -Wstrict-aliasing=n
    7843 +@opindex Wstrict-aliasing=n
    7844 +@opindex Wno-strict-aliasing=n
    7845 +This option is only active when @option{-fstrict-aliasing} is active.
    7846 +It warns about code which might break the strict aliasing rules that the
    7847 +compiler is using for optimization.
    7848 +Higher levels correspond to higher accuracy (fewer false positives).
    7849 +Higher levels also correspond to more effort, similar to the way -O works.
    7850 +@option{-Wstrict-aliasing} is equivalent to @option{-Wstrict-aliasing=n},
    7851 +with n=3.
    7852 +
    7853 +Level 1: Most aggressive, quick, least accurate.
    7854 +Possibly useful when higher levels
    7855 +do not warn but -fstrict-aliasing still breaks the code, as it has very few
    7856 +false negatives.  However, it has many false positives.
    7857 +Warns for all pointer conversions between possibly incompatible types,
    7858 +even if never dereferenced.  Runs in the frontend only.
    7859 +
    7860 +Level 2: Aggressive, quick, not too precise.
    7861 +May still have many false positives (not as many as level 1 though),
    7862 +and few false negatives (but possibly more than level 1).
    7863 +Unlike level 1, it only warns when an address is taken.  Warns about
    7864 +incomplete types.  Runs in the frontend only.
    7865 +
    7866 +Level 3 (default for @option{-Wstrict-aliasing}):
    7867 +Should have very few false positives and few false
    7868 +negatives.  Slightly slower than levels 1 or 2 when optimization is enabled.
    7869 +Takes care of the common punn+dereference pattern in the frontend:
    7870 +@code{*(int*)&some_float}.
    7871 +If optimization is enabled, it also runs in the backend, where it deals
    7872 +with multiple statement cases using flow-sensitive points-to information.
    7873 +Only warns when the converted pointer is dereferenced.
    7874 +Does not warn about incomplete types.
    7875 +
    7876 +@item -Wstrict-overflow
    7877 +@itemx -Wstrict-overflow=@var{n}
    7878 +@opindex Wstrict-overflow
    7879 +@opindex Wno-strict-overflow
    7880 +This option is only active when @option{-fstrict-overflow} is active.
    7881 +It warns about cases where the compiler optimizes based on the
    7882 +assumption that signed overflow does not occur.  Note that it does not
    7883 +warn about all cases where the code might overflow: it only warns
    7884 +about cases where the compiler implements some optimization.  Thus
    7885 +this warning depends on the optimization level.
    7886 +
    7887 +An optimization which assumes that signed overflow does not occur is
    7888 +perfectly safe if the values of the variables involved are such that
    7889 +overflow never does, in fact, occur.  Therefore this warning can
    7890 +easily give a false positive: a warning about code which is not
    7891 +actually a problem.  To help focus on important issues, several
    7892 +warning levels are defined.  No warnings are issued for the use of
    7893 +undefined signed overflow when estimating how many iterations a loop
    7894 +will require, in particular when determining whether a loop will be
    7895 +executed at all.
    7896 +
    7897 +@table @gcctabopt
    7898 +@item -Wstrict-overflow=1
    7899 +Warn about cases which are both questionable and easy to avoid.  For
    7900 +example: @code{x + 1 > x}; with @option{-fstrict-overflow}, the
    7901 +compiler will simplify this to @code{1}.  This level of
    7902 +@option{-Wstrict-overflow} is enabled by @option{-Wall}; higher levels
    7903 +are not, and must be explicitly requested.
    7904 +
    7905 +@item -Wstrict-overflow=2
    7906 +Also warn about other cases where a comparison is simplified to a
    7907 +constant.  For example: @code{abs (x) >= 0}.  This can only be
    7908 +simplified when @option{-fstrict-overflow} is in effect, because
    7909 +@code{abs (INT_MIN)} overflows to @code{INT_MIN}, which is less than
    7910 +zero.  @option{-Wstrict-overflow} (with no level) is the same as
    7911 +@option{-Wstrict-overflow=2}.
    7912 +
    7913 +@item -Wstrict-overflow=3
    7914 +Also warn about other cases where a comparison is simplified.  For
    7915 +example: @code{x + 1 > 1} will be simplified to @code{x > 0}.
    7916 +
    7917 +@item -Wstrict-overflow=4
    7918 +Also warn about other simplifications not covered by the above cases.
    7919 +For example: @code{(x * 10) / 5} will be simplified to @code{x * 2}.
    7920 +
    7921 +@item -Wstrict-overflow=5
    7922 +Also warn about cases where the compiler reduces the magnitude of a
    7923 +constant involved in a comparison.  For example: @code{x + 2 > y} will
    7924 +be simplified to @code{x + 1 >= y}.  This is reported only at the
    7925 +highest warning level because this simplification applies to many
    7926 +comparisons, so this warning level will give a very large number of
    7927 +false positives.
    7928 +@end table
    7929 +
    7930 +@item -Warray-bounds
    7931 +@opindex Wno-array-bounds
    7932 +@opindex Warray-bounds
    7933 +This option is only active when @option{-ftree-vrp} is active
    7934 +(default for -O2 and above). It warns about subscripts to arrays
    7935 +that are always out of bounds. This warning is enabled by @option{-Wall}.
    7936 +
    7937 +@item -Wno-div-by-zero
    7938 +@opindex Wno-div-by-zero
    7939 +@opindex Wdiv-by-zero
    7940 +Do not warn about compile-time integer division by zero.  Floating point
    7941 +division by zero is not warned about, as it can be a legitimate way of
    7942 +obtaining infinities and NaNs.
    7943 +
    7944 +@item -Wsystem-headers
    7945 +@opindex Wsystem-headers
    7946 +@opindex Wno-system-headers
    7947 +@cindex warnings from system headers
    7948 +@cindex system headers, warnings from
    7949 +Print warning messages for constructs found in system header files.
    7950 +Warnings from system headers are normally suppressed, on the assumption
    7951 +that they usually do not indicate real problems and would only make the
    7952 +compiler output harder to read.  Using this command line option tells
    7953 +GCC to emit warnings from system headers as if they occurred in user
    7954 +code.  However, note that using @option{-Wall} in conjunction with this
    7955 +option will @emph{not} warn about unknown pragmas in system
    7956 +headers---for that, @option{-Wunknown-pragmas} must also be used.
    7957 +
    7958 +@item -Wfloat-equal
    7959 +@opindex Wfloat-equal
    7960 +@opindex Wno-float-equal
    7961 +Warn if floating point values are used in equality comparisons.
    7962 +
    7963 +The idea behind this is that sometimes it is convenient (for the
    7964 +programmer) to consider floating-point values as approximations to
    7965 +infinitely precise real numbers.  If you are doing this, then you need
    7966 +to compute (by analyzing the code, or in some other way) the maximum or
    7967 +likely maximum error that the computation introduces, and allow for it
    7968 +when performing comparisons (and when producing output, but that's a
    7969 +different problem).  In particular, instead of testing for equality, you
    7970 +would check to see whether the two values have ranges that overlap; and
    7971 +this is done with the relational operators, so equality comparisons are
    7972 +probably mistaken.
    7973 +
    7974 +@item -Wtraditional @r{(C and Objective-C only)}
    7975 +@opindex Wtraditional
    7976 +@opindex Wno-traditional
    7977 +Warn about certain constructs that behave differently in traditional and
    7978 +ISO C@.  Also warn about ISO C constructs that have no traditional C
    7979 +equivalent, and/or problematic constructs which should be avoided.
    7980 +
    7981 +@itemize @bullet
    7982 +@item
    7983 +Macro parameters that appear within string literals in the macro body.
    7984 +In traditional C macro replacement takes place within string literals,
    7985 +but does not in ISO C@.
    7986 +
    7987 +@item
    7988 +In traditional C, some preprocessor directives did not exist.
    7989 +Traditional preprocessors would only consider a line to be a directive
    7990 +if the @samp{#} appeared in column 1 on the line.  Therefore
    7991 +@option{-Wtraditional} warns about directives that traditional C
    7992 +understands but would ignore because the @samp{#} does not appear as the
    7993 +first character on the line.  It also suggests you hide directives like
    7994 +@samp{#pragma} not understood by traditional C by indenting them.  Some
    7995 +traditional implementations would not recognize @samp{#elif}, so it
    7996 +suggests avoiding it altogether.
    7997 +
    7998 +@item
    7999 +A function-like macro that appears without arguments.
    8000 +
    8001 +@item
    8002 +The unary plus operator.
    8003 +
    8004 +@item
    8005 +The @samp{U} integer constant suffix, or the @samp{F} or @samp{L} floating point
    8006 +constant suffixes.  (Traditional C does support the @samp{L} suffix on integer
    8007 +constants.)  Note, these suffixes appear in macros defined in the system
    8008 +headers of most modern systems, e.g.@: the @samp{_MIN}/@samp{_MAX} macros in @code{<limits.h>}.
    8009 +Use of these macros in user code might normally lead to spurious
    8010 +warnings, however GCC's integrated preprocessor has enough context to
    8011 +avoid warning in these cases.
    8012 +
    8013 +@item
    8014 +A function declared external in one block and then used after the end of
    8015 +the block.
    8016 +
    8017 +@item
    8018 +A @code{switch} statement has an operand of type @code{long}.
    8019 +
    8020 +@item
    8021 +A non-@code{static} function declaration follows a @code{static} one.
    8022 +This construct is not accepted by some traditional C compilers.
    8023 +
    8024 +@item
    8025 +The ISO type of an integer constant has a different width or
    8026 +signedness from its traditional type.  This warning is only issued if
    8027 +the base of the constant is ten.  I.e.@: hexadecimal or octal values, which
    8028 +typically represent bit patterns, are not warned about.
    8029 +
    8030 +@item
    8031 +Usage of ISO string concatenation is detected.
    8032 +
    8033 +@item
    8034 +Initialization of automatic aggregates.
    8035 +
    8036 +@item
    8037 +Identifier conflicts with labels.  Traditional C lacks a separate
    8038 +namespace for labels.
    8039 +
    8040 +@item
    8041 +Initialization of unions.  If the initializer is zero, the warning is
    8042 +omitted.  This is done under the assumption that the zero initializer in
    8043 +user code appears conditioned on e.g.@: @code{__STDC__} to avoid missing
    8044 +initializer warnings and relies on default initialization to zero in the
    8045 +traditional C case.
    8046 +
    8047 +@item
    8048 +Conversions by prototypes between fixed/floating point values and vice
    8049 +versa.  The absence of these prototypes when compiling with traditional
    8050 +C would cause serious problems.  This is a subset of the possible
    8051 +conversion warnings, for the full set use @option{-Wtraditional-conversion}.
    8052 +
    8053 +@item
    8054 +Use of ISO C style function definitions.  This warning intentionally is
    8055 +@emph{not} issued for prototype declarations or variadic functions
    8056 +because these ISO C features will appear in your code when using
    8057 +libiberty's traditional C compatibility macros, @code{PARAMS} and
    8058 +@code{VPARAMS}.  This warning is also bypassed for nested functions
    8059 +because that feature is already a GCC extension and thus not relevant to
    8060 +traditional C compatibility.
    8061 +@end itemize
    8062 +
    8063 +@item -Wtraditional-conversion @r{(C and Objective-C only)}
    8064 +@opindex Wtraditional-conversion
    8065 +@opindex Wno-traditional-conversion
    8066 +Warn if a prototype causes a type conversion that is different from what
    8067 +would happen to the same argument in the absence of a prototype.  This
    8068 +includes conversions of fixed point to floating and vice versa, and
    8069 +conversions changing the width or signedness of a fixed point argument
    8070 +except when the same as the default promotion.
    8071 +
    8072 +@item -Wdeclaration-after-statement @r{(C and Objective-C only)}
    8073 +@opindex Wdeclaration-after-statement
    8074 +@opindex Wno-declaration-after-statement
    8075 +Warn when a declaration is found after a statement in a block.  This
    8076 +construct, known from C++, was introduced with ISO C99 and is by default
    8077 +allowed in GCC@.  It is not supported by ISO C90 and was not supported by
    8078 +GCC versions before GCC 3.0.  @xref{Mixed Declarations}.
    8079 +
    8080 +@item -Wundef
    8081 +@opindex Wundef
    8082 +@opindex Wno-undef
    8083 +Warn if an undefined identifier is evaluated in an @samp{#if} directive.
    8084 +
    8085 +@item -Wno-endif-labels
    8086 +@opindex Wno-endif-labels
    8087 +@opindex Wendif-labels
    8088 +Do not warn whenever an @samp{#else} or an @samp{#endif} are followed by text.
    8089 +
    8090 +@item -Wshadow
    8091 +@opindex Wshadow
    8092 +@opindex Wno-shadow
    8093 +Warn whenever a local variable shadows another local variable, parameter or
    8094 +global variable or whenever a built-in function is shadowed.
    8095 +
    8096 +@item -Wlarger-than=@var{len}
    8097 +@opindex Wlarger-than=@var{len}
    8098 +@opindex Wlarger-than-@var{len}
    8099 +Warn whenever an object of larger than @var{len} bytes is defined.
    8100 +
    8101 +@item -Wframe-larger-than=@var{len}
    8102 +@opindex Wframe-larger-than
    8103 +Warn if the size of a function frame is larger than @var{len} bytes.
    8104 +The computation done to determine the stack frame size is approximate
    8105 +and not conservative.
    8106 +The actual requirements may be somewhat greater than @var{len}
    8107 +even if you do not get a warning.  In addition, any space allocated
    8108 +via @code{alloca}, variable-length arrays, or related constructs
    8109 +is not included by the compiler when determining
    8110 +whether or not to issue a warning.
    8111 +
    8112 +@item -Wunsafe-loop-optimizations
    8113 +@opindex Wunsafe-loop-optimizations
    8114 +@opindex Wno-unsafe-loop-optimizations
    8115 +Warn if the loop cannot be optimized because the compiler could not
    8116 +assume anything on the bounds of the loop indices.  With
    8117 +@option{-funsafe-loop-optimizations} warn if the compiler made
    8118 +such assumptions.
    8119 +
    8120 +@item -Wno-pedantic-ms-format @r{(MinGW targets only)}
    8121 +@opindex Wno-pedantic-ms-format
    8122 +@opindex Wpedantic-ms-format
    8123 +Disables the warnings about non-ISO @code{printf} / @code{scanf} format
    8124 +width specifiers @code{I32}, @code{I64}, and @code{I} used on Windows targets
    8125 +depending on the MS runtime, when you are using the options @option{-Wformat}
    8126 +and @option{-pedantic} without gnu-extensions.
    8127 +
    8128 +@item -Wpointer-arith
    8129 +@opindex Wpointer-arith
    8130 +@opindex Wno-pointer-arith
    8131 +Warn about anything that depends on the ``size of'' a function type or
    8132 +of @code{void}.  GNU C assigns these types a size of 1, for
    8133 +convenience in calculations with @code{void *} pointers and pointers
    8134 +to functions.  In C++, warn also when an arithmetic operation involves
    8135 +@code{NULL}.  This warning is also enabled by @option{-pedantic}.
    8136 +
    8137 +@item -Wtype-limits
    8138 +@opindex Wtype-limits
    8139 +@opindex Wno-type-limits
    8140 +Warn if a comparison is always true or always false due to the limited
    8141 +range of the data type, but do not warn for constant expressions.  For
    8142 +example, warn if an unsigned variable is compared against zero with
    8143 +@samp{<} or @samp{>=}.  This warning is also enabled by
    8144 +@option{-Wextra}.
    8145 +
    8146 +@item -Wbad-function-cast @r{(C and Objective-C only)}
    8147 +@opindex Wbad-function-cast
    8148 +@opindex Wno-bad-function-cast
    8149 +Warn whenever a function call is cast to a non-matching type.
    8150 +For example, warn if @code{int malloc()} is cast to @code{anything *}.
    8151 +
    8152 +@item -Wc++-compat @r{(C and Objective-C only)}
    8153 +Warn about ISO C constructs that are outside of the common subset of
    8154 +ISO C and ISO C++, e.g.@: request for implicit conversion from
    8155 +@code{void *} to a pointer to non-@code{void} type.
    8156 +
    8157 +@item -Wc++0x-compat @r{(C++ and Objective-C++ only)}
    8158 +Warn about C++ constructs whose meaning differs between ISO C++ 1998 and
    8159 +ISO C++ 200x, e.g., identifiers in ISO C++ 1998 that will become keywords
    8160 +in ISO C++ 200x.  This warning is enabled by @option{-Wall}.
    8161 +
    8162 +@item -Wcast-qual
    8163 +@opindex Wcast-qual
    8164 +@opindex Wno-cast-qual
    8165 +Warn whenever a pointer is cast so as to remove a type qualifier from
    8166 +the target type.  For example, warn if a @code{const char *} is cast
    8167 +to an ordinary @code{char *}.
    8168 +
    8169 +@item -Wcast-align
    8170 +@opindex Wcast-align
    8171 +@opindex Wno-cast-align
    8172 +Warn whenever a pointer is cast such that the required alignment of the
    8173 +target is increased.  For example, warn if a @code{char *} is cast to
    8174 +an @code{int *} on machines where integers can only be accessed at
    8175 +two- or four-byte boundaries.
    8176 +
    8177 +@item -Wwrite-strings
    8178 +@opindex Wwrite-strings
    8179 +@opindex Wno-write-strings
    8180 +When compiling C, give string constants the type @code{const
    8181 +char[@var{length}]} so that copying the address of one into a
    8182 +non-@code{const} @code{char *} pointer will get a warning.  These
    8183 +warnings will help you find at compile time code that can try to write
    8184 +into a string constant, but only if you have been very careful about
    8185 +using @code{const} in declarations and prototypes.  Otherwise, it will
    8186 +just be a nuisance. This is why we did not make @option{-Wall} request
    8187 +these warnings.
    8188 +
    8189 +When compiling C++, warn about the deprecated conversion from string
    8190 +literals to @code{char *}.  This warning is enabled by default for C++
    8191 +programs.
    8192 +
    8193 +@item -Wclobbered
    8194 +@opindex Wclobbered
    8195 +@opindex Wno-clobbered
    8196 +Warn for variables that might be changed by @samp{longjmp} or
    8197 +@samp{vfork}.  This warning is also enabled by @option{-Wextra}.
    8198 +
    8199 +@item -Wconversion
    8200 +@opindex Wconversion
    8201 +@opindex Wno-conversion
    8202 +Warn for implicit conversions that may alter a value. This includes
    8203 +conversions between real and integer, like @code{abs (x)} when
    8204 +@code{x} is @code{double}; conversions between signed and unsigned,
    8205 +like @code{unsigned ui = -1}; and conversions to smaller types, like
    8206 +@code{sqrtf (M_PI)}. Do not warn for explicit casts like @code{abs
    8207 +((int) x)} and @code{ui = (unsigned) -1}, or if the value is not
    8208 +changed by the conversion like in @code{abs (2.0)}.  Warnings about
    8209 +conversions between signed and unsigned integers can be disabled by
    8210 +using @option{-Wno-sign-conversion}.
    8211 +
    8212 +For C++, also warn for conversions between @code{NULL} and non-pointer
    8213 +types; confusing overload resolution for user-defined conversions; and
    8214 +conversions that will never use a type conversion operator:
    8215 +conversions to @code{void}, the same type, a base class or a reference
    8216 +to them. Warnings about conversions between signed and unsigned
    8217 +integers are disabled by default in C++ unless
    8218 +@option{-Wsign-conversion} is explicitly enabled.
    8219 +
    8220 +@item -Wempty-body
    8221 +@opindex Wempty-body
    8222 +@opindex Wno-empty-body
    8223 +Warn if an empty body occurs in an @samp{if}, @samp{else} or @samp{do
    8224 +while} statement.  This warning is also enabled by @option{-Wextra}.
    8225 +
    8226 +@item -Wenum-compare @r{(C++ and Objective-C++ only)}
    8227 +@opindex Wenum-compare
    8228 +@opindex Wno-enum-compare
    8229 +Warn about a comparison between values of different enum types. This
    8230 +warning is enabled by default.
    8231 +
    8232 +@item -Wsign-compare
    8233 +@opindex Wsign-compare
    8234 +@opindex Wno-sign-compare
    8235 +@cindex warning for comparison of signed and unsigned values
    8236 +@cindex comparison of signed and unsigned values, warning
    8237 +@cindex signed and unsigned values, comparison warning
    8238 +Warn when a comparison between signed and unsigned values could produce
    8239 +an incorrect result when the signed value is converted to unsigned.
    8240 +This warning is also enabled by @option{-Wextra}; to get the other warnings
    8241 +of @option{-Wextra} without this warning, use @samp{-Wextra -Wno-sign-compare}.
    8242 +
    8243 +@item -Wsign-conversion
    8244 +@opindex Wsign-conversion
    8245 +@opindex Wno-sign-conversion
    8246 +Warn for implicit conversions that may change the sign of an integer
    8247 +value, like assigning a signed integer expression to an unsigned
    8248 +integer variable. An explicit cast silences the warning. In C, this
    8249 +option is enabled also by @option{-Wconversion}.
    8250 +
    8251 +@item -Waddress
    8252 +@opindex Waddress
    8253 +@opindex Wno-address
    8254 +Warn about suspicious uses of memory addresses. These include using
    8255 +the address of a function in a conditional expression, such as
    8256 +@code{void func(void); if (func)}, and comparisons against the memory
    8257 +address of a string literal, such as @code{if (x == "abc")}.  Such
    8258 +uses typically indicate a programmer error: the address of a function
    8259 +always evaluates to true, so their use in a conditional usually
    8260 +indicate that the programmer forgot the parentheses in a function
    8261 +call; and comparisons against string literals result in unspecified
    8262 +behavior and are not portable in C, so they usually indicate that the
    8263 +programmer intended to use @code{strcmp}.  This warning is enabled by
    8264 +@option{-Wall}.
    8265 +
    8266 +@item -Wlogical-op
    8267 +@opindex Wlogical-op
    8268 +@opindex Wno-logical-op
    8269 +Warn about suspicious uses of logical operators in expressions.
    8270 +This includes using logical operators in contexts where a
    8271 +bit-wise operator is likely to be expected.
    8272 +
    8273 +@item -Waggregate-return
    8274 +@opindex Waggregate-return
    8275 +@opindex Wno-aggregate-return
    8276 +Warn if any functions that return structures or unions are defined or
    8277 +called.  (In languages where you can return an array, this also elicits
    8278 +a warning.)
    8279 +
    8280 +@item -Wno-attributes
    8281 +@opindex Wno-attributes
    8282 +@opindex Wattributes
    8283 +Do not warn if an unexpected @code{__attribute__} is used, such as
    8284 +unrecognized attributes, function attributes applied to variables,
    8285 +etc.  This will not stop errors for incorrect use of supported
    8286 +attributes.
    8287 +
    8288 +@item -Wno-builtin-macro-redefined
    8289 +@opindex Wno-builtin-macro-redefined
    8290 +@opindex Wbuiltin-macro-redefined
    8291 +Do not warn if certain built-in macros are redefined.  This suppresses
    8292 +warnings for redefinition of @code{__TIMESTAMP__}, @code{__TIME__},
    8293 +@code{__DATE__}, @code{__FILE__}, and @code{__BASE_FILE__}.
    8294 +
    8295 +@item -Wstrict-prototypes @r{(C and Objective-C only)}
    8296 +@opindex Wstrict-prototypes
    8297 +@opindex Wno-strict-prototypes
    8298 +Warn if a function is declared or defined without specifying the
    8299 +argument types.  (An old-style function definition is permitted without
    8300 +a warning if preceded by a declaration which specifies the argument
    8301 +types.)
    8302 +
    8303 +@item -Wold-style-declaration @r{(C and Objective-C only)}
    8304 +@opindex Wold-style-declaration
    8305 +@opindex Wno-old-style-declaration
    8306 +Warn for obsolescent usages, according to the C Standard, in a
    8307 +declaration. For example, warn if storage-class specifiers like
    8308 +@code{static} are not the first things in a declaration.  This warning
    8309 +is also enabled by @option{-Wextra}.
    8310 +
    8311 +@item -Wold-style-definition @r{(C and Objective-C only)}
    8312 +@opindex Wold-style-definition
    8313 +@opindex Wno-old-style-definition
    8314 +Warn if an old-style function definition is used.  A warning is given
    8315 +even if there is a previous prototype.
    8316 +
    8317 +@item -Wmissing-parameter-type @r{(C and Objective-C only)}
    8318 +@opindex Wmissing-parameter-type
    8319 +@opindex Wno-missing-parameter-type
    8320 +A function parameter is declared without a type specifier in K&R-style
    8321 +functions:
    8322 +
    8323 +@smallexample
    8324 +void foo(bar) @{ @}
    8325 +@end smallexample
    8326 +
    8327 +This warning is also enabled by @option{-Wextra}.
    8328 +
    8329 +@item -Wmissing-prototypes @r{(C and Objective-C only)}
    8330 +@opindex Wmissing-prototypes
    8331 +@opindex Wno-missing-prototypes
    8332 +Warn if a global function is defined without a previous prototype
    8333 +declaration.  This warning is issued even if the definition itself
    8334 +provides a prototype.  The aim is to detect global functions that fail
    8335 +to be declared in header files.
    8336 +
    8337 +@item -Wmissing-declarations
    8338 +@opindex Wmissing-declarations
    8339 +@opindex Wno-missing-declarations
    8340 +Warn if a global function is defined without a previous declaration.
    8341 +Do so even if the definition itself provides a prototype.
    8342 +Use this option to detect global functions that are not declared in
    8343 +header files.  In C++, no warnings are issued for function templates,
    8344 +or for inline functions, or for functions in anonymous namespaces.
    8345 +
    8346 +@item -Wmissing-field-initializers
    8347 +@opindex Wmissing-field-initializers
    8348 +@opindex Wno-missing-field-initializers
    8349 +@opindex W
    8350 +@opindex Wextra
    8351 +@opindex Wno-extra
    8352 +Warn if a structure's initializer has some fields missing.  For
    8353 +example, the following code would cause such a warning, because
    8354 +@code{x.h} is implicitly zero:
    8355 +
    8356 +@smallexample
    8357 +struct s @{ int f, g, h; @};
    8358 +struct s x = @{ 3, 4 @};
    8359 +@end smallexample
    8360 +
    8361 +This option does not warn about designated initializers, so the following
    8362 +modification would not trigger a warning:
    8363 +
    8364 +@smallexample
    8365 +struct s @{ int f, g, h; @};
    8366 +struct s x = @{ .f = 3, .g = 4 @};
    8367 +@end smallexample
    8368 +
    8369 +This warning is included in @option{-Wextra}.  To get other @option{-Wextra}
    8370 +warnings without this one, use @samp{-Wextra -Wno-missing-field-initializers}.
    8371 +
    8372 +@item -Wmissing-noreturn
    8373 +@opindex Wmissing-noreturn
    8374 +@opindex Wno-missing-noreturn
    8375 +Warn about functions which might be candidates for attribute @code{noreturn}.
    8376 +Note these are only possible candidates, not absolute ones.  Care should
    8377 +be taken to manually verify functions actually do not ever return before
    8378 +adding the @code{noreturn} attribute, otherwise subtle code generation
    8379 +bugs could be introduced.  You will not get a warning for @code{main} in
    8380 +hosted C environments.
    8381 +
    8382 +@item -Wmissing-format-attribute
    8383 +@opindex Wmissing-format-attribute
    8384 +@opindex Wno-missing-format-attribute
    8385 +@opindex Wformat
    8386 +@opindex Wno-format
    8387 +Warn about function pointers which might be candidates for @code{format}
    8388 +attributes.  Note these are only possible candidates, not absolute ones.
    8389 +GCC will guess that function pointers with @code{format} attributes that
    8390 +are used in assignment, initialization, parameter passing or return
    8391 +statements should have a corresponding @code{format} attribute in the
    8392 +resulting type.  I.e.@: the left-hand side of the assignment or
    8393 +initialization, the type of the parameter variable, or the return type
    8394 +of the containing function respectively should also have a @code{format}
    8395 +attribute to avoid the warning.
    8396 +
    8397 +GCC will also warn about function definitions which might be
    8398 +candidates for @code{format} attributes.  Again, these are only
    8399 +possible candidates.  GCC will guess that @code{format} attributes
    8400 +might be appropriate for any function that calls a function like
    8401 +@code{vprintf} or @code{vscanf}, but this might not always be the
    8402 +case, and some functions for which @code{format} attributes are
    8403 +appropriate may not be detected.
    8404 +
    8405 +@item -Wno-multichar
    8406 +@opindex Wno-multichar
    8407 +@opindex Wmultichar
    8408 +Do not warn if a multicharacter constant (@samp{'FOOF'}) is used.
    8409 +Usually they indicate a typo in the user's code, as they have
    8410 +implementation-defined values, and should not be used in portable code.
    8411 +
    8412 +@item -Wnormalized=<none|id|nfc|nfkc>
    8413 +@opindex Wnormalized=
    8414 +@cindex NFC
    8415 +@cindex NFKC
    8416 +@cindex character set, input normalization
    8417 +In ISO C and ISO C++, two identifiers are different if they are
    8418 +different sequences of characters.  However, sometimes when characters
    8419 +outside the basic ASCII character set are used, you can have two
    8420 +different character sequences that look the same.  To avoid confusion,
    8421 +the ISO 10646 standard sets out some @dfn{normalization rules} which
    8422 +when applied ensure that two sequences that look the same are turned into
    8423 +the same sequence.  GCC can warn you if you are using identifiers which
    8424 +have not been normalized; this option controls that warning.
    8425 +
    8426 +There are four levels of warning that GCC supports.  The default is
    8427 +@option{-Wnormalized=nfc}, which warns about any identifier which is
    8428 +not in the ISO 10646 ``C'' normalized form, @dfn{NFC}.  NFC is the
    8429 +recommended form for most uses.
    8430 +
    8431 +Unfortunately, there are some characters which ISO C and ISO C++ allow
    8432 +in identifiers that when turned into NFC aren't allowable as
    8433 +identifiers.  That is, there's no way to use these symbols in portable
    8434 +ISO C or C++ and have all your identifiers in NFC@.
    8435 +@option{-Wnormalized=id} suppresses the warning for these characters.
    8436 +It is hoped that future versions of the standards involved will correct
    8437 +this, which is why this option is not the default.
    8438 +
    8439 +You can switch the warning off for all characters by writing
    8440 +@option{-Wnormalized=none}.  You would only want to do this if you
    8441 +were using some other normalization scheme (like ``D''), because
    8442 +otherwise you can easily create bugs that are literally impossible to see.
    8443 +
    8444 +Some characters in ISO 10646 have distinct meanings but look identical
    8445 +in some fonts or display methodologies, especially once formatting has
    8446 +been applied.  For instance @code{\u207F}, ``SUPERSCRIPT LATIN SMALL
    8447 +LETTER N'', will display just like a regular @code{n} which has been
    8448 +placed in a superscript.  ISO 10646 defines the @dfn{NFKC}
    8449 +normalization scheme to convert all these into a standard form as
    8450 +well, and GCC will warn if your code is not in NFKC if you use
    8451 +@option{-Wnormalized=nfkc}.  This warning is comparable to warning
    8452 +about every identifier that contains the letter O because it might be
    8453 +confused with the digit 0, and so is not the default, but may be
    8454 +useful as a local coding convention if the programming environment is
    8455 +unable to be fixed to display these characters distinctly.
    8456 +
    8457 +@item -Wno-deprecated
    8458 +@opindex Wno-deprecated
    8459 +@opindex Wdeprecated
    8460 +Do not warn about usage of deprecated features.  @xref{Deprecated Features}.
    8461 +
    8462 +@item -Wno-deprecated-declarations
    8463 +@opindex Wno-deprecated-declarations
    8464 +@opindex Wdeprecated-declarations
    8465 +Do not warn about uses of functions (@pxref{Function Attributes}),
    8466 +variables (@pxref{Variable Attributes}), and types (@pxref{Type
    8467 +Attributes}) marked as deprecated by using the @code{deprecated}
    8468 +attribute.
    8469 +
    8470 +@item -Wno-overflow
    8471 +@opindex Wno-overflow
    8472 +@opindex Woverflow
    8473 +Do not warn about compile-time overflow in constant expressions.
    8474 +
    8475 +@item -Woverride-init @r{(C and Objective-C only)}
    8476 +@opindex Woverride-init
    8477 +@opindex Wno-override-init
    8478 +@opindex W
    8479 +@opindex Wextra
    8480 +@opindex Wno-extra
    8481 +Warn if an initialized field without side effects is overridden when
    8482 +using designated initializers (@pxref{Designated Inits, , Designated
    8483 +Initializers}).
    8484 +
    8485 +This warning is included in @option{-Wextra}.  To get other
    8486 +@option{-Wextra} warnings without this one, use @samp{-Wextra
    8487 +-Wno-override-init}.
    8488 +
    8489 +@item -Wpacked
    8490 +@opindex Wpacked
    8491 +@opindex Wno-packed
    8492 +Warn if a structure is given the packed attribute, but the packed
    8493 +attribute has no effect on the layout or size of the structure.
    8494 +Such structures may be mis-aligned for little benefit.  For
    8495 +instance, in this code, the variable @code{f.x} in @code{struct bar}
    8496 +will be misaligned even though @code{struct bar} does not itself
    8497 +have the packed attribute:
    8498 +
    8499 +@smallexample
    8500 +@group
    8501 +struct foo @{
    8502 +  int x;
    8503 +  char a, b, c, d;
    8504 +@} __attribute__((packed));
    8505 +struct bar @{
    8506 +  char z;
    8507 +  struct foo f;
    8508 +@};
    8509 +@end group
    8510 +@end smallexample
    8511 +
    8512 +@item -Wpacked-bitfield-compat
    8513 +@opindex Wpacked-bitfield-compat
    8514 +@opindex Wno-packed-bitfield-compat
    8515 +The 4.1, 4.2 and 4.3 series of GCC ignore the @code{packed} attribute
    8516 +on bit-fields of type @code{char}.  This has been fixed in GCC 4.4 but
    8517 +the change can lead to differences in the structure layout.  GCC
    8518 +informs you when the offset of such a field has changed in GCC 4.4.
    8519 +For example there is no longer a 4-bit padding between field @code{a}
    8520 +and @code{b} in this structure:
    8521 +
    8522 +@smallexample
    8523 +struct foo
    8524 +@{
    8525 +  char a:4;
    8526 +  char b:8;
    8527 +@} __attribute__ ((packed));
    8528 +@end smallexample
    8529 +
    8530 +This warning is enabled by default.  Use
    8531 +@option{-Wno-packed-bitfield-compat} to disable this warning.
    8532 +
    8533 +@item -Wpadded
    8534 +@opindex Wpadded
    8535 +@opindex Wno-padded
    8536 +Warn if padding is included in a structure, either to align an element
    8537 +of the structure or to align the whole structure.  Sometimes when this
    8538 +happens it is possible to rearrange the fields of the structure to
    8539 +reduce the padding and so make the structure smaller.
    8540 +
    8541 +@item -Wredundant-decls
    8542 +@opindex Wredundant-decls
    8543 +@opindex Wno-redundant-decls
    8544 +Warn if anything is declared more than once in the same scope, even in
    8545 +cases where multiple declaration is valid and changes nothing.
    8546 +
    8547 +@item -Wnested-externs @r{(C and Objective-C only)}
    8548 +@opindex Wnested-externs
    8549 +@opindex Wno-nested-externs
    8550 +Warn if an @code{extern} declaration is encountered within a function.
    8551 +
    8552 +@item -Wunreachable-code
    8553 +@opindex Wunreachable-code
    8554 +@opindex Wno-unreachable-code
    8555 +Warn if the compiler detects that code will never be executed.
    8556 +
    8557 +This option is intended to warn when the compiler detects that at
    8558 +least a whole line of source code will never be executed, because
    8559 +some condition is never satisfied or because it is after a
    8560 +procedure that never returns.
    8561 +
    8562 +It is possible for this option to produce a warning even though there
    8563 +are circumstances under which part of the affected line can be executed,
    8564 +so care should be taken when removing apparently-unreachable code.
    8565 +
    8566 +For instance, when a function is inlined, a warning may mean that the
    8567 +line is unreachable in only one inlined copy of the function.
    8568 +
    8569 +This option is not made part of @option{-Wall} because in a debugging
    8570 +version of a program there is often substantial code which checks
    8571 +correct functioning of the program and is, hopefully, unreachable
    8572 +because the program does work.  Another common use of unreachable
    8573 +code is to provide behavior which is selectable at compile-time.
    8574 +
    8575 +@item -Winline
    8576 +@opindex Winline
    8577 +@opindex Wno-inline
    8578 +Warn if a function can not be inlined and it was declared as inline.
    8579 +Even with this option, the compiler will not warn about failures to
    8580 +inline functions declared in system headers.
    8581 +
    8582 +The compiler uses a variety of heuristics to determine whether or not
    8583 +to inline a function.  For example, the compiler takes into account
    8584 +the size of the function being inlined and the amount of inlining
    8585 +that has already been done in the current function.  Therefore,
    8586 +seemingly insignificant changes in the source program can cause the
    8587 +warnings produced by @option{-Winline} to appear or disappear.
    8588 +
    8589 +@item -Wno-invalid-offsetof @r{(C++ and Objective-C++ only)}
    8590 +@opindex Wno-invalid-offsetof
    8591 +@opindex Winvalid-offsetof
    8592 +Suppress warnings from applying the @samp{offsetof} macro to a non-POD
    8593 +type.  According to the 1998 ISO C++ standard, applying @samp{offsetof}
    8594 +to a non-POD type is undefined.  In existing C++ implementations,
    8595 +however, @samp{offsetof} typically gives meaningful results even when
    8596 +applied to certain kinds of non-POD types. (Such as a simple
    8597 +@samp{struct} that fails to be a POD type only by virtue of having a
    8598 +constructor.)  This flag is for users who are aware that they are
    8599 +writing nonportable code and who have deliberately chosen to ignore the
    8600 +warning about it.
    8601 +
    8602 +The restrictions on @samp{offsetof} may be relaxed in a future version
    8603 +of the C++ standard.
    8604 +
    8605 +@item -Wno-int-to-pointer-cast @r{(C and Objective-C only)}
    8606 +@opindex Wno-int-to-pointer-cast
    8607 +@opindex Wint-to-pointer-cast
    8608 +Suppress warnings from casts to pointer type of an integer of a
    8609 +different size.
    8610 +
    8611 +@item -Wno-pointer-to-int-cast @r{(C and Objective-C only)}
    8612 +@opindex Wno-pointer-to-int-cast
    8613 +@opindex Wpointer-to-int-cast
    8614 +Suppress warnings from casts from a pointer to an integer type of a
    8615 +different size.
    8616 +
    8617 +@item -Winvalid-pch
    8618 +@opindex Winvalid-pch
    8619 +@opindex Wno-invalid-pch
    8620 +Warn if a precompiled header (@pxref{Precompiled Headers}) is found in
    8621 +the search path but can't be used.
    8622 +
    8623 +@item -Wlong-long
    8624 +@opindex Wlong-long
    8625 +@opindex Wno-long-long
    8626 +Warn if @samp{long long} type is used.  This is default.  To inhibit
    8627 +the warning messages, use @option{-Wno-long-long}.  Flags
    8628 +@option{-Wlong-long} and @option{-Wno-long-long} are taken into account
    8629 +only when @option{-pedantic} flag is used.
    8630 +
    8631 +@item -Wvariadic-macros
    8632 +@opindex Wvariadic-macros
    8633 +@opindex Wno-variadic-macros
    8634 +Warn if variadic macros are used in pedantic ISO C90 mode, or the GNU
    8635 +alternate syntax when in pedantic ISO C99 mode.  This is default.
    8636 +To inhibit the warning messages, use @option{-Wno-variadic-macros}.
    8637 +
    8638 +@item -Wvla
    8639 +@opindex Wvla
    8640 +@opindex Wno-vla
    8641 +Warn if variable length array is used in the code.
    8642 +@option{-Wno-vla} will prevent the @option{-pedantic} warning of
    8643 +the variable length array.
    8644 +
    8645 +@item -Wvolatile-register-var
    8646 +@opindex Wvolatile-register-var
    8647 +@opindex Wno-volatile-register-var
    8648 +Warn if a register variable is declared volatile.  The volatile
    8649 +modifier does not inhibit all optimizations that may eliminate reads
    8650 +and/or writes to register variables.  This warning is enabled by
    8651 +@option{-Wall}.
    8652 +
    8653 +@item -Wdisabled-optimization
    8654 +@opindex Wdisabled-optimization
    8655 +@opindex Wno-disabled-optimization
    8656 +Warn if a requested optimization pass is disabled.  This warning does
    8657 +not generally indicate that there is anything wrong with your code; it
    8658 +merely indicates that GCC's optimizers were unable to handle the code
    8659 +effectively.  Often, the problem is that your code is too big or too
    8660 +complex; GCC will refuse to optimize programs when the optimization
    8661 +itself is likely to take inordinate amounts of time.
    8662 +
    8663 +@item -Wpointer-sign @r{(C and Objective-C only)}
    8664 +@opindex Wpointer-sign
    8665 +@opindex Wno-pointer-sign
    8666 +Warn for pointer argument passing or assignment with different signedness.
    8667 +This option is only supported for C and Objective-C@.  It is implied by
    8668 +@option{-Wall} and by @option{-pedantic}, which can be disabled with
    8669 +@option{-Wno-pointer-sign}.
    8670 +
    8671 +@item -Wstack-protector
    8672 +@opindex Wstack-protector
    8673 +@opindex Wno-stack-protector
    8674 +This option is only active when @option{-fstack-protector} is active.  It
    8675 +warns about functions that will not be protected against stack smashing.
    8676 +
    8677 +@item -Wno-mudflap
    8678 +@opindex Wno-mudflap
    8679 +Suppress warnings about constructs that cannot be instrumented by
    8680 +@option{-fmudflap}.
    8681 +
    8682 +@item -Woverlength-strings
    8683 +@opindex Woverlength-strings
    8684 +@opindex Wno-overlength-strings
    8685 +Warn about string constants which are longer than the ``minimum
    8686 +maximum'' length specified in the C standard.  Modern compilers
    8687 +generally allow string constants which are much longer than the
    8688 +standard's minimum limit, but very portable programs should avoid
    8689 +using longer strings.
    8690 +
    8691 +The limit applies @emph{after} string constant concatenation, and does
    8692 +not count the trailing NUL@.  In C89, the limit was 509 characters; in
    8693 +C99, it was raised to 4095.  C++98 does not specify a normative
    8694 +minimum maximum, so we do not diagnose overlength strings in C++@.
    8695 +
    8696 +This option is implied by @option{-pedantic}, and can be disabled with
    8697 +@option{-Wno-overlength-strings}.
    8698 +@end table
    8699 +
    8700 +@node Debugging Options
    8701 +@section Options for Debugging Your Program or GCC
    8702 +@cindex options, debugging
    8703 +@cindex debugging information options
    8704 +
    8705 +GCC has various special options that are used for debugging
    8706 +either your program or GCC:
    8707 +
    8708 +@table @gcctabopt
    8709 +@item -g
    8710 +@opindex g
    8711 +Produce debugging information in the operating system's native format
    8712 +(stabs, COFF, XCOFF, or DWARF 2)@.  GDB can work with this debugging
    8713 +information.
    8714 +
    8715 +On most systems that use stabs format, @option{-g} enables use of extra
    8716 +debugging information that only GDB can use; this extra information
    8717 +makes debugging work better in GDB but will probably make other debuggers
    8718 +crash or
    8719 +refuse to read the program.  If you want to control for certain whether
    8720 +to generate the extra information, use @option{-gstabs+}, @option{-gstabs},
    8721 +@option{-gxcoff+}, @option{-gxcoff}, or @option{-gvms} (see below).
    8722 +
    8723 +GCC allows you to use @option{-g} with
    8724 +@option{-O}.  The shortcuts taken by optimized code may occasionally
    8725 +produce surprising results: some variables you declared may not exist
    8726 +at all; flow of control may briefly move where you did not expect it;
    8727 +some statements may not be executed because they compute constant
    8728 +results or their values were already at hand; some statements may
    8729 +execute in different places because they were moved out of loops.
    8730 +
    8731 +Nevertheless it proves possible to debug optimized output.  This makes
    8732 +it reasonable to use the optimizer for programs that might have bugs.
    8733 +
    8734 +The following options are useful when GCC is generated with the
    8735 +capability for more than one debugging format.
    8736 +
    8737 +@item -ggdb
    8738 +@opindex ggdb
    8739 +Produce debugging information for use by GDB@.  This means to use the
    8740 +most expressive format available (DWARF 2, stabs, or the native format
    8741 +if neither of those are supported), including GDB extensions if at all
    8742 +possible.
    8743 +
    8744 +@item -gstabs
    8745 +@opindex gstabs
    8746 +Produce debugging information in stabs format (if that is supported),
    8747 +without GDB extensions.  This is the format used by DBX on most BSD
    8748 +systems.  On MIPS, Alpha and System V Release 4 systems this option
    8749 +produces stabs debugging output which is not understood by DBX or SDB@.
    8750 +On System V Release 4 systems this option requires the GNU assembler.
    8751 +
    8752 +@item -feliminate-unused-debug-symbols
    8753 +@opindex feliminate-unused-debug-symbols
    8754 +Produce debugging information in stabs format (if that is supported),
    8755 +for only symbols that are actually used.
    8756 +
    8757 +@item -femit-class-debug-always
    8758 +Instead of emitting debugging information for a C++ class in only one
    8759 +object file, emit it in all object files using the class.  This option
    8760 +should be used only with debuggers that are unable to handle the way GCC
    8761 +normally emits debugging information for classes because using this
    8762 +option will increase the size of debugging information by as much as a
    8763 +factor of two.
    8764 +
    8765 +@item -gstabs+
    8766 +@opindex gstabs+
    8767 +Produce debugging information in stabs format (if that is supported),
    8768 +using GNU extensions understood only by the GNU debugger (GDB)@.  The
    8769 +use of these extensions is likely to make other debuggers crash or
    8770 +refuse to read the program.
    8771 +
    8772 +@item -gcoff
    8773 +@opindex gcoff
    8774 +Produce debugging information in COFF format (if that is supported).
    8775 +This is the format used by SDB on most System V systems prior to
    8776 +System V Release 4.
    8777 +
    8778 +@item -gxcoff
    8779 +@opindex gxcoff
    8780 +Produce debugging information in XCOFF format (if that is supported).
    8781 +This is the format used by the DBX debugger on IBM RS/6000 systems.
    8782 +
    8783 +@item -gxcoff+
    8784 +@opindex gxcoff+
    8785 +Produce debugging information in XCOFF format (if that is supported),
    8786 +using GNU extensions understood only by the GNU debugger (GDB)@.  The
    8787 +use of these extensions is likely to make other debuggers crash or
    8788 +refuse to read the program, and may cause assemblers other than the GNU
    8789 +assembler (GAS) to fail with an error.
    8790 +
    8791 +@item -gdwarf-2
    8792 +@opindex gdwarf-2
    8793 +Produce debugging information in DWARF version 2 format (if that is
    8794 +supported).  This is the format used by DBX on IRIX 6.  With this
    8795 +option, GCC uses features of DWARF version 3 when they are useful;
    8796 +version 3 is upward compatible with version 2, but may still cause
    8797 +problems for older debuggers.
    8798 +
    8799 +@item -gvms
    8800 +@opindex gvms
    8801 +Produce debugging information in VMS debug format (if that is
    8802 +supported).  This is the format used by DEBUG on VMS systems.
    8803 +
    8804 +@item -g@var{level}
    8805 +@itemx -ggdb@var{level}
    8806 +@itemx -gstabs@var{level}
    8807 +@itemx -gcoff@var{level}
    8808 +@itemx -gxcoff@var{level}
    8809 +@itemx -gvms@var{level}
    8810 +Request debugging information and also use @var{level} to specify how
    8811 +much information.  The default level is 2.
    8812 +
    8813 +Level 0 produces no debug information at all.  Thus, @option{-g0} negates
    8814 +@option{-g}.
    8815 +
    8816 +Level 1 produces minimal information, enough for making backtraces in
    8817 +parts of the program that you don't plan to debug.  This includes
    8818 +descriptions of functions and external variables, but no information
    8819 +about local variables and no line numbers.
    8820 +
    8821 +Level 3 includes extra information, such as all the macro definitions
    8822 +present in the program.  Some debuggers support macro expansion when
    8823 +you use @option{-g3}.
    8824 +
    8825 +@option{-gdwarf-2} does not accept a concatenated debug level, because
    8826 +GCC used to support an option @option{-gdwarf} that meant to generate
    8827 +debug information in version 1 of the DWARF format (which is very
    8828 +different from version 2), and it would have been too confusing.  That
    8829 +debug format is long obsolete, but the option cannot be changed now.
    8830 +Instead use an additional @option{-g@var{level}} option to change the
    8831 +debug level for DWARF2.
    8832 +
    8833 +@item -feliminate-dwarf2-dups
    8834 +@opindex feliminate-dwarf2-dups
    8835 +Compress DWARF2 debugging information by eliminating duplicated
    8836 +information about each symbol.  This option only makes sense when
    8837 +generating DWARF2 debugging information with @option{-gdwarf-2}.
    8838 +
    8839 +@item -femit-struct-debug-baseonly
    8840 +Emit debug information for struct-like types
    8841 +only when the base name of the compilation source file
    8842 +matches the base name of file in which the struct was defined.
    8843 +
    8844 +This option substantially reduces the size of debugging information,
    8845 +but at significant potential loss in type information to the debugger.
    8846 +See @option{-femit-struct-debug-reduced} for a less aggressive option.
    8847 +See @option{-femit-struct-debug-detailed} for more detailed control.
    8848 +
    8849 +This option works only with DWARF 2.
    8850 +
    8851 +@item -femit-struct-debug-reduced
    8852 +Emit debug information for struct-like types
    8853 +only when the base name of the compilation source file
    8854 +matches the base name of file in which the type was defined,
    8855 +unless the struct is a template or defined in a system header.
    8856 +
    8857 +This option significantly reduces the size of debugging information,
    8858 +with some potential loss in type information to the debugger.
    8859 +See @option{-femit-struct-debug-baseonly} for a more aggressive option.
    8860 +See @option{-femit-struct-debug-detailed} for more detailed control.
    8861 +
    8862 +This option works only with DWARF 2.
    8863 +
    8864 +@item -femit-struct-debug-detailed@r{[}=@var{spec-list}@r{]}
    8865 +Specify the struct-like types
    8866 +for which the compiler will generate debug information.
    8867 +The intent is to reduce duplicate struct debug information
    8868 +between different object files within the same program.
    8869 +
    8870 +This option is a detailed version of
    8871 +@option{-femit-struct-debug-reduced} and @option{-femit-struct-debug-baseonly},
    8872 +which will serve for most needs.
    8873 +
    8874 +A specification has the syntax
    8875 +[@samp{dir:}|@samp{ind:}][@samp{ord:}|@samp{gen:}](@samp{any}|@samp{sys}|@samp{base}|@samp{none})
    8876 +
    8877 +The optional first word limits the specification to
    8878 +structs that are used directly (@samp{dir:}) or used indirectly (@samp{ind:}).
    8879 +A struct type is used directly when it is the type of a variable, member.
    8880 +Indirect uses arise through pointers to structs.
    8881 +That is, when use of an incomplete struct would be legal, the use is indirect.
    8882 +An example is
    8883 +@samp{struct one direct; struct two * indirect;}.
    8884 +
    8885 +The optional second word limits the specification to
    8886 +ordinary structs (@samp{ord:}) or generic structs (@samp{gen:}).
    8887 +Generic structs are a bit complicated to explain.
    8888 +For C++, these are non-explicit specializations of template classes,
    8889 +or non-template classes within the above.
    8890 +Other programming languages have generics,
    8891 +but @samp{-femit-struct-debug-detailed} does not yet implement them.
    8892 +
    8893 +The third word specifies the source files for those
    8894 +structs for which the compiler will emit debug information.
    8895 +The values @samp{none} and @samp{any} have the normal meaning.
    8896 +The value @samp{base} means that
    8897 +the base of name of the file in which the type declaration appears
    8898 +must match the base of the name of the main compilation file.
    8899 +In practice, this means that
    8900 +types declared in @file{foo.c} and @file{foo.h} will have debug information,
    8901 +but types declared in other header will not.
    8902 +The value @samp{sys} means those types satisfying @samp{base}
    8903 +or declared in system or compiler headers.
    8904 +
    8905 +You may need to experiment to determine the best settings for your application.
    8906 +
    8907 +The default is @samp{-femit-struct-debug-detailed=all}.
    8908 +
    8909 +This option works only with DWARF 2.
    8910 +
    8911 +@item -fno-merge-debug-strings
    8912 +@opindex fmerge-debug-strings
    8913 +@opindex fno-merge-debug-strings
    8914 +Direct the linker to not merge together strings in the debugging
    8915 +information which are identical in different object files.  Merging is
    8916 +not supported by all assemblers or linkers.  Merging decreases the size
    8917 +of the debug information in the output file at the cost of increasing
    8918 +link processing time.  Merging is enabled by default.
    8919 +
    8920 +@item -fdebug-prefix-map=@var{old}=@var{new}
    8921 +@opindex fdebug-prefix-map
    8922 +When compiling files in directory @file{@var{old}}, record debugging
    8923 +information describing them as in @file{@var{new}} instead.
    8924 +
    8925 +@item -fno-dwarf2-cfi-asm
    8926 +@opindex fdwarf2-cfi-asm
    8927 +@opindex fno-dwarf2-cfi-asm
    8928 +Emit DWARF 2 unwind info as compiler generated @code{.eh_frame} section
    8929 +instead of using GAS @code{.cfi_*} directives.
    8930 +
    8931 +@cindex @command{prof}
    8932 +@item -p
    8933 +@opindex p
    8934 +Generate extra code to write profile information suitable for the
    8935 +analysis program @command{prof}.  You must use this option when compiling
    8936 +the source files you want data about, and you must also use it when
    8937 +linking.
    8938 +
    8939 +@cindex @command{gprof}
    8940 +@item -pg
    8941 +@opindex pg
    8942 +Generate extra code to write profile information suitable for the
    8943 +analysis program @command{gprof}.  You must use this option when compiling
    8944 +the source files you want data about, and you must also use it when
    8945 +linking.
    8946 +
    8947 +@item -Q
    8948 +@opindex Q
    8949 +Makes the compiler print out each function name as it is compiled, and
    8950 +print some statistics about each pass when it finishes.
    8951 +
    8952 +@item -ftime-report
    8953 +@opindex ftime-report
    8954 +Makes the compiler print some statistics about the time consumed by each
    8955 +pass when it finishes.
    8956 +
    8957 +@item -fmem-report
    8958 +@opindex fmem-report
    8959 +Makes the compiler print some statistics about permanent memory
    8960 +allocation when it finishes.
    8961 +
    8962 +@item -fpre-ipa-mem-report
    8963 +@opindex fpre-ipa-mem-report
    8964 +@item -fpost-ipa-mem-report
    8965 +@opindex fpost-ipa-mem-report
    8966 +Makes the compiler print some statistics about permanent memory
    8967 +allocation before or after interprocedural optimization.
    8968 +
    8969 +@item -fprofile-arcs
    8970 +@opindex fprofile-arcs
    8971 +Add code so that program flow @dfn{arcs} are instrumented.  During
    8972 +execution the program records how many times each branch and call is
    8973 +executed and how many times it is taken or returns.  When the compiled
    8974 +program exits it saves this data to a file called
    8975 +@file{@var{auxname}.gcda} for each source file.  The data may be used for
    8976 +profile-directed optimizations (@option{-fbranch-probabilities}), or for
    8977 +test coverage analysis (@option{-ftest-coverage}).  Each object file's
    8978 +@var{auxname} is generated from the name of the output file, if
    8979 +explicitly specified and it is not the final executable, otherwise it is
    8980 +the basename of the source file.  In both cases any suffix is removed
    8981 +(e.g.@: @file{foo.gcda} for input file @file{dir/foo.c}, or
    8982 +@file{dir/foo.gcda} for output file specified as @option{-o dir/foo.o}).
    8983 +@xref{Cross-profiling}.
    8984 +
    8985 +@cindex @command{gcov}
    8986 +@item --coverage
    8987 +@opindex coverage
    8988 +
    8989 +This option is used to compile and link code instrumented for coverage
    8990 +analysis.  The option is a synonym for @option{-fprofile-arcs}
    8991 +@option{-ftest-coverage} (when compiling) and @option{-lgcov} (when
    8992 +linking).  See the documentation for those options for more details.
    8993 +
    8994 +@itemize
    8995 +
    8996 +@item
    8997 +Compile the source files with @option{-fprofile-arcs} plus optimization
    8998 +and code generation options.  For test coverage analysis, use the
    8999 +additional @option{-ftest-coverage} option.  You do not need to profile
    9000 +every source file in a program.
    9001 +
    9002 +@item
    9003 +Link your object files with @option{-lgcov} or @option{-fprofile-arcs}
    9004 +(the latter implies the former).
    9005 +
    9006 +@item
    9007 +Run the program on a representative workload to generate the arc profile
    9008 +information.  This may be repeated any number of times.  You can run
    9009 +concurrent instances of your program, and provided that the file system
    9010 +supports locking, the data files will be correctly updated.  Also
    9011 +@code{fork} calls are detected and correctly handled (double counting
    9012 +will not happen).
    9013 +
    9014 +@item
    9015 +For profile-directed optimizations, compile the source files again with
    9016 +the same optimization and code generation options plus
    9017 +@option{-fbranch-probabilities} (@pxref{Optimize Options,,Options that
    9018 +Control Optimization}).
    9019 +
    9020 +@item
    9021 +For test coverage analysis, use @command{gcov} to produce human readable
    9022 +information from the @file{.gcno} and @file{.gcda} files.  Refer to the
    9023 +@command{gcov} documentation for further information.
    9024 +
    9025 +@end itemize
    9026 +
    9027 +With @option{-fprofile-arcs}, for each function of your program GCC
    9028 +creates a program flow graph, then finds a spanning tree for the graph.
    9029 +Only arcs that are not on the spanning tree have to be instrumented: the
    9030 +compiler adds code to count the number of times that these arcs are
    9031 +executed.  When an arc is the only exit or only entrance to a block, the
    9032 +instrumentation code can be added to the block; otherwise, a new basic
    9033 +block must be created to hold the instrumentation code.
    9034 +
    9035 +@need 2000
    9036 +@item -ftest-coverage
    9037 +@opindex ftest-coverage
    9038 +Produce a notes file that the @command{gcov} code-coverage utility
    9039 +(@pxref{Gcov,, @command{gcov}---a Test Coverage Program}) can use to
    9040 +show program coverage.  Each source file's note file is called
    9041 +@file{@var{auxname}.gcno}.  Refer to the @option{-fprofile-arcs} option
    9042 +above for a description of @var{auxname} and instructions on how to
    9043 +generate test coverage data.  Coverage data will match the source files
    9044 +more closely, if you do not optimize.
    9045 +
    9046 +@item -fdbg-cnt-list
    9047 +@opindex fdbg-cnt-list
    9048 +Print the name and the counter upperbound for all debug counters.
    9049 +
    9050 +@item -fdbg-cnt=@var{counter-value-list}
    9051 +@opindex fdbg-cnt
    9052 +Set the internal debug counter upperbound. @var{counter-value-list}
    9053 +is a comma-separated list of @var{name}:@var{value} pairs
    9054 +which sets the upperbound of each debug counter @var{name} to @var{value}.
    9055 +All debug counters have the initial upperbound of @var{UINT_MAX},
    9056 +thus dbg_cnt() returns true always unless the upperbound is set by this option.
    9057 +e.g. With -fdbg-cnt=dce:10,tail_call:0
    9058 +dbg_cnt(dce) will return true only for first 10 invocations
    9059 +and dbg_cnt(tail_call) will return false always.
    9060 +
    9061 +@item -d@var{letters}
    9062 +@itemx -fdump-rtl-@var{pass}
    9063 +@opindex d
    9064 +Says to make debugging dumps during compilation at times specified by
    9065 +@var{letters}.    This is used for debugging the RTL-based passes of the
    9066 +compiler.  The file names for most of the dumps are made by appending a
    9067 +pass number and a word to the @var{dumpname}.  @var{dumpname} is generated
    9068 +from the name of the output file, if explicitly specified and it is not
    9069 +an executable, otherwise it is the basename of the source file. These
    9070 +switches may have different effects when @option{-E} is used for
    9071 +preprocessing.
    9072 +
    9073 +Debug dumps can be enabled with a @option{-fdump-rtl} switch or some
    9074 +@option{-d} option @var{letters}.  Here are the possible
    9075 +letters for use in @var{pass} and @var{letters}, and their meanings:
    9076 +
    9077 +@table @gcctabopt
    9078 +
    9079 +@item -fdump-rtl-alignments
    9080 +@opindex fdump-rtl-alignments
    9081 +Dump after branch alignments have been computed.
    9082 +
    9083 +@item -fdump-rtl-asmcons
    9084 +@opindex fdump-rtl-asmcons
    9085 +Dump after fixing rtl statements that have unsatisfied in/out constraints.
    9086 +
    9087 +@item -fdump-rtl-auto_inc_dec
    9088 +@opindex fdump-rtl-auto_inc_dec
    9089 +Dump after auto-inc-dec discovery.  This pass is only run on
    9090 +architectures that have auto inc or auto dec instructions.
    9091 +
    9092 +@item -fdump-rtl-barriers
    9093 +@opindex fdump-rtl-barriers
    9094 +Dump after cleaning up the barrier instructions.
    9095 +
    9096 +@item -fdump-rtl-bbpart
    9097 +@opindex fdump-rtl-bbpart
    9098 +Dump after partitioning hot and cold basic blocks.
    9099 +
    9100 +@item -fdump-rtl-bbro
    9101 +@opindex fdump-rtl-bbro
    9102 +Dump after block reordering.
    9103 +
    9104 +@item -fdump-rtl-btl1
    9105 +@itemx -fdump-rtl-btl2
    9106 +@opindex fdump-rtl-btl2
    9107 +@opindex fdump-rtl-btl2
    9108 +@option{-fdump-rtl-btl1} and @option{-fdump-rtl-btl2} enable dumping
    9109 +after the two branch
    9110 +target load optimization passes.
    9111 +
    9112 +@item -fdump-rtl-bypass
    9113 +@opindex fdump-rtl-bypass
    9114 +Dump after jump bypassing and control flow optimizations.
    9115 +
    9116 +@item -fdump-rtl-combine
    9117 +@opindex fdump-rtl-combine
    9118 +Dump after the RTL instruction combination pass.
    9119 +
    9120 +@item -fdump-rtl-compgotos
    9121 +@opindex fdump-rtl-compgotos
    9122 +Dump after duplicating the computed gotos.
    9123 +
    9124 +@item -fdump-rtl-ce1
    9125 +@itemx -fdump-rtl-ce2
    9126 +@itemx -fdump-rtl-ce3
    9127 +@opindex fdump-rtl-ce1
    9128 +@opindex fdump-rtl-ce2
    9129 +@opindex fdump-rtl-ce3
    9130 +@option{-fdump-rtl-ce1}, @option{-fdump-rtl-ce2}, and
    9131 +@option{-fdump-rtl-ce3} enable dumping after the three
    9132 +if conversion passes.
    9133 +
    9134 +@itemx -fdump-rtl-cprop_hardreg
    9135 +@opindex fdump-rtl-cprop_hardreg
    9136 +Dump after hard register copy propagation.
    9137 +
    9138 +@itemx -fdump-rtl-csa
    9139 +@opindex fdump-rtl-csa
    9140 +Dump after combining stack adjustments.
    9141 +
    9142 +@item -fdump-rtl-cse1
    9143 +@itemx -fdump-rtl-cse2
    9144 +@opindex fdump-rtl-cse1
    9145 +@opindex fdump-rtl-cse2
    9146 +@option{-fdump-rtl-cse1} and @option{-fdump-rtl-cse2} enable dumping after
    9147 +the two common sub-expression elimination passes.
    9148 +
    9149 +@itemx -fdump-rtl-dce
    9150 +@opindex fdump-rtl-dce
    9151 +Dump after the standalone dead code elimination passes.
    9152 +
    9153 +@itemx -fdump-rtl-dbr
    9154 +@opindex fdump-rtl-dbr
    9155 +Dump after delayed branch scheduling.
    9156 +
    9157 +@item -fdump-rtl-dce1
    9158 +@itemx -fdump-rtl-dce2
    9159 +@opindex fdump-rtl-dce1
    9160 +@opindex fdump-rtl-dce2
    9161 +@option{-fdump-rtl-dce1} and @option{-fdump-rtl-dce2} enable dumping after
    9162 +the two dead store elimination passes.
    9163 +
    9164 +@item -fdump-rtl-eh
    9165 +@opindex fdump-rtl-eh
    9166 +Dump after finalization of EH handling code.
    9167 +
    9168 +@item -fdump-rtl-eh_ranges
    9169 +@opindex fdump-rtl-eh_ranges
    9170 +Dump after conversion of EH handling range regions.
    9171 +
    9172 +@item -fdump-rtl-expand
    9173 +@opindex fdump-rtl-expand
    9174 +Dump after RTL generation.
    9175 +
    9176 +@item -fdump-rtl-fwprop1
    9177 +@itemx -fdump-rtl-fwprop2
    9178 +@opindex fdump-rtl-fwprop1
    9179 +@opindex fdump-rtl-fwprop2
    9180 +@option{-fdump-rtl-fwprop1} and @option{-fdump-rtl-fwprop2} enable
    9181 +dumping after the two forward propagation passes.
    9182 +
    9183 +@item -fdump-rtl-gcse1
    9184 +@itemx -fdump-rtl-gcse2
    9185 +@opindex fdump-rtl-gcse1
    9186 +@opindex fdump-rtl-gcse2
    9187 +@option{-fdump-rtl-gcse1} and @option{-fdump-rtl-gcse2} enable dumping
    9188 +after global common subexpression elimination.
    9189 +
    9190 +@item -fdump-rtl-init-regs
    9191 +@opindex fdump-rtl-init-regs
    9192 +Dump after the initialization of the registers.
    9193 +
    9194 +@item -fdump-rtl-initvals
    9195 +@opindex fdump-rtl-initvals
    9196 +Dump after the computation of the initial value sets.
    9197 +
    9198 +@itemx -fdump-rtl-into_cfglayout
    9199 +@opindex fdump-rtl-into_cfglayout
    9200 +Dump after converting to cfglayout mode.
    9201 +
    9202 +@item -fdump-rtl-ira
    9203 +@opindex fdump-rtl-ira
    9204 +Dump after iterated register allocation.
    9205 +
    9206 +@item -fdump-rtl-jump
    9207 +@opindex fdump-rtl-jump
    9208 +Dump after the second jump optimization.
    9209 +
    9210 +@item -fdump-rtl-loop2
    9211 +@opindex fdump-rtl-loop2
    9212 +@option{-fdump-rtl-loop2} enables dumping after the rtl
    9213 +loop optimization passes.
    9214 +
    9215 +@item -fdump-rtl-mach
    9216 +@opindex fdump-rtl-mach
    9217 +Dump after performing the machine dependent reorganization pass, if that
    9218 +pass exists.
    9219 +
    9220 +@item -fdump-rtl-mode_sw
    9221 +@opindex fdump-rtl-mode_sw
    9222 +Dump after removing redundant mode switches.
    9223 +
    9224 +@item -fdump-rtl-rnreg
    9225 +@opindex fdump-rtl-rnreg
    9226 +Dump after register renumbering.
    9227 +
    9228 +@itemx -fdump-rtl-outof_cfglayout
    9229 +@opindex fdump-rtl-outof_cfglayout
    9230 +Dump after converting from cfglayout mode.
    9231 +
    9232 +@item -fdump-rtl-peephole2
    9233 +@opindex fdump-rtl-peephole2
    9234 +Dump after the peephole pass.
    9235 +
    9236 +@item -fdump-rtl-postreload
    9237 +@opindex fdump-rtl-postreload
    9238 +Dump after post-reload optimizations.
    9239 +
    9240 +@itemx -fdump-rtl-pro_and_epilogue
    9241 +@opindex fdump-rtl-pro_and_epilogue
    9242 +Dump after generating the function pro and epilogues.
    9243 +
    9244 +@item -fdump-rtl-regmove
    9245 +@opindex fdump-rtl-regmove
    9246 +Dump after the register move pass.
    9247 +
    9248 +@item -fdump-rtl-sched1
    9249 +@itemx -fdump-rtl-sched2
    9250 +@opindex fdump-rtl-sched1
    9251 +@opindex fdump-rtl-sched2
    9252 +@option{-fdump-rtl-sched1} and @option{-fdump-rtl-sched2} enable dumping
    9253 +after the basic block scheduling passes.
    9254 +
    9255 +@item -fdump-rtl-see
    9256 +@opindex fdump-rtl-see
    9257 +Dump after sign extension elimination.
    9258 +
    9259 +@item -fdump-rtl-seqabstr
    9260 +@opindex fdump-rtl-seqabstr
    9261 +Dump after common sequence discovery.
    9262 +
    9263 +@item -fdump-rtl-shorten
    9264 +@opindex fdump-rtl-shorten
    9265 +Dump after shortening branches.
    9266 +
    9267 +@item -fdump-rtl-sibling
    9268 +@opindex fdump-rtl-sibling
    9269 +Dump after sibling call optimizations.
    9270 +
    9271 +@item -fdump-rtl-split1
    9272 +@itemx -fdump-rtl-split2
    9273 +@itemx -fdump-rtl-split3
    9274 +@itemx -fdump-rtl-split4
    9275 +@itemx -fdump-rtl-split5
    9276 +@opindex fdump-rtl-split1
    9277 +@opindex fdump-rtl-split2
    9278 +@opindex fdump-rtl-split3
    9279 +@opindex fdump-rtl-split4
    9280 +@opindex fdump-rtl-split5
    9281 +@option{-fdump-rtl-split1}, @option{-fdump-rtl-split2},
    9282 +@option{-fdump-rtl-split3}, @option{-fdump-rtl-split4} and
    9283 +@option{-fdump-rtl-split5} enable dumping after five rounds of
    9284 +instruction splitting.
    9285 +
    9286 +@item -fdump-rtl-sms
    9287 +@opindex fdump-rtl-sms
    9288 +Dump after modulo scheduling.  This pass is only run on some
    9289 +architectures.
    9290 +
    9291 +@item -fdump-rtl-stack
    9292 +@opindex fdump-rtl-stack
    9293 +Dump after conversion from GCC's "flat register file" registers to the
    9294 +x87's stack-like registers.  This pass is only run on x86 variants.
    9295 +
    9296 +@item -fdump-rtl-subreg1
    9297 +@itemx -fdump-rtl-subreg2
    9298 +@opindex fdump-rtl-subreg1
    9299 +@opindex fdump-rtl-subreg2
    9300 +@option{-fdump-rtl-subreg1} and @option{-fdump-rtl-subreg2} enable dumping after
    9301 +the two subreg expansion passes.
    9302 +
    9303 +@item -fdump-rtl-unshare
    9304 +@opindex fdump-rtl-unshare
    9305 +Dump after all rtl has been unshared.
    9306 +
    9307 +@item -fdump-rtl-vartrack
    9308 +@opindex fdump-rtl-vartrack
    9309 +Dump after variable tracking.
    9310 +
    9311 +@item -fdump-rtl-vregs
    9312 +@opindex fdump-rtl-vregs
    9313 +Dump after converting virtual registers to hard registers.
    9314 +
    9315 +@item -fdump-rtl-web
    9316 +@opindex fdump-rtl-web
    9317 +Dump after live range splitting.
    9318 +
    9319 +@item -fdump-rtl-regclass
    9320 +@itemx -fdump-rtl-subregs_of_mode_init
    9321 +@itemx -fdump-rtl-subregs_of_mode_finish
    9322 +@itemx -fdump-rtl-dfinit
    9323 +@itemx -fdump-rtl-dfinish
    9324 +@opindex fdump-rtl-regclass
    9325 +@opindex fdump-rtl-subregs_of_mode_init
    9326 +@opindex fdump-rtl-subregs_of_mode_finish
    9327 +@opindex fdump-rtl-dfinit
    9328 +@opindex fdump-rtl-dfinish
    9329 +These dumps are defined but always produce empty files.
    9330 +
    9331 +@item -fdump-rtl-all
    9332 +@opindex fdump-rtl-all
    9333 +Produce all the dumps listed above.
    9334 +
    9335 +@item -dA
    9336 +@opindex dA
    9337 +Annotate the assembler output with miscellaneous debugging information.
    9338 +
    9339 +@item -dD
    9340 +@opindex dD
    9341 +Dump all macro definitions, at the end of preprocessing, in addition to
    9342 +normal output.
    9343 +
    9344 +@item -dH
    9345 +@opindex dH
    9346 +Produce a core dump whenever an error occurs.
    9347 +
    9348 +@item -dm
    9349 +@opindex dm
    9350 +Print statistics on memory usage, at the end of the run, to
    9351 +standard error.
    9352 +
    9353 +@item -dp
    9354 +@opindex dp
    9355 +Annotate the assembler output with a comment indicating which
    9356 +pattern and alternative was used.  The length of each instruction is
    9357 +also printed.
    9358 +
    9359 +@item -dP
    9360 +@opindex dP
    9361 +Dump the RTL in the assembler output as a comment before each instruction.
    9362 +Also turns on @option{-dp} annotation.
    9363 +
    9364 +@item -dv
    9365 +@opindex dv
    9366 +For each of the other indicated dump files (@option{-fdump-rtl-@var{pass}}),
    9367 +dump a representation of the control flow graph suitable for viewing with VCG
    9368 +to @file{@var{file}.@var{pass}.vcg}.
    9369 +
    9370 +@item -dx
    9371 +@opindex dx
    9372 +Just generate RTL for a function instead of compiling it.  Usually used
    9373 +with @option{-fdump-rtl-expand}.
    9374 +
    9375 +@item -dy
    9376 +@opindex dy
    9377 +Dump debugging information during parsing, to standard error.
    9378 +@end table
    9379 +
    9380 +@item -fdump-noaddr
    9381 +@opindex fdump-noaddr
    9382 +When doing debugging dumps, suppress address output.  This makes it more
    9383 +feasible to use diff on debugging dumps for compiler invocations with
    9384 +different compiler binaries and/or different
    9385 +text / bss / data / heap / stack / dso start locations.
    9386 +
    9387 +@item -fdump-unnumbered
    9388 +@opindex fdump-unnumbered
    9389 +When doing debugging dumps, suppress instruction numbers and address output.
    9390 +This makes it more feasible to use diff on debugging dumps for compiler
    9391 +invocations with different options, in particular with and without
    9392 +@option{-g}.
    9393 +
    9394 +@item -fdump-translation-unit @r{(C++ only)}
    9395 +@itemx -fdump-translation-unit-@var{options} @r{(C++ only)}
    9396 +@opindex fdump-translation-unit
    9397 +Dump a representation of the tree structure for the entire translation
    9398 +unit to a file.  The file name is made by appending @file{.tu} to the
    9399 +source file name.  If the @samp{-@var{options}} form is used, @var{options}
    9400 +controls the details of the dump as described for the
    9401 +@option{-fdump-tree} options.
    9402 +
    9403 +@item -fdump-class-hierarchy @r{(C++ only)}
    9404 +@itemx -fdump-class-hierarchy-@var{options} @r{(C++ only)}
    9405 +@opindex fdump-class-hierarchy
    9406 +Dump a representation of each class's hierarchy and virtual function
    9407 +table layout to a file.  The file name is made by appending @file{.class}
    9408 +to the source file name.  If the @samp{-@var{options}} form is used,
    9409 +@var{options} controls the details of the dump as described for the
    9410 +@option{-fdump-tree} options.
    9411 +
    9412 +@item -fdump-ipa-@var{switch}
    9413 +@opindex fdump-ipa
    9414 +Control the dumping at various stages of inter-procedural analysis
    9415 +language tree to a file.  The file name is generated by appending a switch
    9416 +specific suffix to the source file name.  The following dumps are possible:
    9417 +
    9418 +@table @samp
    9419 +@item all
    9420 +Enables all inter-procedural analysis dumps.
    9421 +
    9422 +@item cgraph
    9423 +Dumps information about call-graph optimization, unused function removal,
    9424 +and inlining decisions.
    9425 +
    9426 +@item inline
    9427 +Dump after function inlining.
    9428 +
    9429 +@end table
    9430 +
    9431 +@item -fdump-statistics-@var{option}
    9432 +@opindex -fdump-statistics
    9433 +Enable and control dumping of pass statistics in a separate file.  The
    9434 +file name is generated by appending a suffix ending in @samp{.statistics}
    9435 +to the source file name.  If the @samp{-@var{option}} form is used,
    9436 +@samp{-stats} will cause counters to be summed over the whole compilation unit
    9437 +while @samp{-details} will dump every event as the passes generate them.
    9438 +The default with no option is to sum counters for each function compiled.
    9439 +
    9440 +@item -fdump-tree-@var{switch}
    9441 +@itemx -fdump-tree-@var{switch}-@var{options}
    9442 +@opindex fdump-tree
    9443 +Control the dumping at various stages of processing the intermediate
    9444 +language tree to a file.  The file name is generated by appending a switch
    9445 +specific suffix to the source file name.  If the @samp{-@var{options}}
    9446 +form is used, @var{options} is a list of @samp{-} separated options that
    9447 +control the details of the dump.  Not all options are applicable to all
    9448 +dumps, those which are not meaningful will be ignored.  The following
    9449 +options are available
    9450 +
    9451 +@table @samp
    9452 +@item address
    9453 +Print the address of each node.  Usually this is not meaningful as it
    9454 +changes according to the environment and source file.  Its primary use
    9455 +is for tying up a dump file with a debug environment.
    9456 +@item slim
    9457 +Inhibit dumping of members of a scope or body of a function merely
    9458 +because that scope has been reached.  Only dump such items when they
    9459 +are directly reachable by some other path.  When dumping pretty-printed
    9460 +trees, this option inhibits dumping the bodies of control structures.
    9461 +@item raw
    9462 +Print a raw representation of the tree.  By default, trees are
    9463 +pretty-printed into a C-like representation.
    9464 +@item details
    9465 +Enable more detailed dumps (not honored by every dump option).
    9466 +@item stats
    9467 +Enable dumping various statistics about the pass (not honored by every dump
    9468 +option).
    9469 +@item blocks
    9470 +Enable showing basic block boundaries (disabled in raw dumps).
    9471 +@item vops
    9472 +Enable showing virtual operands for every statement.
    9473 +@item lineno
    9474 +Enable showing line numbers for statements.
    9475 +@item uid
    9476 +Enable showing the unique ID (@code{DECL_UID}) for each variable.
    9477 +@item verbose
    9478 +Enable showing the tree dump for each statement.
    9479 +@item all
    9480 +Turn on all options, except @option{raw}, @option{slim}, @option{verbose}
    9481 +and @option{lineno}.
    9482 +@end table
    9483 +
    9484 +The following tree dumps are possible:
    9485 +@table @samp
    9486 +
    9487 +@item original
    9488 +Dump before any tree based optimization, to @file{@var{file}.original}.
    9489 +
    9490 +@item optimized
    9491 +Dump after all tree based optimization, to @file{@var{file}.optimized}.
    9492 +
    9493 +@item gimple
    9494 +@opindex fdump-tree-gimple
    9495 +Dump each function before and after the gimplification pass to a file.  The
    9496 +file name is made by appending @file{.gimple} to the source file name.
    9497 +
    9498 +@item cfg
    9499 +@opindex fdump-tree-cfg
    9500 +Dump the control flow graph of each function to a file.  The file name is
    9501 +made by appending @file{.cfg} to the source file name.
    9502 +
    9503 +@item vcg
    9504 +@opindex fdump-tree-vcg
    9505 +Dump the control flow graph of each function to a file in VCG format.  The
    9506 +file name is made by appending @file{.vcg} to the source file name.  Note
    9507 +that if the file contains more than one function, the generated file cannot
    9508 +be used directly by VCG@.  You will need to cut and paste each function's
    9509 +graph into its own separate file first.
    9510 +
    9511 +@item ch
    9512 +@opindex fdump-tree-ch
    9513 +Dump each function after copying loop headers.  The file name is made by
    9514 +appending @file{.ch} to the source file name.
    9515 +
    9516 +@item ssa
    9517 +@opindex fdump-tree-ssa
    9518 +Dump SSA related information to a file.  The file name is made by appending
    9519 +@file{.ssa} to the source file name.
    9520 +
    9521 +@item alias
    9522 +@opindex fdump-tree-alias
    9523 +Dump aliasing information for each function.  The file name is made by
    9524 +appending @file{.alias} to the source file name.
    9525 +
    9526 +@item ccp
    9527 +@opindex fdump-tree-ccp
    9528 +Dump each function after CCP@.  The file name is made by appending
    9529 +@file{.ccp} to the source file name.
    9530 +
    9531 +@item storeccp
    9532 +@opindex fdump-tree-storeccp
    9533 +Dump each function after STORE-CCP@.  The file name is made by appending
    9534 +@file{.storeccp} to the source file name.
    9535 +
    9536 +@item pre
    9537 +@opindex fdump-tree-pre
    9538 +Dump trees after partial redundancy elimination.  The file name is made
    9539 +by appending @file{.pre} to the source file name.
    9540 +
    9541 +@item fre
    9542 +@opindex fdump-tree-fre
    9543 +Dump trees after full redundancy elimination.  The file name is made
    9544 +by appending @file{.fre} to the source file name.
    9545 +
    9546 +@item copyprop
    9547 +@opindex fdump-tree-copyprop
    9548 +Dump trees after copy propagation.  The file name is made
    9549 +by appending @file{.copyprop} to the source file name.
    9550 +
    9551 +@item store_copyprop
    9552 +@opindex fdump-tree-store_copyprop
    9553 +Dump trees after store copy-propagation.  The file name is made
    9554 +by appending @file{.store_copyprop} to the source file name.
    9555 +
    9556 +@item dce
    9557 +@opindex fdump-tree-dce
    9558 +Dump each function after dead code elimination.  The file name is made by
    9559 +appending @file{.dce} to the source file name.
    9560 +
    9561 +@item mudflap
    9562 +@opindex fdump-tree-mudflap
    9563 +Dump each function after adding mudflap instrumentation.  The file name is
    9564 +made by appending @file{.mudflap} to the source file name.
    9565 +
    9566 +@item sra
    9567 +@opindex fdump-tree-sra
    9568 +Dump each function after performing scalar replacement of aggregates.  The
    9569 +file name is made by appending @file{.sra} to the source file name.
    9570 +
    9571 +@item sink
    9572 +@opindex fdump-tree-sink
    9573 +Dump each function after performing code sinking.  The file name is made
    9574 +by appending @file{.sink} to the source file name.
    9575 +
    9576 +@item dom
    9577 +@opindex fdump-tree-dom
    9578 +Dump each function after applying dominator tree optimizations.  The file
    9579 +name is made by appending @file{.dom} to the source file name.
    9580 +
    9581 +@item dse
    9582 +@opindex fdump-tree-dse
    9583 +Dump each function after applying dead store elimination.  The file
    9584 +name is made by appending @file{.dse} to the source file name.
    9585 +
    9586 +@item phiopt
    9587 +@opindex fdump-tree-phiopt
    9588 +Dump each function after optimizing PHI nodes into straightline code.  The file
    9589 +name is made by appending @file{.phiopt} to the source file name.
    9590 +
    9591 +@item forwprop
    9592 +@opindex fdump-tree-forwprop
    9593 +Dump each function after forward propagating single use variables.  The file
    9594 +name is made by appending @file{.forwprop} to the source file name.
    9595 +
    9596 +@item copyrename
    9597 +@opindex fdump-tree-copyrename
    9598 +Dump each function after applying the copy rename optimization.  The file
    9599 +name is made by appending @file{.copyrename} to the source file name.
    9600 +
    9601 +@item nrv
    9602 +@opindex fdump-tree-nrv
    9603 +Dump each function after applying the named return value optimization on
    9604 +generic trees.  The file name is made by appending @file{.nrv} to the source
    9605 +file name.
    9606 +
    9607 +@item vect
    9608 +@opindex fdump-tree-vect
    9609 +Dump each function after applying vectorization of loops.  The file name is
    9610 +made by appending @file{.vect} to the source file name.
    9611 +
    9612 +@item vrp
    9613 +@opindex fdump-tree-vrp
    9614 +Dump each function after Value Range Propagation (VRP).  The file name
    9615 +is made by appending @file{.vrp} to the source file name.
    9616 +
    9617 +@item all
    9618 +@opindex fdump-tree-all
    9619 +Enable all the available tree dumps with the flags provided in this option.
    9620 +@end table
    9621 +
    9622 +@item -ftree-vectorizer-verbose=@var{n}
    9623 +@opindex ftree-vectorizer-verbose
    9624 +This option controls the amount of debugging output the vectorizer prints.
    9625 +This information is written to standard error, unless
    9626 +@option{-fdump-tree-all} or @option{-fdump-tree-vect} is specified,
    9627 +in which case it is output to the usual dump listing file, @file{.vect}.
    9628 +For @var{n}=0 no diagnostic information is reported.
    9629 +If @var{n}=1 the vectorizer reports each loop that got vectorized,
    9630 +and the total number of loops that got vectorized.
    9631 +If @var{n}=2 the vectorizer also reports non-vectorized loops that passed
    9632 +the first analysis phase (vect_analyze_loop_form) - i.e.@: countable,
    9633 +inner-most, single-bb, single-entry/exit loops.  This is the same verbosity
    9634 +level that @option{-fdump-tree-vect-stats} uses.
    9635 +Higher verbosity levels mean either more information dumped for each
    9636 +reported loop, or same amount of information reported for more loops:
    9637 +If @var{n}=3, alignment related information is added to the reports.
    9638 +If @var{n}=4, data-references related information (e.g.@: memory dependences,
    9639 +memory access-patterns) is added to the reports.
    9640 +If @var{n}=5, the vectorizer reports also non-vectorized inner-most loops
    9641 +that did not pass the first analysis phase (i.e., may not be countable, or
    9642 +may have complicated control-flow).
    9643 +If @var{n}=6, the vectorizer reports also non-vectorized nested loops.
    9644 +For @var{n}=7, all the information the vectorizer generates during its
    9645 +analysis and transformation is reported.  This is the same verbosity level
    9646 +that @option{-fdump-tree-vect-details} uses.
    9647 +
    9648 +@item -frandom-seed=@var{string}
    9649 +@opindex frandom-string
    9650 +This option provides a seed that GCC uses when it would otherwise use
    9651 +random numbers.  It is used to generate certain symbol names
    9652 +that have to be different in every compiled file.  It is also used to
    9653 +place unique stamps in coverage data files and the object files that
    9654 +produce them.  You can use the @option{-frandom-seed} option to produce
    9655 +reproducibly identical object files.
    9656 +
    9657 +The @var{string} should be different for every file you compile.
    9658 +
    9659 +@item -fsched-verbose=@var{n}
    9660 +@opindex fsched-verbose
    9661 +On targets that use instruction scheduling, this option controls the
    9662 +amount of debugging output the scheduler prints.  This information is
    9663 +written to standard error, unless @option{-fdump-rtl-sched1} or
    9664 +@option{-fdump-rtl-sched2} is specified, in which case it is output
    9665 +to the usual dump listing file, @file{.sched} or @file{.sched2}
    9666 +respectively.  However for @var{n} greater than nine, the output is
    9667 +always printed to standard error.
    9668 +
    9669 +For @var{n} greater than zero, @option{-fsched-verbose} outputs the
    9670 +same information as @option{-fdump-rtl-sched1} and @option{-fdump-rtl-sched2}.
    9671 +For @var{n} greater than one, it also output basic block probabilities,
    9672 +detailed ready list information and unit/insn info.  For @var{n} greater
    9673 +than two, it includes RTL at abort point, control-flow and regions info.
    9674 +And for @var{n} over four, @option{-fsched-verbose} also includes
    9675 +dependence info.
    9676 +
    9677 +@item -save-temps
    9678 +@opindex save-temps
    9679 +Store the usual ``temporary'' intermediate files permanently; place them
    9680 +in the current directory and name them based on the source file.  Thus,
    9681 +compiling @file{foo.c} with @samp{-c -save-temps} would produce files
    9682 +@file{foo.i} and @file{foo.s}, as well as @file{foo.o}.  This creates a
    9683 +preprocessed @file{foo.i} output file even though the compiler now
    9684 +normally uses an integrated preprocessor.
    9685 +
    9686 +When used in combination with the @option{-x} command line option,
    9687 +@option{-save-temps} is sensible enough to avoid over writing an
    9688 +input source file with the same extension as an intermediate file.
    9689 +The corresponding intermediate file may be obtained by renaming the
    9690 +source file before using @option{-save-temps}.
    9691 +
    9692 +@item -time
    9693 +@opindex time
    9694 +Report the CPU time taken by each subprocess in the compilation
    9695 +sequence.  For C source files, this is the compiler proper and assembler
    9696 +(plus the linker if linking is done).  The output looks like this:
    9697 +
    9698 +@smallexample
    9699 +# cc1 0.12 0.01
    9700 +# as 0.00 0.01
    9701 +@end smallexample
    9702 +
    9703 +The first number on each line is the ``user time'', that is time spent
    9704 +executing the program itself.  The second number is ``system time'',
    9705 +time spent executing operating system routines on behalf of the program.
    9706 +Both numbers are in seconds.
    9707 +
    9708 +@item -fvar-tracking
    9709 +@opindex fvar-tracking
    9710 +Run variable tracking pass.  It computes where variables are stored at each
    9711 +position in code.  Better debugging information is then generated
    9712 +(if the debugging information format supports this information).
    9713 +
    9714 +It is enabled by default when compiling with optimization (@option{-Os},
    9715 +@option{-O}, @option{-O2}, @dots{}), debugging information (@option{-g}) and
    9716 +the debug info format supports it.
    9717 +
    9718 +@item -print-file-name=@var{library}
    9719 +@opindex print-file-name
    9720 +Print the full absolute name of the library file @var{library} that
    9721 +would be used when linking---and don't do anything else.  With this
    9722 +option, GCC does not compile or link anything; it just prints the
    9723 +file name.
    9724 +
    9725 +@item -print-multi-directory
    9726 +@opindex print-multi-directory
    9727 +Print the directory name corresponding to the multilib selected by any
    9728 +other switches present in the command line.  This directory is supposed
    9729 +to exist in @env{GCC_EXEC_PREFIX}.
    9730 +
    9731 +@item -print-multi-lib
    9732 +@opindex print-multi-lib
    9733 +Print the mapping from multilib directory names to compiler switches
    9734 +that enable them.  The directory name is separated from the switches by
    9735 +@samp{;}, and each switch starts with an @samp{@@} instead of the
    9736 +@samp{-}, without spaces between multiple switches.  This is supposed to
    9737 +ease shell-processing.
    9738 +
    9739 +@item -print-prog-name=@var{program}
    9740 +@opindex print-prog-name
    9741 +Like @option{-print-file-name}, but searches for a program such as @samp{cpp}.
    9742 +
    9743 +@item -print-libgcc-file-name
    9744 +@opindex print-libgcc-file-name
    9745 +Same as @option{-print-file-name=libgcc.a}.
    9746 +
    9747 +This is useful when you use @option{-nostdlib} or @option{-nodefaultlibs}
    9748 +but you do want to link with @file{libgcc.a}.  You can do
    9749 +
    9750 +@smallexample
    9751 +gcc -nostdlib @var{files}@dots{} `gcc -print-libgcc-file-name`
    9752 +@end smallexample
    9753 +
    9754 +@item -print-search-dirs
    9755 +@opindex print-search-dirs
    9756 +Print the name of the configured installation directory and a list of
    9757 +program and library directories @command{gcc} will search---and don't do anything else.
    9758 +
    9759 +This is useful when @command{gcc} prints the error message
    9760 +@samp{installation problem, cannot exec cpp0: No such file or directory}.
    9761 +To resolve this you either need to put @file{cpp0} and the other compiler
    9762 +components where @command{gcc} expects to find them, or you can set the environment
    9763 +variable @env{GCC_EXEC_PREFIX} to the directory where you installed them.
    9764 +Don't forget the trailing @samp{/}.
    9765 +@xref{Environment Variables}.
    9766 +
    9767 +@item -print-sysroot
    9768 +@opindex print-sysroot
    9769 +Print the target sysroot directory that will be used during
    9770 +compilation.  This is the target sysroot specified either at configure
    9771 +time or using the @option{--sysroot} option, possibly with an extra
    9772 +suffix that depends on compilation options.  If no target sysroot is
    9773 +specified, the option prints nothing.
    9774 +
    9775 +@item -print-sysroot-headers-suffix
    9776 +@opindex print-sysroot-headers-suffix
    9777 +Print the suffix added to the target sysroot when searching for
    9778 +headers, or give an error if the compiler is not configured with such
    9779 +a suffix---and don't do anything else.
    9780 +
    9781 +@item -dumpmachine
    9782 +@opindex dumpmachine
    9783 +Print the compiler's target machine (for example,
    9784 +@samp{i686-pc-linux-gnu})---and don't do anything else.
    9785 +
    9786 +@item -dumpversion
    9787 +@opindex dumpversion
    9788 +Print the compiler version (for example, @samp{3.0})---and don't do
    9789 +anything else.
    9790 +
    9791 +@item -dumpspecs
    9792 +@opindex dumpspecs
    9793 +Print the compiler's built-in specs---and don't do anything else.  (This
    9794 +is used when GCC itself is being built.)  @xref{Spec Files}.
    9795 +
    9796 +@item -feliminate-unused-debug-types
    9797 +@opindex feliminate-unused-debug-types
    9798 +Normally, when producing DWARF2 output, GCC will emit debugging
    9799 +information for all types declared in a compilation
    9800 +unit, regardless of whether or not they are actually used
    9801 +in that compilation unit.  Sometimes this is useful, such as
    9802 +if, in the debugger, you want to cast a value to a type that is
    9803 +not actually used in your program (but is declared).  More often,
    9804 +however, this results in a significant amount of wasted space.
    9805 +With this option, GCC will avoid producing debug symbol output
    9806 +for types that are nowhere used in the source file being compiled.
    9807 +@end table
    9808 +
    9809 +@node Optimize Options
    9810 +@section Options That Control Optimization
    9811 +@cindex optimize options
    9812 +@cindex options, optimization
    9813 +
    9814 +These options control various sorts of optimizations.
    9815 +
    9816 +Without any optimization option, the compiler's goal is to reduce the
    9817 +cost of compilation and to make debugging produce the expected
    9818 +results.  Statements are independent: if you stop the program with a
    9819 +breakpoint between statements, you can then assign a new value to any
    9820 +variable or change the program counter to any other statement in the
    9821 +function and get exactly the results you would expect from the source
    9822 +code.
    9823 +
    9824 +Turning on optimization flags makes the compiler attempt to improve
    9825 +the performance and/or code size at the expense of compilation time
    9826 +and possibly the ability to debug the program.
    9827 +
    9828 +The compiler performs optimization based on the knowledge it has of the
    9829 +program.  Compiling multiple files at once to a single output file mode allows
    9830 +the compiler to use information gained from all of the files when compiling
    9831 +each of them.
    9832 +
    9833 +Not all optimizations are controlled directly by a flag.  Only
    9834 +optimizations that have a flag are listed.
    9835 +
    9836 +@table @gcctabopt
    9837 +@item -O
    9838 +@itemx -O1
    9839 +@opindex O
    9840 +@opindex O1
    9841 +Optimize.  Optimizing compilation takes somewhat more time, and a lot
    9842 +more memory for a large function.
    9843 +
    9844 +With @option{-O}, the compiler tries to reduce code size and execution
    9845 +time, without performing any optimizations that take a great deal of
    9846 +compilation time.
    9847 +
    9848 +@option{-O} turns on the following optimization flags:
    9849 +@gccoptlist{
    9850 +-fauto-inc-dec @gol
    9851 +-fcprop-registers @gol
    9852 +-fdce @gol
    9853 +-fdefer-pop @gol
    9854 +-fdelayed-branch @gol
    9855 +-fdse @gol
    9856 +-fguess-branch-probability @gol
    9857 +-fif-conversion2 @gol
    9858 +-fif-conversion @gol
    9859 +-finline-small-functions @gol
    9860 +-fipa-pure-const @gol
    9861 +-fipa-reference @gol
    9862 +-fmerge-constants
    9863 +-fsplit-wide-types @gol
    9864 +-ftree-builtin-call-dce @gol
    9865 +-ftree-ccp @gol
    9866 +-ftree-ch @gol
    9867 +-ftree-copyrename @gol
    9868 +-ftree-dce @gol
    9869 +-ftree-dominator-opts @gol
    9870 +-ftree-dse @gol
    9871 +-ftree-fre @gol
    9872 +-ftree-sra @gol
    9873 +-ftree-ter @gol
    9874 +-funit-at-a-time}
    9875 +
    9876 +@option{-O} also turns on @option{-fomit-frame-pointer} on machines
    9877 +where doing so does not interfere with debugging.
    9878 +
    9879 +@item -O2
    9880 +@opindex O2
    9881 +Optimize even more.  GCC performs nearly all supported optimizations
    9882 +that do not involve a space-speed tradeoff.
    9883 +As compared to @option{-O}, this option increases both compilation time
    9884 +and the performance of the generated code.
    9885 +
    9886 +@option{-O2} turns on all optimization flags specified by @option{-O}.  It
    9887 +also turns on the following optimization flags:
    9888 +@gccoptlist{-fthread-jumps @gol
    9889 +-falign-functions  -falign-jumps @gol
    9890 +-falign-loops  -falign-labels @gol
    9891 +-fcaller-saves @gol
    9892 +-fcrossjumping @gol
    9893 +-fcse-follow-jumps  -fcse-skip-blocks @gol
    9894 +-fdelete-null-pointer-checks @gol
    9895 +-fexpensive-optimizations @gol
    9896 +-fgcse  -fgcse-lm  @gol
    9897 +-findirect-inlining @gol
    9898 +-foptimize-sibling-calls @gol
    9899 +-fpeephole2 @gol
    9900 +-fregmove @gol
    9901 +-freorder-blocks  -freorder-functions @gol
    9902 +-frerun-cse-after-loop  @gol
    9903 +-fsched-interblock  -fsched-spec @gol
    9904 +-fschedule-insns  -fschedule-insns2 @gol
    9905 +-fstrict-aliasing -fstrict-overflow @gol
    9906 +-ftree-switch-conversion @gol
    9907 +-ftree-pre @gol
    9908 +-ftree-vrp}
    9909 +
    9910 +Please note the warning under @option{-fgcse} about
    9911 +invoking @option{-O2} on programs that use computed gotos.
    9912 +
    9913 +@item -O3
    9914 +@opindex O3
    9915 +Optimize yet more.  @option{-O3} turns on all optimizations specified
    9916 +by @option{-O2} and also turns on the @option{-finline-functions},
    9917 +@option{-funswitch-loops}, @option{-fpredictive-commoning},
    9918 +@option{-fgcse-after-reload} and @option{-ftree-vectorize} options.
    9919 +
    9920 +@item -O0
    9921 +@opindex O0
    9922 +Reduce compilation time and make debugging produce the expected
    9923 +results.  This is the default.
    9924 +
    9925 +@item -Os
    9926 +@opindex Os
    9927 +Optimize for size.  @option{-Os} enables all @option{-O2} optimizations that
    9928 +do not typically increase code size.  It also performs further
    9929 +optimizations designed to reduce code size.
    9930 +
    9931 +@option{-Os} disables the following optimization flags:
    9932 +@gccoptlist{-falign-functions  -falign-jumps  -falign-loops @gol
    9933 +-falign-labels  -freorder-blocks  -freorder-blocks-and-partition @gol
    9934 +-fprefetch-loop-arrays  -ftree-vect-loop-version}
    9935 +
    9936 +If you use multiple @option{-O} options, with or without level numbers,
    9937 +the last such option is the one that is effective.
    9938 +@end table
    9939 +
    9940 +Options of the form @option{-f@var{flag}} specify machine-independent
    9941 +flags.  Most flags have both positive and negative forms; the negative
    9942 +form of @option{-ffoo} would be @option{-fno-foo}.  In the table
    9943 +below, only one of the forms is listed---the one you typically will
    9944 +use.  You can figure out the other form by either removing @samp{no-}
    9945 +or adding it.
    9946 +
    9947 +The following options control specific optimizations.  They are either
    9948 +activated by @option{-O} options or are related to ones that are.  You
    9949 +can use the following flags in the rare cases when ``fine-tuning'' of
    9950 +optimizations to be performed is desired.
    9951 +
    9952 +@table @gcctabopt
    9953 +@item -fno-default-inline
    9954 +@opindex fno-default-inline
    9955 +Do not make member functions inline by default merely because they are
    9956 +defined inside the class scope (C++ only).  Otherwise, when you specify
    9957 +@w{@option{-O}}, member functions defined inside class scope are compiled
    9958 +inline by default; i.e., you don't need to add @samp{inline} in front of
    9959 +the member function name.
    9960 +
    9961 +@item -fno-defer-pop
    9962 +@opindex fno-defer-pop
    9963 +Always pop the arguments to each function call as soon as that function
    9964 +returns.  For machines which must pop arguments after a function call,
    9965 +the compiler normally lets arguments accumulate on the stack for several
    9966 +function calls and pops them all at once.
    9967 +
    9968 +Disabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
    9969 +
    9970 +@item -fforward-propagate
    9971 +@opindex fforward-propagate
    9972 +Perform a forward propagation pass on RTL@.  The pass tries to combine two
    9973 +instructions and checks if the result can be simplified.  If loop unrolling
    9974 +is active, two passes are performed and the second is scheduled after
    9975 +loop unrolling.
    9976 +
    9977 +This option is enabled by default at optimization levels @option{-O2},
    9978 +@option{-O3}, @option{-Os}.
    9979 +
    9980 +@item -fomit-frame-pointer
    9981 +@opindex fomit-frame-pointer
    9982 +Don't keep the frame pointer in a register for functions that
    9983 +don't need one.  This avoids the instructions to save, set up and
    9984 +restore frame pointers; it also makes an extra register available
    9985 +in many functions.  @strong{It also makes debugging impossible on
    9986 +some machines.}
    9987 +
    9988 +On some machines, such as the VAX, this flag has no effect, because
    9989 +the standard calling sequence automatically handles the frame pointer
    9990 +and nothing is saved by pretending it doesn't exist.  The
    9991 +machine-description macro @code{FRAME_POINTER_REQUIRED} controls
    9992 +whether a target machine supports this flag.  @xref{Registers,,Register
    9993 +Usage, gccint, GNU Compiler Collection (GCC) Internals}.
    9994 +
    9995 +Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
    9996 +
    9997 +@item -foptimize-sibling-calls
    9998 +@opindex foptimize-sibling-calls
    9999 +Optimize sibling and tail recursive calls.
    10000 +
    10001 +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    10002 +
    10003 +@item -fno-inline
    10004 +@opindex fno-inline
    10005 +Don't pay attention to the @code{inline} keyword.  Normally this option
    10006 +is used to keep the compiler from expanding any functions inline.
    10007 +Note that if you are not optimizing, no functions can be expanded inline.
    10008 +
    10009 +@item -finline-small-functions
    10010 +@opindex finline-small-functions
    10011 +Integrate functions into their callers when their body is smaller than expected
    10012 +function call code (so overall size of program gets smaller).  The compiler
    10013 +heuristically decides which functions are simple enough to be worth integrating
    10014 +in this way.
    10015 +
    10016 +Enabled at level @option{-O2}.
    10017 +
    10018 +@item -findirect-inlining
    10019 +@opindex findirect-inlining
    10020 +Inline also indirect calls that are discovered to be known at compile
    10021 +time thanks to previous inlining.  This option has any effect only
    10022 +when inlining itself is turned on by the @option{-finline-functions}
    10023 +or @option{-finline-small-functions} options.
    10024 +
    10025 +Enabled at level @option{-O2}.
    10026 +
    10027 +@item -finline-functions
    10028 +@opindex finline-functions
    10029 +Integrate all simple functions into their callers.  The compiler
    10030 +heuristically decides which functions are simple enough to be worth
    10031 +integrating in this way.
    10032 +
    10033 +If all calls to a given function are integrated, and the function is
    10034 +declared @code{static}, then the function is normally not output as
    10035 +assembler code in its own right.
    10036 +
    10037 +Enabled at level @option{-O3}.
    10038 +
    10039 +@item -finline-functions-called-once
    10040 +@opindex finline-functions-called-once
    10041 +Consider all @code{static} functions called once for inlining into their
    10042 +caller even if they are not marked @code{inline}.  If a call to a given
    10043 +function is integrated, then the function is not output as assembler code
    10044 +in its own right.
    10045 +
    10046 +Enabled at levels @option{-O1}, @option{-O2}, @option{-O3} and @option{-Os}.
    10047 +
    10048 +@item -fearly-inlining
    10049 +@opindex fearly-inlining
    10050 +Inline functions marked by @code{always_inline} and functions whose body seems
    10051 +smaller than the function call overhead early before doing
    10052 +@option{-fprofile-generate} instrumentation and real inlining pass.  Doing so
    10053 +makes profiling significantly cheaper and usually inlining faster on programs
    10054 +having large chains of nested wrapper functions.
    10055 +
    10056 +Enabled by default.
    10057 +
    10058 +@item -finline-limit=@var{n}
    10059 +@opindex finline-limit
    10060 +By default, GCC limits the size of functions that can be inlined.  This flag
    10061 +allows coarse control of this limit.  @var{n} is the size of functions that
    10062 +can be inlined in number of pseudo instructions.
    10063 +
    10064 +Inlining is actually controlled by a number of parameters, which may be
    10065 +specified individually by using @option{--param @var{name}=@var{value}}.
    10066 +The @option{-finline-limit=@var{n}} option sets some of these parameters
    10067 +as follows:
    10068 +
    10069 +@table @gcctabopt
    10070 +@item max-inline-insns-single
    10071 +is set to @var{n}/2.
    10072 +@item max-inline-insns-auto
    10073 +is set to @var{n}/2.
    10074 +@end table
    10075 +
    10076 +See below for a documentation of the individual
    10077 +parameters controlling inlining and for the defaults of these parameters.
    10078 +
    10079 +@emph{Note:} there may be no value to @option{-finline-limit} that results
    10080 +in default behavior.
    10081 +
    10082 +@emph{Note:} pseudo instruction represents, in this particular context, an
    10083 +abstract measurement of function's size.  In no way does it represent a count
    10084 +of assembly instructions and as such its exact meaning might change from one
    10085 +release to an another.
    10086 +
    10087 +@item -fkeep-inline-functions
    10088 +@opindex fkeep-inline-functions
    10089 +In C, emit @code{static} functions that are declared @code{inline}
    10090 +into the object file, even if the function has been inlined into all
    10091 +of its callers.  This switch does not affect functions using the
    10092 +@code{extern inline} extension in GNU C89@.  In C++, emit any and all
    10093 +inline functions into the object file.
    10094 +
    10095 +@item -fkeep-static-consts
    10096 +@opindex fkeep-static-consts
    10097 +Emit variables declared @code{static const} when optimization isn't turned
    10098 +on, even if the variables aren't referenced.
    10099 +
    10100 +GCC enables this option by default.  If you want to force the compiler to
    10101 +check if the variable was referenced, regardless of whether or not
    10102 +optimization is turned on, use the @option{-fno-keep-static-consts} option.
    10103 +
    10104 +@item -fmerge-constants
    10105 +@opindex fmerge-constants
    10106 +Attempt to merge identical constants (string constants and floating point
    10107 +constants) across compilation units.
    10108 +
    10109 +This option is the default for optimized compilation if the assembler and
    10110 +linker support it.  Use @option{-fno-merge-constants} to inhibit this
    10111 +behavior.
    10112 +
    10113 +Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
    10114 +
    10115 +@item -fmerge-all-constants
    10116 +@opindex fmerge-all-constants
    10117 +Attempt to merge identical constants and identical variables.
    10118 +
    10119 +This option implies @option{-fmerge-constants}.  In addition to
    10120 +@option{-fmerge-constants} this considers e.g.@: even constant initialized
    10121 +arrays or initialized constant variables with integral or floating point
    10122 +types.  Languages like C or C++ require each variable, including multiple
    10123 +instances of the same variable in recursive calls, to have distinct locations,
    10124 +so using this option will result in non-conforming
    10125 +behavior.
    10126 +
    10127 +@item -fmodulo-sched
    10128 +@opindex fmodulo-sched
    10129 +Perform swing modulo scheduling immediately before the first scheduling
    10130 +pass.  This pass looks at innermost loops and reorders their
    10131 +instructions by overlapping different iterations.
    10132 +
    10133 +@item -fmodulo-sched-allow-regmoves
    10134 +@opindex fmodulo-sched-allow-regmoves
    10135 +Perform more aggressive SMS based modulo scheduling with register moves
    10136 +allowed.  By setting this flag certain anti-dependences edges will be
    10137 +deleted which will trigger the generation of reg-moves based on the
    10138 +life-range analysis.  This option is effective only with
    10139 +@option{-fmodulo-sched} enabled.
    10140 +
    10141 +@item -fno-branch-count-reg
    10142 +@opindex fno-branch-count-reg
    10143 +Do not use ``decrement and branch'' instructions on a count register,
    10144 +but instead generate a sequence of instructions that decrement a
    10145 +register, compare it against zero, then branch based upon the result.
    10146 +This option is only meaningful on architectures that support such
    10147 +instructions, which include x86, PowerPC, IA-64 and S/390.
    10148 +
    10149 +The default is @option{-fbranch-count-reg}.
    10150 +
    10151 +@item -fno-function-cse
    10152 +@opindex fno-function-cse
    10153 +Do not put function addresses in registers; make each instruction that
    10154 +calls a constant function contain the function's address explicitly.
    10155 +
    10156 +This option results in less efficient code, but some strange hacks
    10157 +that alter the assembler output may be confused by the optimizations
    10158 +performed when this option is not used.
    10159 +
    10160 +The default is @option{-ffunction-cse}
    10161 +
    10162 +@item -fno-zero-initialized-in-bss
    10163 +@opindex fno-zero-initialized-in-bss
    10164 +If the target supports a BSS section, GCC by default puts variables that
    10165 +are initialized to zero into BSS@.  This can save space in the resulting
    10166 +code.
    10167 +
    10168 +This option turns off this behavior because some programs explicitly
    10169 +rely on variables going to the data section.  E.g., so that the
    10170 +resulting executable can find the beginning of that section and/or make
    10171 +assumptions based on that.
    10172 +
    10173 +The default is @option{-fzero-initialized-in-bss}.
    10174 +
    10175 +@item -fmudflap -fmudflapth -fmudflapir
    10176 +@opindex fmudflap
    10177 +@opindex fmudflapth
    10178 +@opindex fmudflapir
    10179 +@cindex bounds checking
    10180 +@cindex mudflap
    10181 +For front-ends that support it (C and C++), instrument all risky
    10182 +pointer/array dereferencing operations, some standard library
    10183 +string/heap functions, and some other associated constructs with
    10184 +range/validity tests.  Modules so instrumented should be immune to
    10185 +buffer overflows, invalid heap use, and some other classes of C/C++
    10186 +programming errors.  The instrumentation relies on a separate runtime
    10187 +library (@file{libmudflap}), which will be linked into a program if
    10188 +@option{-fmudflap} is given at link time.  Run-time behavior of the
    10189 +instrumented program is controlled by the @env{MUDFLAP_OPTIONS}
    10190 +environment variable.  See @code{env MUDFLAP_OPTIONS=-help a.out}
    10191 +for its options.
    10192 +
    10193 +Use @option{-fmudflapth} instead of @option{-fmudflap} to compile and to
    10194 +link if your program is multi-threaded.  Use @option{-fmudflapir}, in
    10195 +addition to @option{-fmudflap} or @option{-fmudflapth}, if
    10196 +instrumentation should ignore pointer reads.  This produces less
    10197 +instrumentation (and therefore faster execution) and still provides
    10198 +some protection against outright memory corrupting writes, but allows
    10199 +erroneously read data to propagate within a program.
    10200 +
    10201 +@item -fthread-jumps
    10202 +@opindex fthread-jumps
    10203 +Perform optimizations where we check to see if a jump branches to a
    10204 +location where another comparison subsumed by the first is found.  If
    10205 +so, the first branch is redirected to either the destination of the
    10206 +second branch or a point immediately following it, depending on whether
    10207 +the condition is known to be true or false.
    10208 +
    10209 +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    10210 +
    10211 +@item -fsplit-wide-types
    10212 +@opindex fsplit-wide-types
    10213 +When using a type that occupies multiple registers, such as @code{long
    10214 +long} on a 32-bit system, split the registers apart and allocate them
    10215 +independently.  This normally generates better code for those types,
    10216 +but may make debugging more difficult.
    10217 +
    10218 +Enabled at levels @option{-O}, @option{-O2}, @option{-O3},
    10219 +@option{-Os}.
    10220 +
    10221 +@item -fcse-follow-jumps
    10222 +@opindex fcse-follow-jumps
    10223 +In common subexpression elimination (CSE), scan through jump instructions
    10224 +when the target of the jump is not reached by any other path.  For
    10225 +example, when CSE encounters an @code{if} statement with an
    10226 +@code{else} clause, CSE will follow the jump when the condition
    10227 +tested is false.
    10228 +
    10229 +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    10230 +
    10231 +@item -fcse-skip-blocks
    10232 +@opindex fcse-skip-blocks
    10233 +This is similar to @option{-fcse-follow-jumps}, but causes CSE to
    10234 +follow jumps which conditionally skip over blocks.  When CSE
    10235 +encounters a simple @code{if} statement with no else clause,
    10236 +@option{-fcse-skip-blocks} causes CSE to follow the jump around the
    10237 +body of the @code{if}.
    10238 +
    10239 +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    10240 +
    10241 +@item -frerun-cse-after-loop
    10242 +@opindex frerun-cse-after-loop
    10243 +Re-run common subexpression elimination after loop optimizations has been
    10244 +performed.
    10245 +
    10246 +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    10247 +
    10248 +@item -fgcse
    10249 +@opindex fgcse
    10250 +Perform a global common subexpression elimination pass.
    10251 +This pass also performs global constant and copy propagation.
    10252 +
    10253 +@emph{Note:} When compiling a program using computed gotos, a GCC
    10254 +extension, you may get better runtime performance if you disable
    10255 +the global common subexpression elimination pass by adding
    10256 +@option{-fno-gcse} to the command line.
    10257 +
    10258 +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    10259 +
    10260 +@item -fgcse-lm
    10261 +@opindex fgcse-lm
    10262 +When @option{-fgcse-lm} is enabled, global common subexpression elimination will
    10263 +attempt to move loads which are only killed by stores into themselves.  This
    10264 +allows a loop containing a load/store sequence to be changed to a load outside
    10265 +the loop, and a copy/store within the loop.
    10266 +
    10267 +Enabled by default when gcse is enabled.
    10268 +
    10269 +@item -fgcse-sm
    10270 +@opindex fgcse-sm
    10271 +When @option{-fgcse-sm} is enabled, a store motion pass is run after
    10272 +global common subexpression elimination.  This pass will attempt to move
    10273 +stores out of loops.  When used in conjunction with @option{-fgcse-lm},
    10274 +loops containing a load/store sequence can be changed to a load before
    10275 +the loop and a store after the loop.
    10276 +
    10277 +Not enabled at any optimization level.
    10278 +
    10279 +@item -fgcse-las
    10280 +@opindex fgcse-las
    10281 +When @option{-fgcse-las} is enabled, the global common subexpression
    10282 +elimination pass eliminates redundant loads that come after stores to the
    10283 +same memory location (both partial and full redundancies).
    10284 +
    10285 +Not enabled at any optimization level.
    10286 +
    10287 +@item -fgcse-after-reload
    10288 +@opindex fgcse-after-reload
    10289 +When @option{-fgcse-after-reload} is enabled, a redundant load elimination
    10290 +pass is performed after reload.  The purpose of this pass is to cleanup
    10291 +redundant spilling.
    10292 +
    10293 +@item -funsafe-loop-optimizations
    10294 +@opindex funsafe-loop-optimizations
    10295 +If given, the loop optimizer will assume that loop indices do not
    10296 +overflow, and that the loops with nontrivial exit condition are not
    10297 +infinite.  This enables a wider range of loop optimizations even if
    10298 +the loop optimizer itself cannot prove that these assumptions are valid.
    10299 +Using @option{-Wunsafe-loop-optimizations}, the compiler will warn you
    10300 +if it finds this kind of loop.
    10301 +
    10302 +@item -fcrossjumping
    10303 +@opindex fcrossjumping
    10304 +Perform cross-jumping transformation.  This transformation unifies equivalent code and save code size.  The
    10305 +resulting code may or may not perform better than without cross-jumping.
    10306 +
    10307 +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    10308 +
    10309 +@item -fauto-inc-dec
    10310 +@opindex fauto-inc-dec
    10311 +Combine increments or decrements of addresses with memory accesses.
    10312 +This pass is always skipped on architectures that do not have
    10313 +instructions to support this.  Enabled by default at @option{-O} and
    10314 +higher on architectures that support this.
    10315 +
    10316 +@item -fdce
    10317 +@opindex fdce
    10318 +Perform dead code elimination (DCE) on RTL@.
    10319 +Enabled by default at @option{-O} and higher.
    10320 +
    10321 +@item -fdse
    10322 +@opindex fdse
    10323 +Perform dead store elimination (DSE) on RTL@.
    10324 +Enabled by default at @option{-O} and higher.
    10325 +
    10326 +@item -fif-conversion
    10327 +@opindex fif-conversion
    10328 +Attempt to transform conditional jumps into branch-less equivalents.  This
    10329 +include use of conditional moves, min, max, set flags and abs instructions, and
    10330 +some tricks doable by standard arithmetics.  The use of conditional execution
    10331 +on chips where it is available is controlled by @code{if-conversion2}.
    10332 +
    10333 +Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
    10334 +
    10335 +@item -fif-conversion2
    10336 +@opindex fif-conversion2
    10337 +Use conditional execution (where available) to transform conditional jumps into
    10338 +branch-less equivalents.
    10339 +
    10340 +Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
    10341 +
    10342 +@item -fdelete-null-pointer-checks
    10343 +@opindex fdelete-null-pointer-checks
    10344 +Use global dataflow analysis to identify and eliminate useless checks
    10345 +for null pointers.  The compiler assumes that dereferencing a null
    10346 +pointer would have halted the program.  If a pointer is checked after
    10347 +it has already been dereferenced, it cannot be null.
    10348 +
    10349 +In some environments, this assumption is not true, and programs can
    10350 +safely dereference null pointers.  Use
    10351 +@option{-fno-delete-null-pointer-checks} to disable this optimization
    10352 +for programs which depend on that behavior.
    10353 +
    10354 +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    10355 +
    10356 +@item -fexpensive-optimizations
    10357 +@opindex fexpensive-optimizations
    10358 +Perform a number of minor optimizations that are relatively expensive.
    10359 +
    10360 +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    10361 +
    10362 +@item -foptimize-register-move
    10363 +@itemx -fregmove
    10364 +@opindex foptimize-register-move
    10365 +@opindex fregmove
    10366 +Attempt to reassign register numbers in move instructions and as
    10367 +operands of other simple instructions in order to maximize the amount of
    10368 +register tying.  This is especially helpful on machines with two-operand
    10369 +instructions.
    10370 +
    10371 +Note @option{-fregmove} and @option{-foptimize-register-move} are the same
    10372 +optimization.
    10373 +
    10374 +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    10375 +
    10376 +@item -fira-algorithm=@var{algorithm}
    10377 +Use specified coloring algorithm for the integrated register
    10378 +allocator.  The @var{algorithm} argument should be @code{priority} or
    10379 +@code{CB}.  The first algorithm specifies Chow's priority coloring,
    10380 +the second one specifies Chaitin-Briggs coloring.  The second
    10381 +algorithm can be unimplemented for some architectures.  If it is
    10382 +implemented, it is the default because Chaitin-Briggs coloring as a
    10383 +rule generates a better code.
    10384 +
    10385 +@item -fira-region=@var{region}
    10386 +Use specified regions for the integrated register allocator.  The
    10387 +@var{region} argument should be one of @code{all}, @code{mixed}, or
    10388 +@code{one}.  The first value means using all loops as register
    10389 +allocation regions, the second value which is the default means using
    10390 +all loops except for loops with small register pressure as the
    10391 +regions, and third one means using all function as a single region.
    10392 +The first value can give best result for machines with small size and
    10393 +irregular register set, the third one results in faster and generates
    10394 +decent code and the smallest size code, and the default value usually
    10395 +give the best results in most cases and for most architectures.
    10396 +
    10397 +@item -fira-coalesce
    10398 +@opindex fira-coalesce
    10399 +Do optimistic register coalescing.  This option might be profitable for
    10400 +architectures with big regular register files.
    10401 +
    10402 +@item -fno-ira-share-save-slots
    10403 +@opindex fno-ira-share-save-slots
    10404 +Switch off sharing stack slots used for saving call used hard
    10405 +registers living through a call.  Each hard register will get a
    10406 +separate stack slot and as a result function stack frame will be
    10407 +bigger.
    10408 +
    10409 +@item -fno-ira-share-spill-slots
    10410 +@opindex fno-ira-share-spill-slots
    10411 +Switch off sharing stack slots allocated for pseudo-registers.  Each
    10412 +pseudo-register which did not get a hard register will get a separate
    10413 +stack slot and as a result function stack frame will be bigger.
    10414 +
    10415 +@item -fira-verbose=@var{n}
    10416 +@opindex fira-verbose
    10417 +Set up how verbose dump file for the integrated register allocator
    10418 +will be.  Default value is 5.  If the value is greater or equal to 10,
    10419 +the dump file will be stderr as if the value were @var{n} minus 10.
    10420 +
    10421 +@item -fdelayed-branch
    10422 +@opindex fdelayed-branch
    10423 +If supported for the target machine, attempt to reorder instructions
    10424 +to exploit instruction slots available after delayed branch
    10425 +instructions.
    10426 +
    10427 +Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
    10428 +
    10429 +@item -fschedule-insns
    10430 +@opindex fschedule-insns
    10431 +If supported for the target machine, attempt to reorder instructions to
    10432 +eliminate execution stalls due to required data being unavailable.  This
    10433 +helps machines that have slow floating point or memory load instructions
    10434 +by allowing other instructions to be issued until the result of the load
    10435 +or floating point instruction is required.
    10436 +
    10437 +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    10438 +
    10439 +@item -fschedule-insns2
    10440 +@opindex fschedule-insns2
    10441 +Similar to @option{-fschedule-insns}, but requests an additional pass of
    10442 +instruction scheduling after register allocation has been done.  This is
    10443 +especially useful on machines with a relatively small number of
    10444 +registers and where memory load instructions take more than one cycle.
    10445 +
    10446 +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    10447 +
    10448 +@item -fno-sched-interblock
    10449 +@opindex fno-sched-interblock
    10450 +Don't schedule instructions across basic blocks.  This is normally
    10451 +enabled by default when scheduling before register allocation, i.e.@:
    10452 +with @option{-fschedule-insns} or at @option{-O2} or higher.
    10453 +
    10454 +@item -fno-sched-spec
    10455 +@opindex fno-sched-spec
    10456 +Don't allow speculative motion of non-load instructions.  This is normally
    10457 +enabled by default when scheduling before register allocation, i.e.@:
    10458 +with @option{-fschedule-insns} or at @option{-O2} or higher.
    10459 +
    10460 +@item -fsched-spec-load
    10461 +@opindex fsched-spec-load
    10462 +Allow speculative motion of some load instructions.  This only makes
    10463 +sense when scheduling before register allocation, i.e.@: with
    10464 +@option{-fschedule-insns} or at @option{-O2} or higher.
    10465 +
    10466 +@item -fsched-spec-load-dangerous
    10467 +@opindex fsched-spec-load-dangerous
    10468 +Allow speculative motion of more load instructions.  This only makes
    10469 +sense when scheduling before register allocation, i.e.@: with
    10470 +@option{-fschedule-insns} or at @option{-O2} or higher.
    10471 +
    10472 +@item -fsched-stalled-insns
    10473 +@itemx -fsched-stalled-insns=@var{n}
    10474 +@opindex fsched-stalled-insns
    10475 +Define how many insns (if any) can be moved prematurely from the queue
    10476 +of stalled insns into the ready list, during the second scheduling pass.
    10477 +@option{-fno-sched-stalled-insns} means that no insns will be moved
    10478 +prematurely, @option{-fsched-stalled-insns=0} means there is no limit
    10479 +on how many queued insns can be moved prematurely.
    10480 +@option{-fsched-stalled-insns} without a value is equivalent to
    10481 +@option{-fsched-stalled-insns=1}.
    10482 +
    10483 +@item -fsched-stalled-insns-dep
    10484 +@itemx -fsched-stalled-insns-dep=@var{n}
    10485 +@opindex fsched-stalled-insns-dep
    10486 +Define how many insn groups (cycles) will be examined for a dependency
    10487 +on a stalled insn that is candidate for premature removal from the queue
    10488 +of stalled insns.  This has an effect only during the second scheduling pass,
    10489 +and only if @option{-fsched-stalled-insns} is used.
    10490 +@option{-fno-sched-stalled-insns-dep} is equivalent to
    10491 +@option{-fsched-stalled-insns-dep=0}.
    10492 +@option{-fsched-stalled-insns-dep} without a value is equivalent to
    10493 +@option{-fsched-stalled-insns-dep=1}.
    10494 +
    10495 +@item -fsched2-use-superblocks
    10496 +@opindex fsched2-use-superblocks
    10497 +When scheduling after register allocation, do use superblock scheduling
    10498 +algorithm.  Superblock scheduling allows motion across basic block boundaries
    10499 +resulting on faster schedules.  This option is experimental, as not all machine
    10500 +descriptions used by GCC model the CPU closely enough to avoid unreliable
    10501 +results from the algorithm.
    10502 +
    10503 +This only makes sense when scheduling after register allocation, i.e.@: with
    10504 +@option{-fschedule-insns2} or at @option{-O2} or higher.
    10505 +
    10506 +@item -fsched2-use-traces
    10507 +@opindex fsched2-use-traces
    10508 +Use @option{-fsched2-use-superblocks} algorithm when scheduling after register
    10509 +allocation and additionally perform code duplication in order to increase the
    10510 +size of superblocks using tracer pass.  See @option{-ftracer} for details on
    10511 +trace formation.
    10512 +
    10513 +This mode should produce faster but significantly longer programs.  Also
    10514 +without @option{-fbranch-probabilities} the traces constructed may not
    10515 +match the reality and hurt the performance.  This only makes
    10516 +sense when scheduling after register allocation, i.e.@: with
    10517 +@option{-fschedule-insns2} or at @option{-O2} or higher.
    10518 +
    10519 +@item -fsee
    10520 +@opindex fsee
    10521 +Eliminate redundant sign extension instructions and move the non-redundant
    10522 +ones to optimal placement using lazy code motion (LCM).
    10523 +
    10524 +@item -freschedule-modulo-scheduled-loops
    10525 +@opindex freschedule-modulo-scheduled-loops
    10526 +The modulo scheduling comes before the traditional scheduling, if a loop
    10527 +was modulo scheduled we may want to prevent the later scheduling passes
    10528 +from changing its schedule, we use this option to control that.
    10529 +
    10530 +@item -fselective-scheduling
    10531 +@opindex fselective-scheduling
    10532 +Schedule instructions using selective scheduling algorithm.  Selective
    10533 +scheduling runs instead of the first scheduler pass.
    10534 +
    10535 +@item -fselective-scheduling2
    10536 +@opindex fselective-scheduling2
    10537 +Schedule instructions using selective scheduling algorithm.  Selective
    10538 +scheduling runs instead of the second scheduler pass.
    10539 +
    10540 +@item -fsel-sched-pipelining
    10541 +@opindex fsel-sched-pipelining
    10542 +Enable software pipelining of innermost loops during selective scheduling. 
    10543 +This option has no effect until one of @option{-fselective-scheduling} or
    10544 +@option{-fselective-scheduling2} is turned on.
    10545 +
    10546 +@item -fsel-sched-pipelining-outer-loops
    10547 +@opindex fsel-sched-pipelining-outer-loops
    10548 +When pipelining loops during selective scheduling, also pipeline outer loops.
    10549 +This option has no effect until @option{-fsel-sched-pipelining} is turned on.
    10550 +
    10551 +@item -fcaller-saves
    10552 +@opindex fcaller-saves
    10553 +Enable values to be allocated in registers that will be clobbered by
    10554 +function calls, by emitting extra instructions to save and restore the
    10555 +registers around such calls.  Such allocation is done only when it
    10556 +seems to result in better code than would otherwise be produced.
    10557 +
    10558 +This option is always enabled by default on certain machines, usually
    10559 +those which have no call-preserved registers to use instead.
    10560 +
    10561 +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    10562 +
    10563 +@item -fconserve-stack
    10564 +@opindex fconserve-stack
    10565 +Attempt to minimize stack usage.  The compiler will attempt to use less
    10566 +stack space, even if that makes the program slower.  This option
    10567 +implies setting the @option{large-stack-frame} parameter to 100
    10568 +and the @option{large-stack-frame-growth} parameter to 400.
    10569 +
    10570 +@item -ftree-reassoc
    10571 +@opindex ftree-reassoc
    10572 +Perform reassociation on trees.  This flag is enabled by default
    10573 +at @option{-O} and higher.
    10574 +
    10575 +@item -ftree-pre
    10576 +@opindex ftree-pre
    10577 +Perform partial redundancy elimination (PRE) on trees.  This flag is
    10578 +enabled by default at @option{-O2} and @option{-O3}.
    10579 +
    10580 +@item -ftree-fre
    10581 +@opindex ftree-fre
    10582 +Perform full redundancy elimination (FRE) on trees.  The difference
    10583 +between FRE and PRE is that FRE only considers expressions
    10584 +that are computed on all paths leading to the redundant computation.
    10585 +This analysis is faster than PRE, though it exposes fewer redundancies.
    10586 +This flag is enabled by default at @option{-O} and higher.
    10587 +
    10588 +@item -ftree-copy-prop
    10589 +@opindex ftree-copy-prop
    10590 +Perform copy propagation on trees.  This pass eliminates unnecessary
    10591 +copy operations.  This flag is enabled by default at @option{-O} and
    10592 +higher.
    10593 +
    10594 +@item -fipa-pure-const
    10595 +@opindex fipa-pure-const
    10596 +Discover which functions are pure or constant.
    10597 +Enabled by default at @option{-O} and higher.
    10598 +
    10599 +@item -fipa-reference
    10600 +@opindex fipa-reference
    10601 +Discover which static variables do not escape cannot escape the
    10602 +compilation unit.
    10603 +Enabled by default at @option{-O} and higher.
    10604 +
    10605 +@item -fipa-struct-reorg
    10606 +@opindex fipa-struct-reorg
    10607 +Perform structure reorganization optimization, that change C-like structures
    10608 +layout in order to better utilize spatial locality.  This transformation is
    10609 +affective for programs containing arrays of structures.  Available in two
    10610 +compilation modes: profile-based (enabled with @option{-fprofile-generate})
    10611 +or static (which uses built-in heuristics).  Require @option{-fipa-type-escape}
    10612 +to provide the safety of this transformation.  It works only in whole program
    10613 +mode, so it requires @option{-fwhole-program} and @option{-combine} to be
    10614 +enabled.  Structures considered @samp{cold} by this transformation are not
    10615 +affected (see @option{--param struct-reorg-cold-struct-ratio=@var{value}}).
    10616 +
    10617 +With this flag, the program debug info reflects a new structure layout.
    10618 +
    10619 +@item -fipa-pta
    10620 +@opindex fipa-pta
    10621 +Perform interprocedural pointer analysis.  This option is experimental
    10622 +and does not affect generated code.
    10623 +
    10624 +@item -fipa-cp
    10625 +@opindex fipa-cp
    10626 +Perform interprocedural constant propagation.
    10627 +This optimization analyzes the program to determine when values passed
    10628 +to functions are constants and then optimizes accordingly. 
    10629 +This optimization can substantially increase performance
    10630 +if the application has constants passed to functions.
    10631 +This flag is enabled by default at @option{-O2}, @option{-Os} and @option{-O3}.
    10632 +
    10633 +@item -fipa-cp-clone
    10634 +@opindex fipa-cp-clone
    10635 +Perform function cloning to make interprocedural constant propagation stronger.
    10636 +When enabled, interprocedural constant propagation will perform function cloning
    10637 +when externally visible function can be called with constant arguments.
    10638 +Because this optimization can create multiple copies of functions,
    10639 +it may significantly increase code size
    10640 +(see @option{--param ipcp-unit-growth=@var{value}}).
    10641 +This flag is enabled by default at @option{-O3}.
    10642 +
    10643 +@item -fipa-matrix-reorg
    10644 +@opindex fipa-matrix-reorg
    10645 +Perform matrix flattening and transposing.
    10646 +Matrix flattening tries to replace a m-dimensional matrix
    10647 +with its equivalent n-dimensional matrix, where n < m.
    10648 +This reduces the level of indirection needed for accessing the elements
    10649 +of the matrix. The second optimization is matrix transposing that
    10650 +attempts to change the order of the matrix's dimensions in order to
    10651 +improve cache locality.
    10652 +Both optimizations need the @option{-fwhole-program} flag.
    10653 +Transposing is enabled only if profiling information is available.
    10654 +
    10655 +
    10656 +@item -ftree-sink
    10657 +@opindex ftree-sink
    10658 +Perform forward store motion  on trees.  This flag is
    10659 +enabled by default at @option{-O} and higher.
    10660 +
    10661 +@item -ftree-ccp
    10662 +@opindex ftree-ccp
    10663 +Perform sparse conditional constant propagation (CCP) on trees.  This
    10664 +pass only operates on local scalar variables and is enabled by default
    10665 +at @option{-O} and higher.
    10666 +
    10667 +@item -ftree-switch-conversion
    10668 +Perform conversion of simple initializations in a switch to
    10669 +initializations from a scalar array.  This flag is enabled by default
    10670 +at @option{-O2} and higher.
    10671 +
    10672 +@item -ftree-dce
    10673 +@opindex ftree-dce
    10674 +Perform dead code elimination (DCE) on trees.  This flag is enabled by
    10675 +default at @option{-O} and higher.
    10676 +
    10677 +@item -ftree-builtin-call-dce
    10678 +@opindex ftree-builtin-call-dce
    10679 +Perform conditional dead code elimination (DCE) for calls to builtin functions
    10680 +that may set @code{errno} but are otherwise side-effect free.  This flag is
    10681 +enabled by default at @option{-O2} and higher if @option{-Os} is not also
    10682 +specified.
    10683 +
    10684 +@item -ftree-dominator-opts
    10685 +@opindex ftree-dominator-opts
    10686 +Perform a variety of simple scalar cleanups (constant/copy
    10687 +propagation, redundancy elimination, range propagation and expression
    10688 +simplification) based on a dominator tree traversal.  This also
    10689 +performs jump threading (to reduce jumps to jumps). This flag is
    10690 +enabled by default at @option{-O} and higher.
    10691 +
    10692 +@item -ftree-dse
    10693 +@opindex ftree-dse
    10694 +Perform dead store elimination (DSE) on trees.  A dead store is a store into
    10695 +a memory location which will later be overwritten by another store without
    10696 +any intervening loads.  In this case the earlier store can be deleted.  This
    10697 +flag is enabled by default at @option{-O} and higher.
    10698 +
    10699 +@item -ftree-ch
    10700 +@opindex ftree-ch
    10701 +Perform loop header copying on trees.  This is beneficial since it increases
    10702 +effectiveness of code motion optimizations.  It also saves one jump.  This flag
    10703 +is enabled by default at @option{-O} and higher.  It is not enabled
    10704 +for @option{-Os}, since it usually increases code size.
    10705 +
    10706 +@item -ftree-loop-optimize
    10707 +@opindex ftree-loop-optimize
    10708 +Perform loop optimizations on trees.  This flag is enabled by default
    10709 +at @option{-O} and higher.
    10710 +
    10711 +@item -ftree-loop-linear
    10712 +@opindex ftree-loop-linear
    10713 +Perform linear loop transformations on tree.  This flag can improve cache
    10714 +performance and allow further loop optimizations to take place.
    10715 +
    10716 +@item -floop-interchange
    10717 +Perform loop interchange transformations on loops.  Interchanging two
    10718 +nested loops switches the inner and outer loops.  For example, given a
    10719 +loop like:
    10720 +@smallexample
    10721 +DO J = 1, M
    10722 +  DO I = 1, N
    10723 +    A(J, I) = A(J, I) * C
    10724 +  ENDDO
    10725 +ENDDO
    10726 +@end smallexample
    10727 +loop interchange will transform the loop as if the user had written:
    10728 +@smallexample
    10729 +DO I = 1, N
    10730 +  DO J = 1, M
    10731 +    A(J, I) = A(J, I) * C
    10732 +  ENDDO
    10733 +ENDDO
    10734 +@end smallexample
    10735 +which can be beneficial when @code{N} is larger than the caches,
    10736 +because in Fortran, the elements of an array are stored in memory
    10737 +contiguously by column, and the original loop iterates over rows,
    10738 +potentially creating at each access a cache miss.  This optimization
    10739 +applies to all the languages supported by GCC and is not limited to
    10740 +Fortran.  To use this code transformation, GCC has to be configured
    10741 +with @option{--with-ppl} and @option{--with-cloog} to enable the
    10742 +Graphite loop transformation infrastructure.
    10743 +
    10744 +@item -floop-strip-mine
    10745 +Perform loop strip mining transformations on loops.  Strip mining
    10746 +splits a loop into two nested loops.  The outer loop has strides
    10747 +equal to the strip size and the inner loop has strides of the
    10748 +original loop within a strip.  For example, given a loop like:
    10749 +@smallexample
    10750 +DO I = 1, N
    10751 +  A(I) = A(I) + C
    10752 +ENDDO
    10753 +@end smallexample
    10754 +loop strip mining will transform the loop as if the user had written:
    10755 +@smallexample
    10756 +DO II = 1, N, 4
    10757 +  DO I = II, min (II + 3, N)
    10758 +    A(I) = A(I) + C
    10759 +  ENDDO
    10760 +ENDDO
    10761 +@end smallexample
    10762 +This optimization applies to all the languages supported by GCC and is
    10763 +not limited to Fortran.  To use this code transformation, GCC has to
    10764 +be configured with @option{--with-ppl} and @option{--with-cloog} to
    10765 +enable the Graphite loop transformation infrastructure.
    10766 +
    10767 +@item -floop-block
    10768 +Perform loop blocking transformations on loops.  Blocking strip mines
    10769 +each loop in the loop nest such that the memory accesses of the
    10770 +element loops fit inside caches.  For example, given a loop like:
    10771 +@smallexample
    10772 +DO I = 1, N
    10773 +  DO J = 1, M
    10774 +    A(J, I) = B(I) + C(J)
    10775 +  ENDDO
    10776 +ENDDO
    10777 +@end smallexample
    10778 +loop blocking will transform the loop as if the user had written:
    10779 +@smallexample
    10780 +DO II = 1, N, 64
    10781 +  DO JJ = 1, M, 64
    10782 +    DO I = II, min (II + 63, N)
    10783 +      DO J = JJ, min (JJ + 63, M)
    10784 +        A(J, I) = B(I) + C(J)
    10785 +      ENDDO
    10786 +    ENDDO
    10787 +  ENDDO
    10788 +ENDDO
    10789 +@end smallexample
    10790 +which can be beneficial when @code{M} is larger than the caches,
    10791 +because the innermost loop will iterate over a smaller amount of data
    10792 +that can be kept in the caches.  This optimization applies to all the
    10793 +languages supported by GCC and is not limited to Fortran.  To use this
    10794 +code transformation, GCC has to be configured with @option{--with-ppl}
    10795 +and @option{--with-cloog} to enable the Graphite loop transformation
    10796 +infrastructure.
    10797 +
    10798 +@item -fcheck-data-deps
    10799 +@opindex fcheck-data-deps
    10800 +Compare the results of several data dependence analyzers.  This option
    10801 +is used for debugging the data dependence analyzers.
    10802 +
    10803 +@item -ftree-loop-distribution
    10804 +Perform loop distribution.  This flag can improve cache performance on
    10805 +big loop bodies and allow further loop optimizations, like
    10806 +parallelization or vectorization, to take place.  For example, the loop
    10807 +@smallexample
    10808 +DO I = 1, N
    10809 +  A(I) = B(I) + C
    10810 +  D(I) = E(I) * F
    10811 +ENDDO
    10812 +@end smallexample
    10813 +is transformed to
    10814 +@smallexample
    10815 +DO I = 1, N
    10816 +   A(I) = B(I) + C
    10817 +ENDDO
    10818 +DO I = 1, N
    10819 +   D(I) = E(I) * F
    10820 +ENDDO
    10821 +@end smallexample
    10822 +
    10823 +@item -ftree-loop-im
    10824 +@opindex ftree-loop-im
    10825 +Perform loop invariant motion on trees.  This pass moves only invariants that
    10826 +would be hard to handle at RTL level (function calls, operations that expand to
    10827 +nontrivial sequences of insns).  With @option{-funswitch-loops} it also moves
    10828 +operands of conditions that are invariant out of the loop, so that we can use
    10829 +just trivial invariantness analysis in loop unswitching.  The pass also includes
    10830 +store motion.
    10831 +
    10832 +@item -ftree-loop-ivcanon
    10833 +@opindex ftree-loop-ivcanon
    10834 +Create a canonical counter for number of iterations in the loop for that
    10835 +determining number of iterations requires complicated analysis.  Later
    10836 +optimizations then may determine the number easily.  Useful especially
    10837 +in connection with unrolling.
    10838 +
    10839 +@item -fivopts
    10840 +@opindex fivopts
    10841 +Perform induction variable optimizations (strength reduction, induction
    10842 +variable merging and induction variable elimination) on trees.
    10843 +
    10844 +@item -ftree-parallelize-loops=n
    10845 +@opindex ftree-parallelize-loops
    10846 +Parallelize loops, i.e., split their iteration space to run in n threads.
    10847 +This is only possible for loops whose iterations are independent
    10848 +and can be arbitrarily reordered.  The optimization is only
    10849 +profitable on multiprocessor machines, for loops that are CPU-intensive,
    10850 +rather than constrained e.g.@: by memory bandwidth.  This option
    10851 +implies @option{-pthread}, and thus is only supported on targets
    10852 +that have support for @option{-pthread}.
    10853 +
    10854 +@item -ftree-sra
    10855 +@opindex ftree-sra
    10856 +Perform scalar replacement of aggregates.  This pass replaces structure
    10857 +references with scalars to prevent committing structures to memory too
    10858 +early.  This flag is enabled by default at @option{-O} and higher.
    10859 +
    10860 +@item -ftree-copyrename
    10861 +@opindex ftree-copyrename
    10862 +Perform copy renaming on trees.  This pass attempts to rename compiler
    10863 +temporaries to other variables at copy locations, usually resulting in
    10864 +variable names which more closely resemble the original variables.  This flag
    10865 +is enabled by default at @option{-O} and higher.
    10866 +
    10867 +@item -ftree-ter
    10868 +@opindex ftree-ter
    10869 +Perform temporary expression replacement during the SSA->normal phase.  Single
    10870 +use/single def temporaries are replaced at their use location with their
    10871 +defining expression.  This results in non-GIMPLE code, but gives the expanders
    10872 +much more complex trees to work on resulting in better RTL generation.  This is
    10873 +enabled by default at @option{-O} and higher.
    10874 +
    10875 +@item -ftree-vectorize
    10876 +@opindex ftree-vectorize
    10877 +Perform loop vectorization on trees. This flag is enabled by default at
    10878 +@option{-O3}.
    10879 +
    10880 +@item -ftree-vect-loop-version
    10881 +@opindex ftree-vect-loop-version
    10882 +Perform loop versioning when doing loop vectorization on trees.  When a loop
    10883 +appears to be vectorizable except that data alignment or data dependence cannot
    10884 +be determined at compile time then vectorized and non-vectorized versions of
    10885 +the loop are generated along with runtime checks for alignment or dependence
    10886 +to control which version is executed.  This option is enabled by default
    10887 +except at level @option{-Os} where it is disabled.
    10888 +
    10889 +@item -fvect-cost-model
    10890 +@opindex fvect-cost-model
    10891 +Enable cost model for vectorization.
    10892 +
    10893 +@item -ftree-vrp
    10894 +@opindex ftree-vrp
    10895 +Perform Value Range Propagation on trees.  This is similar to the
    10896 +constant propagation pass, but instead of values, ranges of values are
    10897 +propagated.  This allows the optimizers to remove unnecessary range
    10898 +checks like array bound checks and null pointer checks.  This is
    10899 +enabled by default at @option{-O2} and higher.  Null pointer check
    10900 +elimination is only done if @option{-fdelete-null-pointer-checks} is
    10901 +enabled.
    10902 +
    10903 +@item -ftracer
    10904 +@opindex ftracer
    10905 +Perform tail duplication to enlarge superblock size.  This transformation
    10906 +simplifies the control flow of the function allowing other optimizations to do
    10907 +better job.
    10908 +
    10909 +@item -funroll-loops
    10910 +@opindex funroll-loops
    10911 +Unroll loops whose number of iterations can be determined at compile
    10912 +time or upon entry to the loop.  @option{-funroll-loops} implies
    10913 +@option{-frerun-cse-after-loop}.  This option makes code larger,
    10914 +and may or may not make it run faster.
    10915 +
    10916 +@item -funroll-all-loops
    10917 +@opindex funroll-all-loops
    10918 +Unroll all loops, even if their number of iterations is uncertain when
    10919 +the loop is entered.  This usually makes programs run more slowly.
    10920 +@option{-funroll-all-loops} implies the same options as
    10921 +@option{-funroll-loops},
    10922 +
    10923 +@item -fsplit-ivs-in-unroller
    10924 +@opindex fsplit-ivs-in-unroller
    10925 +Enables expressing of values of induction variables in later iterations
    10926 +of the unrolled loop using the value in the first iteration.  This breaks
    10927 +long dependency chains, thus improving efficiency of the scheduling passes.
    10928 +
    10929 +Combination of @option{-fweb} and CSE is often sufficient to obtain the
    10930 +same effect.  However in cases the loop body is more complicated than
    10931 +a single basic block, this is not reliable.  It also does not work at all
    10932 +on some of the architectures due to restrictions in the CSE pass.
    10933 +
    10934 +This optimization is enabled by default.
    10935 +
    10936 +@item -fvariable-expansion-in-unroller
    10937 +@opindex fvariable-expansion-in-unroller
    10938 +With this option, the compiler will create multiple copies of some
    10939 +local variables when unrolling a loop which can result in superior code.
    10940 +
    10941 +@item -fpredictive-commoning
    10942 +@opindex fpredictive-commoning
    10943 +Perform predictive commoning optimization, i.e., reusing computations
    10944 +(especially memory loads and stores) performed in previous
    10945 +iterations of loops.
    10946 +
    10947 +This option is enabled at level @option{-O3}.
    10948 +
    10949 +@item -fprefetch-loop-arrays
    10950 +@opindex fprefetch-loop-arrays
    10951 +If supported by the target machine, generate instructions to prefetch
    10952 +memory to improve the performance of loops that access large arrays.
    10953 +
    10954 +This option may generate better or worse code; results are highly
    10955 +dependent on the structure of loops within the source code.
    10956 +
    10957 +Disabled at level @option{-Os}.
    10958 +
    10959 +@item -fno-peephole
    10960 +@itemx -fno-peephole2
    10961 +@opindex fno-peephole
    10962 +@opindex fno-peephole2
    10963 +Disable any machine-specific peephole optimizations.  The difference
    10964 +between @option{-fno-peephole} and @option{-fno-peephole2} is in how they
    10965 +are implemented in the compiler; some targets use one, some use the
    10966 +other, a few use both.
    10967 +
    10968 +@option{-fpeephole} is enabled by default.
    10969 +@option{-fpeephole2} enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    10970 +
    10971 +@item -fno-guess-branch-probability
    10972 +@opindex fno-guess-branch-probability
    10973 +Do not guess branch probabilities using heuristics.
    10974 +
    10975 +GCC will use heuristics to guess branch probabilities if they are
    10976 +not provided by profiling feedback (@option{-fprofile-arcs}).  These
    10977 +heuristics are based on the control flow graph.  If some branch probabilities
    10978 +are specified by @samp{__builtin_expect}, then the heuristics will be
    10979 +used to guess branch probabilities for the rest of the control flow graph,
    10980 +taking the @samp{__builtin_expect} info into account.  The interactions
    10981 +between the heuristics and @samp{__builtin_expect} can be complex, and in
    10982 +some cases, it may be useful to disable the heuristics so that the effects
    10983 +of @samp{__builtin_expect} are easier to understand.
    10984 +
    10985 +The default is @option{-fguess-branch-probability} at levels
    10986 +@option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
    10987 +
    10988 +@item -freorder-blocks
    10989 +@opindex freorder-blocks
    10990 +Reorder basic blocks in the compiled function in order to reduce number of
    10991 +taken branches and improve code locality.
    10992 +
    10993 +Enabled at levels @option{-O2}, @option{-O3}.
    10994 +
    10995 +@item -freorder-blocks-and-partition
    10996 +@opindex freorder-blocks-and-partition
    10997 +In addition to reordering basic blocks in the compiled function, in order
    10998 +to reduce number of taken branches, partitions hot and cold basic blocks
    10999 +into separate sections of the assembly and .o files, to improve
    11000 +paging and cache locality performance.
    11001 +
    11002 +This optimization is automatically turned off in the presence of
    11003 +exception handling, for linkonce sections, for functions with a user-defined
    11004 +section attribute and on any architecture that does not support named
    11005 +sections.
    11006 +
    11007 +@item -freorder-functions
    11008 +@opindex freorder-functions
    11009 +Reorder functions in the object file in order to
    11010 +improve code locality.  This is implemented by using special
    11011 +subsections @code{} for most frequently executed functions and
    11012 +@code{.text.unlikely} for unlikely executed functions.  Reordering is done by
    11013 +the linker so object file format must support named sections and linker must
    11014 +place them in a reasonable way.
    11015 +
    11016 +Also profile feedback must be available in to make this option effective.  See
    11017 +@option{-fprofile-arcs} for details.
    11018 +
    11019 +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
    11020 +
    11021 +@item -fstrict-aliasing
    11022 +@opindex fstrict-aliasing
    11023 +Allow the compiler to assume the strictest aliasing rules applicable to
    11024 +the language being compiled.  For C (and C++), this activates
    11025 +optimizations based on the type of expressions.  In particular, an
    11026 +object of one type is assumed never to reside at the same address as an
    11027 +object of a different type, unless the types are almost the same.  For
    11028 +example, an @code{unsigned int} can alias an @code{int}, but not a
    11029 +@code{void*} or a @code{double}.  A character type may alias any other
    11030 +type.
    11031 +
    11032 +@anchor{Type-punning}Pay special attention to code like this:
    11033 +@smallexample
    11034 +union a_union @{
    11035 +  int i;
    11036 +  double d;
    11037 +@};
    11038 +
    11039 +int f() @{
    11040 +  union a_union t;
    11041 +  t.d = 3.0;
    11042 +  return t.i;
    11043 +@}
    11044 +@end smallexample
    11045 +The practice of reading from a different union member than the one most
    11046 +recently written to (called ``type-punning'') is common.  Even with
    11047 +@option{-fstrict-aliasing}, type-punning is allowed, provided the memory
    11048 +is accessed through the union type.  So, the code above will work as
    11049 +expected.  @xref{Structures unions enumerations and bit-fields
    11050 +implementation}.  However, this code might not:
    11051 +@smallexample
    11052 +int f() @{
    11053 +  union a_union t;
    11054 +  int* ip;
    11055 +  t.d = 3.0;
    11056 +  ip = &t.i;
    11057 +  return *ip;
    11058 +@}
    11059 +@end smallexample
    11060 +
    11061 +Similarly, access by taking the address, casting the resulting pointer
    11062 +and dereferencing the result has undefined behavior, even if the cast
    11063 +uses a union type, e.g.:
    11064 +@smallexample
    11065 +int f() @{
    11066 +  double d = 3.0;
    11067 +  return ((union a_union *) &d)->i;
    11068 +@}
    11069 +@end smallexample
    11070 +
    11071 +The @option{-fstrict-aliasing} option is enabled at levels
    11072 +@option{-O2}, @option{-O3}, @option{-Os}.
    11073 +
    11074 +@item -fstrict-overflow
    11075 +@opindex fstrict-overflow
    11076 +Allow the compiler to assume strict signed overflow rules, depending
    11077 +on the language being compiled.  For C (and C++) this means that
    11078 +overflow when doing arithmetic with signed numbers is undefined, which
    11079 +means that the compiler may assume that it will not happen.  This
    11080 +permits various optimizations.  For example, the compiler will assume
    11081 +that an expression like @code{i + 10 > i} will always be true for
    11082 +signed @code{i}.  This assumption is only valid if signed overflow is
    11083 +undefined, as the expression is false if @code{i + 10} overflows when
    11084 +using twos complement arithmetic.  When this option is in effect any
    11085 +attempt to determine whether an operation on signed numbers will
    11086 +overflow must be written carefully to not actually involve overflow.
    11087 +
    11088 +This option also allows the compiler to assume strict pointer
    11089 +semantics: given a pointer to an object, if adding an offset to that
    11090 +pointer does not produce a pointer to the same object, the addition is
    11091 +undefined.  This permits the compiler to conclude that @code{p + u >
    11092 +p} is always true for a pointer @code{p} and unsigned integer
    11093 +@code{u}.  This assumption is only valid because pointer wraparound is
    11094 +undefined, as the expression is false if @code{p + u} overflows using
    11095 +twos complement arithmetic.
    11096 +
    11097 +See also the @option{-fwrapv} option.  Using @option{-fwrapv} means
    11098 +that integer signed overflow is fully defined: it wraps.  When
    11099 +@option{-fwrapv} is used, there is no difference between
    11100 +@option{-fstrict-overflow} and @option{-fno-strict-overflow} for
    11101 +integers.  With @option{-fwrapv} certain types of overflow are
    11102 +permitted.  For example, if the compiler gets an overflow when doing
    11103 +arithmetic on constants, the overflowed value can still be used with
    11104 +@option{-fwrapv}, but not otherwise.
    11105 +
    11106 +The @option{-fstrict-overflow} option is enabled at levels
    11107 +@option{-O2}, @option{-O3}, @option{-Os}.
    11108 +
    11109 +@item -falign-functions
    11110 +@itemx -falign-functions=@var{n}
    11111 +@opindex falign-functions
    11112 +Align the start of functions to the next power-of-two greater than
    11113 +@var{n}, skipping up to @var{n} bytes.  For instance,
    11114 +@option{-falign-functions=32} aligns functions to the next 32-byte
    11115 +boundary, but @option{-falign-functions=24} would align to the next
    11116 +32-byte boundary only if this can be done by skipping 23 bytes or less.
    11117 +
    11118 +@option{-fno-align-functions} and @option{-falign-functions=1} are
    11119 +equivalent and mean that functions will not be aligned.
    11120 +
    11121 +Some assemblers only support this flag when @var{n} is a power of two;
    11122 +in that case, it is rounded up.
    11123 +
    11124 +If @var{n} is not specified or is zero, use a machine-dependent default.
    11125 +
    11126 +Enabled at levels @option{-O2}, @option{-O3}.
    11127 +
    11128 +@item -falign-labels
    11129 +@itemx -falign-labels=@var{n}
    11130 +@opindex falign-labels
    11131 +Align all branch targets to a power-of-two boundary, skipping up to
    11132 +@var{n} bytes like @option{-falign-functions}.  This option can easily
    11133 +make code slower, because it must insert dummy operations for when the
    11134 +branch target is reached in the usual flow of the code.
    11135 +
    11136 +@option{-fno-align-labels} and @option{-falign-labels=1} are
    11137 +equivalent and mean that labels will not be aligned.
    11138 +
    11139 +If @option{-falign-loops} or @option{-falign-jumps} are applicable and
    11140 +are greater than this value, then their values are used instead.
    11141 +
    11142 +If @var{n} is not specified or is zero, use a machine-dependent default
    11143 +which is very likely to be @samp{1}, meaning no alignment.
    11144 +
    11145 +Enabled at levels @option{-O2}, @option{-O3}.
    11146 +
    11147 +@item -falign-loops
    11148 +@itemx -falign-loops=@var{n}
    11149 +@opindex falign-loops
    11150 +Align loops to a power-of-two boundary, skipping up to @var{n} bytes
    11151 +like @option{-falign-functions}.  The hope is that the loop will be
    11152 +executed many times, which will make up for any execution of the dummy
    11153 +operations.
    11154 +
    11155 +@option{-fno-align-loops} and @option{-falign-loops=1} are
    11156 +equivalent and mean that loops will not be aligned.
    11157 +
    11158 +If @var{n} is not specified or is zero, use a machine-dependent default.
    11159 +
    11160 +Enabled at levels @option{-O2}, @option{-O3}.
    11161 +
    11162 +@item -falign-jumps
    11163 +@itemx -falign-jumps=@var{n}
    11164 +@opindex falign-jumps
    11165 +Align branch targets to a power-of-two boundary, for branch targets
    11166 +where the targets can only be reached by jumping, skipping up to @var{n}
    11167 +bytes like @option{-falign-functions}.  In this case, no dummy operations
    11168 +need be executed.
    11169 +
    11170 +@option{-fno-align-jumps} and @option{-falign-jumps=1} are
    11171 +equivalent and mean that loops will not be aligned.
    11172 +
    11173 +If @var{n} is not specified or is zero, use a machine-dependent default.
    11174 +
    11175 +Enabled at levels @option{-O2}, @option{-O3}.
    11176 +
    11177 +@item -funit-at-a-time
    11178 +@opindex funit-at-a-time
    11179 +This option is left for compatibility reasons. @option{-funit-at-a-time}
    11180 +has no effect, while @option{-fno-unit-at-a-time} implies
    11181 +@option{-fno-toplevel-reorder} and @option{-fno-section-anchors}.
    11182 +
    11183 +Enabled by default.
    11184 +
    11185 +@item -fno-toplevel-reorder
    11186 +@opindex fno-toplevel-reorder
    11187 +Do not reorder top-level functions, variables, and @code{asm}
    11188 +statements.  Output them in the same order that they appear in the
    11189 +input file.  When this option is used, unreferenced static variables
    11190 +will not be removed.  This option is intended to support existing code
    11191 +which relies on a particular ordering.  For new code, it is better to
    11192 +use attributes.
    11193 +
    11194 +Enabled at level @option{-O0}.  When disabled explicitly, it also imply
    11195 +@option{-fno-section-anchors} that is otherwise enabled at @option{-O0} on some
    11196 +targets.
    11197 +
    11198 +@item -fweb
    11199 +@opindex fweb
    11200 +Constructs webs as commonly used for register allocation purposes and assign
    11201 +each web individual pseudo register.  This allows the register allocation pass
    11202 +to operate on pseudos directly, but also strengthens several other optimization
    11203 +passes, such as CSE, loop optimizer and trivial dead code remover.  It can,
    11204 +however, make debugging impossible, since variables will no longer stay in a
    11205 +``home register''.
    11206 +
    11207 +Enabled by default with @option{-funroll-loops}.
    11208 +
    11209 +@item -fwhole-program
    11210 +@opindex fwhole-program
    11211 +Assume that the current compilation unit represents whole program being
    11212 +compiled.  All public functions and variables with the exception of @code{main}
    11213 +and those merged by attribute @code{externally_visible} become static functions
    11214 +and in a affect gets more aggressively optimized by interprocedural optimizers.
    11215 +While this option is equivalent to proper use of @code{static} keyword for
    11216 +programs consisting of single file, in combination with option
    11217 +@option{--combine} this flag can be used to compile most of smaller scale C
    11218 +programs since the functions and variables become local for the whole combined
    11219 +compilation unit, not for the single source file itself.
    11220 +
    11221 +This option is not supported for Fortran programs.
    11222 +
    11223 +@item -fcprop-registers
    11224 +@opindex fcprop-registers
    11225 +After register allocation and post-register allocation instruction splitting,
    11226 +we perform a copy-propagation pass to try to reduce scheduling dependencies
    11227 +and occasionally eliminate the copy.
    11228 +
    11229 +Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
    11230 +
    11231 +@item -fprofile-correction
    11232 +@opindex fprofile-correction
    11233 +Profiles collected using an instrumented binary for multi-threaded programs may
    11234 +be inconsistent due to missed counter updates. When this option is specified,
    11235 +GCC will use heuristics to correct or smooth out such inconsistencies. By
    11236 +default, GCC will emit an error message when an inconsistent profile is detected.
    11237 +
    11238 +@item -fprofile-dir=@var{path}
    11239 +@opindex fprofile-dir
    11240 +
    11241 +Set the directory to search the profile data files in to @var{path}.
    11242 +This option affects only the profile data generated by
    11243 +@option{-fprofile-generate}, @option{-ftest-coverage}, @option{-fprofile-arcs}
    11244 +and used by @option{-fprofile-use} and @option{-fbranch-probabilities}
    11245 +and its related options.
    11246 +By default, GCC will use the current directory as @var{path}
    11247 +thus the profile data file will appear in the same directory as the object file.
    11248 +
    11249 +@item -fprofile-generate
    11250 +@itemx -fprofile-generate=@var{path}
    11251 +@opindex fprofile-generate
    11252 +
    11253 +Enable options usually used for instrumenting application to produce
    11254 +profile useful for later recompilation with profile feedback based
    11255 +optimization.  You must use @option{-fprofile-generate} both when
    11256 +compiling and when linking your program.
    11257 +
    11258 +The following options are enabled: @code{-fprofile-arcs}, @code{-fprofile-values}, @code{-fvpt}.
    11259 +
    11260 +If @var{path} is specified, GCC will look at the @var{path} to find
    11261 +the profile feedback data files. See @option{-fprofile-dir}.
    11262 +
    11263 +@item -fprofile-use
    11264 +@itemx -fprofile-use=@var{path}
    11265 +@opindex fprofile-use
    11266 +Enable profile feedback directed optimizations, and optimizations
    11267 +generally profitable only with profile feedback available.
    11268 +
    11269 +The following options are enabled: @code{-fbranch-probabilities}, @code{-fvpt},
    11270 +@code{-funroll-loops}, @code{-fpeel-loops}, @code{-ftracer}
    11271 +
    11272 +By default, GCC emits an error message if the feedback profiles do not
    11273 +match the source code.  This error can be turned into a warning by using
    11274 +@option{-Wcoverage-mismatch}.  Note this may result in poorly optimized
    11275 +code.
    11276 +
    11277 +If @var{path} is specified, GCC will look at the @var{path} to find
    11278 +the profile feedback data files. See @option{-fprofile-dir}.
    11279 +@end table
    11280 +
    11281 +The following options control compiler behavior regarding floating
    11282 +point arithmetic.  These options trade off between speed and
    11283 +correctness.  All must be specifically enabled.
    11284 +
    11285 +@table @gcctabopt
    11286 +@item -ffloat-store
    11287 +@opindex ffloat-store
    11288 +Do not store floating point variables in registers, and inhibit other
    11289 +options that might change whether a floating point value is taken from a
    11290 +register or memory.
    11291 +
    11292 +@cindex floating point precision
    11293 +This option prevents undesirable excess precision on machines such as
    11294 +the 68000 where the floating registers (of the 68881) keep more
    11295 +precision than a @code{double} is supposed to have.  Similarly for the
    11296 +x86 architecture.  For most programs, the excess precision does only
    11297 +good, but a few programs rely on the precise definition of IEEE floating
    11298 +point.  Use @option{-ffloat-store} for such programs, after modifying
    11299 +them to store all pertinent intermediate computations into variables.
    11300 +
    11301 +@item -ffast-math
    11302 +@opindex ffast-math
    11303 +Sets @option{-fno-math-errno}, @option{-funsafe-math-optimizations},
    11304 +@option{-ffinite-math-only}, @option{-fno-rounding-math},
    11305 +@option{-fno-signaling-nans} and @option{-fcx-limited-range}.
    11306 +
    11307 +This option causes the preprocessor macro @code{__FAST_MATH__} to be defined.
    11308 +
    11309 +This option is not turned on by any @option{-O} option since
    11310 +it can result in incorrect output for programs which depend on
    11311 +an exact implementation of IEEE or ISO rules/specifications for
    11312 +math functions. It may, however, yield faster code for programs
    11313 +that do not require the guarantees of these specifications.
    11314 +
    11315 +@item -fno-math-errno
    11316 +@opindex fno-math-errno
    11317 +Do not set ERRNO after calling math functions that are executed
    11318 +with a single instruction, e.g., sqrt.  A program that relies on
    11319 +IEEE exceptions for math error handling may want to use this flag
    11320 +for speed while maintaining IEEE arithmetic compatibility.
    11321 +
    11322 +This option is not turned on by any @option{-O} option since
    11323 +it can result in incorrect output for programs which depend on
    11324 +an exact implementation of IEEE or ISO rules/specifications for
    11325 +math functions. It may, however, yield faster code for programs
    11326 +that do not require the guarantees of these specifications.
    11327 +
    11328 +The default is @option{-fmath-errno}.
    11329 +
    11330 +On Darwin systems, the math library never sets @code{errno}.  There is
    11331 +therefore no reason for the compiler to consider the possibility that
    11332 +it might, and @option{-fno-math-errno} is the default.
    11333 +
    11334 +@item -funsafe-math-optimizations
    11335 +@opindex funsafe-math-optimizations
    11336 +
    11337 +Allow optimizations for floating-point arithmetic that (a) assume
    11338 +that arguments and results are valid and (b) may violate IEEE or
    11339 +ANSI standards.  When used at link-time, it may include libraries
    11340 +or startup files that change the default FPU control word or other
    11341 +similar optimizations.
    11342 +
    11343 +This option is not turned on by any @option{-O} option since
    11344 +it can result in incorrect output for programs which depend on
    11345 +an exact implementation of IEEE or ISO rules/specifications for
    11346 +math functions. It may, however, yield faster code for programs
    11347 +that do not require the guarantees of these specifications.
    11348 +Enables @option{-fno-signed-zeros}, @option{-fno-trapping-math},
    11349 +@option{-fassociative-math} and @option{-freciprocal-math}.
    11350 +
    11351 +The default is @option{-fno-unsafe-math-optimizations}.
    11352 +
    11353 +@item -fassociative-math
    11354 +@opindex fassociative-math
    11355 +
    11356 +Allow re-association of operands in series of floating-point operations.
    11357 +This violates the ISO C and C++ language standard by possibly changing
    11358 +computation result.  NOTE: re-ordering may change the sign of zero as
    11359 +well as ignore NaNs and inhibit or create underflow or overflow (and
    11360 +thus cannot be used on a code which relies on rounding behavior like
    11361 +@code{(x + 2**52) - 2**52)}.  May also reorder floating-point comparisons
    11362 +and thus may not be used when ordered comparisons are required.
    11363 +This option requires that both @option{-fno-signed-zeros} and
    11364 +@option{-fno-trapping-math} be in effect.  Moreover, it doesn't make
    11365 +much sense with @option{-frounding-math}.
    11366 +
    11367 +The default is @option{-fno-associative-math}.
    11368 +
    11369 +@item -freciprocal-math
    11370 +@opindex freciprocal-math
    11371 +
    11372 +Allow the reciprocal of a value to be used instead of dividing by
    11373 +the value if this enables optimizations.  For example @code{x / y}
    11374 +can be replaced with @code{x * (1/y)} which is useful if @code{(1/y)}
    11375 +is subject to common subexpression elimination.  Note