@samp{gdb --args cc1 @dots{}}.
@item -fplugin=@var{name}.so
+@opindex fplugin
Load the plugin code in file @var{name}.so, assumed to be a
shared object to be dlopen'd by the compiler. The base name of
the shared object file is used to identify the plugin for the
Plugins API.
@item -fplugin-arg-@var{name}-@var{key}=@var{value}
+@opindex fplugin-arg
Define an argument called @var{key} with a value of @var{value}
for the plugin called @var{name}.
@item -fdump-ada-spec@r{[}-slim@r{]}
+@opindex fdump-ada-spec
For C and C++ source and include files, generate corresponding Ada
specs. @xref{Generating Ada Bindings for C and C++ headers,,, gnat_ugn,
GNAT User's Guide}, which provides detailed documentation on this feature.
@item -fdump-go-spec=@var{file}
+@opindex fdump-go-spec
For input files in any language, generate corresponding Go
declarations in @var{file}. This generates Go @code{const},
@code{type}, @code{var}, and @code{func} declarations which may be a
comments, after the declaration.
@item -fallow-parameterless-variadic-functions
+@opindex fallow-parameterless-variadic-functions
Accept variadic functions without named parameters.
Although it is possible to define such a function, this is not very
file, be sure to delete any existing one.
@item -fvtv-counts
-@opindex (fvtv-counts)
+@opindex fvtv-counts
This is a debugging flag. When used in conjunction with
@option{-fvtable-verify=std} or @option{-fvtable-verify=preinit}, this
causes the compiler to keep track of the total number of virtual calls
@table @gcctabopt
@item -Wformat=1
@itemx -Wformat
+@opindex Wformat
+@opindex Wformat=1
Option @option{-Wformat} is equivalent to @option{-Wformat=1}, and
@option{-Wno-format} is equivalent to @option{-Wformat=0}. Since
@option{-Wformat} also checks for null format arguments for several
@item -Wformat=2
+@opindex Wformat=2
Enable @option{-Wformat} plus additional format checks. Currently
equivalent to @option{-Wformat -Wformat-nonliteral -Wformat-security
-Wformat-y2k}.
@option{-fcompare-debug}.
@item -fsanitize=address
+@opindex fsanitize=address
Enable AddressSanitizer, a fast memory error detector.
Memory access instructions will be instrumented to detect
out-of-bounds and use-after-free bugs.
a list of supported options.
@item -fsanitize=thread
+@opindex fsanitize=thread
Enable ThreadSanitizer, a fast data race detector.
Memory access instructions will be instrumented to detect
data race bugs. See @uref{http://code.google.com/p/thread-sanitizer/} for more
supported options.
@item -fsanitize=leak
+@opindex fsanitize=leak
Enable LeakSanitizer, a memory leak detector.
This option only matters for linking of executables and if neither
@option{-fsanitize=address} nor @option{-fsanitize=thread} is used. In that
@env{LSAN_OPTIONS} environment variable.
@item -fsanitize=undefined
+@opindex fsanitize=undefined
Enable UndefinedBehaviorSanitizer, a fast undefined behavior detector.
Various computations will be instrumented to detect undefined behavior
at runtime. Current suboptions are:
-@itemize @bullet
+@table @gcctabopt
-@item @option{-fsanitize=shift}
+@item -fsanitize=shift
+@opindex fsanitize=shift
This option enables checking that the result of a shift operation is
not undefined. Note that what exactly is considered undefined differs
slightly between C and C++, as well as between ISO C90 and C99, etc.
-@item @option{-fsanitize=integer-divide-by-zero}
+@item -fsanitize=integer-divide-by-zero
+@opindex fsanitize=integer-divide-by-zero
Detect integer division by zero as well as @code{INT_MIN / -1} division.
-@item @option{-fsanitize=unreachable}
+@item -fsanitize=unreachable
+@opindex fsanitize=unreachable
With this option, the compiler will turn the @code{__builtin_unreachable}
call into a diagnostics message call instead. When reaching the
@code{__builtin_unreachable} call, the behavior is undefined.
-@item @option{-fsanitize=vla-bound}
+@item -fsanitize=vla-bound
+@opindex fsanitize=vla-bound
This option instructs the compiler to check that the size of a variable
length array is positive. This option does not have any effect in
@option{-std=c++1y} mode, as the standard requires the exception be thrown
instead.
-@item @option{-fsanitize=null}
+@item -fsanitize=null
+@opindex fsanitize=null
This option enables pointer checking. Particularly, the application
built with this option turned on will issue an error message when it
tries to dereference a NULL pointer, or if a reference (possibly an
rvalue reference) is bound to a NULL pointer.
-@end itemize
+@end table
While @option{-ftrapv} causes traps for signed overflows to be emitted,
@option{-fsanitize=undefined} gives a diagnostic message.
generating DWARF 2 debugging information with @option{-gdwarf-2}.
@item -femit-struct-debug-baseonly
+@opindex femit-struct-debug-baseonly
Emit debug information for struct-like types
only when the base name of the compilation source file
matches the base name of file in which the struct is defined.
This option works only with DWARF 2.
@item -femit-struct-debug-reduced
+@opindex femit-struct-debug-reduced
Emit debug information for struct-like types
only when the base name of the compilation source file
matches the base name of file in which the type is defined,
@itemx -fdump-rtl-@var{pass}
@itemx -fdump-rtl-@var{pass}=@var{filename}
@opindex d
+@opindex fdump-rtl-@var{pass}
Says to make debugging dumps during compilation at times specified by
@var{letters}. This is used for debugging the RTL-based passes of the
compiler. The file names for most of the dumps are made by appending
is enabled by default at @option{-O} and higher.
@item -ftree-coalesce-inlined-vars
+@opindex ftree-coalesce-inlined-vars
Tell the copyrename pass (see @option{-ftree-copyrename}) to attempt to
combine small user-defined variables too, but only if they were inlined
from other functions. It is a more limited form of
default in GCC versions older than 4.7.
@item -ftree-coalesce-vars
+@opindex ftree-coalesce-vars
Tell the copyrename pass (see @option{-ftree-copyrename}) to attempt to
combine small user-defined variables too, instead of just compiler
temporaries. This may severely limit the ability to debug an optimized
Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
@item -fuse-ld=bfd
+@opindex fuse-ld=bfd
Use the @command{bfd} linker instead of the default linker.
@item -fuse-ld=gold
+@opindex fuse-ld=gold
Use the @command{gold} linker instead of the default linker.
@item -fcprop-registers
@file{libgcc}.
@item -static-libasan
+@opindex static-libasan
When the @option{-fsanitize=address} option is used to link a program,
the GCC driver automatically links against @option{libasan}. If
@file{libasan} is available as a shared library, and the @option{-static}
other libraries statically.
@item -static-libtsan
+@opindex static-libtsan
When the @option{-fsanitize=thread} option is used to link a program,
the GCC driver automatically links against @option{libtsan}. If
@file{libtsan} is available as a shared library, and the @option{-static}
other libraries statically.
@item -static-liblsan
+@opindex static-liblsan
When the @option{-fsanitize=leak} option is used to link a program,
the GCC driver automatically links against @option{liblsan}. If
@file{liblsan} is available as a shared library, and the @option{-static}
other libraries statically.
@item -static-libubsan
+@opindex static-libubsan
When the @option{-fsanitize=undefined} option is used to link a program,
the GCC driver automatically links against @option{libubsan}. If
@file{libubsan} is available as a shared library, and the @option{-static}
other libraries statically.
@item -static-libstdc++
+@opindex static-libstdc++
When the @command{g++} program is used to link a C++ program, it
normally automatically links against @option{libstdc++}. If
@file{libstdc++} is available as a shared library, and the
use the @option{-nostdinc} and/or @option{-isystem} options.
@item -iplugindir=@var{dir}
+@opindex iplugindir=
Set the directory to search for plugins that are passed
by @option{-fplugin=@var{name}} instead of
@option{-fplugin=@var{path}/@var{name}.so}. This option is not meant
This is the default.
@item -msize-level=@var{level}
-@ opindex msize-level
+@opindex msize-level
Fine-tune size optimization with regards to instruction lengths and alignment.
The recognized values for @var{level} are:
@table @samp