public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Gerald Pfeifer <gerald@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-6292] docs: Reorder @opindex before corresponding options Date: Thu, 23 Feb 2023 01:09:53 +0000 (GMT) [thread overview] Message-ID: <20230223010953.47B373858D33@sourceware.org> (raw) https://gcc.gnu.org/g:ddf6fe375d91100ae067d2015baea744396aba4e commit r13-6292-gddf6fe375d91100ae067d2015baea744396aba4e Author: Arsen Arsenović <arsen@aarsen.me> Date: Thu Feb 23 02:06:49 2023 +0100 docs: Reorder @opindex before corresponding options gcc/d/ChangeLog: * gdc.texi: Reorder @opindex commands to precede @items they relate to. gcc/ChangeLog: * doc/cppdiropts.texi: Reorder @opindex commands to precede @items they relate to. * doc/cppopts.texi: Ditto. * doc/cppwarnopts.texi: Ditto. * doc/invoke.texi: Ditto. * doc/lto.texi: Ditto. gcc/fortran/ChangeLog: * invoke.texi: Reorder @opindex commands to precede @items they relate to. Diff: --- gcc/d/gdc.texi | 144 +- gcc/doc/cppdiropts.texi | 24 +- gcc/doc/cppopts.texi | 94 +- gcc/doc/cppwarnopts.texi | 14 +- gcc/doc/invoke.texi | 5608 +++++++++++++++++++++++----------------------- gcc/doc/lto.texi | 8 +- gcc/fortran/invoke.texi | 314 +-- 7 files changed, 3103 insertions(+), 3103 deletions(-) diff --git a/gcc/d/gdc.texi b/gcc/d/gdc.texi index 1c79c8c8491..24b6ee00478 100644 --- a/gcc/d/gdc.texi +++ b/gcc/d/gdc.texi @@ -171,30 +171,30 @@ These options affect the runtime behavior of programs compiled with @table @gcctabopt -@item -fall-instantiations @opindex fall-instantiations @opindex fno-all-instantiations +@item -fall-instantiations Generate code for all template instantiations. The default template emission strategy is to not generate code for declarations that were either instantiated speculatively, such as from @code{__traits(compiles, ...)}, or that come from an imported module not being compiled. -@item -fno-assert @opindex fassert @opindex fno-assert +@item -fno-assert Turn off code generation for @code{assert} contracts. -@item -fno-bounds-check @opindex fbounds-check @opindex fno-bounds-check +@item -fno-bounds-check Turns off array bounds checking for all functions, which can improve performance for code that uses arrays extensively. Note that this can result in unpredictable behavior if the code in question actually does violate array bounds constraints. It is safe to use this option if you are sure that your code never throws a @code{RangeError}. -@item -fbounds-check=@var{value} @opindex fbounds-check= +@item -fbounds-check=@var{value} An alternative to @option{-fbounds-check} that allows more control as to where bounds checking is turned on or off. The following values are supported: @@ -208,15 +208,15 @@ Turns on array bounds checking only for @code{@@safe} functions. Turns off array bounds checking completely. @end table -@item -fno-builtin @opindex fbuiltin @opindex fno-builtin +@item -fno-builtin Don't recognize built-in functions unless they begin with the prefix @samp{__builtin_}. By default, the compiler will recognize when a function in the @code{core.stdc} package is a built-in function. -@item -fcheckaction=@var{value} @opindex fcheckaction +@item -fcheckaction=@var{value} This option controls what code is generated on an assertion, bounds check, or final switch failure. The following values are supported: @@ -229,10 +229,10 @@ Halt the program execution. Throw an @code{AssertError} (the default). @end table -@item -fdebug -@item -fdebug=@var{value} @opindex fdebug @opindex fno-debug +@item -fdebug +@item -fdebug=@var{value} Turn on compilation of conditional @code{debug} code into the program. The @option{-fdebug} option itself sets the debug level to @code{1}, while @option{-fdebug=} enables @code{debug} code that are identified @@ -243,9 +243,9 @@ by any of the following values: Turns on compilation of any @code{debug} code identified by @var{ident}. @end table -@item -fno-druntime @opindex fdruntime @opindex fno-druntime +@item -fno-druntime Implements @uref{https://dlang.org/spec/betterc.html}. Assumes that compilation targets an environment without a D runtime library. @@ -255,8 +255,8 @@ This is equivalent to compiling with the following options: gdc -nophoboslib -fno-exceptions -fno-moduleinfo -fno-rtti @end example -@item -fextern-std=@var{standard} @opindex fextern-std +@item -fextern-std=@var{standard} Sets the C++ name mangling compatibility to the version identified by @var{standard}. The following values are supported: @@ -275,21 +275,21 @@ This is the default. Sets @code{__traits(getTargetInfo, "cppStd")} to @code{202002}. @end table -@item -fno-invariants @opindex finvariants @opindex fno-invariants +@item -fno-invariants Turns off code generation for class @code{invariant} contracts. -@item -fmain @opindex fmain +@item -fmain Generates a default @code{main()} function when compiling. This is useful when unittesting a library, as it enables running the unittests in a library without having to manually define an entry-point function. This option does nothing when @code{main} is already defined in user code. -@item -fno-moduleinfo @opindex fmoduleinfo @opindex fno-moduleinfo +@item -fno-moduleinfo Turns off generation of the @code{ModuleInfo} and related functions that would become unreferenced without it, which may allow linking to programs not written in D. Functions that are not be generated @@ -297,24 +297,24 @@ include module constructors and destructors (@code{static this} and @code{static ~this}), @code{unittest} code, and @code{DSO} registry functions for dynamically linked code. -@item -fonly=@var{filename} @opindex fonly +@item -fonly=@var{filename} Tells the compiler to parse and run semantic analysis on all modules on the command line, but only generate code for the module specified by @var{filename}. -@item -fno-postconditions @opindex fpostconditions @opindex fno-postconditions +@item -fno-postconditions Turns off code generation for postcondition @code{out} contracts. -@item -fno-preconditions @opindex fpreconditions @opindex fno-preconditions +@item -fno-preconditions Turns off code generation for precondition @code{in} contracts. -@item -fpreview=@var{id} @opindex fpreview +@item -fpreview=@var{id} Turns on an upcoming D language change identified by @var{id}. The following values are supported: @@ -359,9 +359,9 @@ Implements rvalue arguments to @code{ref} parameters. Disables access to variables marked @code{@@system} from @code{@@safe} code. @end table -@item -frelease @opindex frelease @opindex fno-release +@item -frelease Turns on compiling in release mode, which means not emitting runtime checks for contracts and asserts. Array bounds checking is not done for @code{@@system} and @code{@@trusted} functions, and assertion @@ -374,8 +374,8 @@ gdc -fno-assert -fbounds-check=safe -fno-invariants \ -fno-postconditions -fno-preconditions -fno-switch-errors @end example -@item -frevert= @opindex frevert +@item -frevert= Turns off a D language feature identified by @var{id}. The following values are supported: @@ -395,29 +395,29 @@ Turns off C-style integral promotion for unary @code{+}, @code{-} and @code{~} expressions. @end table -@item -fno-rtti @opindex frtti @opindex fno-rtti +@item -fno-rtti Turns off generation of run-time type information for all user defined types. Any code that uses features of the language that require access to this information will result in an error. -@item -fno-switch-errors @opindex fswitch-errors @opindex fno-switch-errors +@item -fno-switch-errors This option controls what code is generated when no case is matched in a @code{final switch} statement. The default run time behavior is to throw a @code{SwitchError}. Turning off @option{-fswitch-errors} means that instead the execution of the program is immediately halted. -@item -funittest @opindex funittest @opindex fno-unittest +@item -funittest Turns on compilation of @code{unittest} code, and turns on the @code{version(unittest)} identifier. This implies @option{-fassert}. -@item -fversion=@var{value} @opindex fversion +@item -fversion=@var{value} Turns on compilation of conditional @code{version} code into the program identified by any of the following values: @@ -426,9 +426,9 @@ identified by any of the following values: Turns on compilation of @code{version} code identified by @var{ident}. @end table -@item -fno-weak-templates @opindex fweak-templates @opindex fno-weak-templates +@item -fno-weak-templates Turns off emission of declarations that can be defined in multiple objects as weak symbols. The default is to emit all public symbols as weak, unless the target lacks support for weak symbols. Disabling this option means that common @@ -447,30 +447,30 @@ other parts of the compiler: @table @gcctabopt -@item -I@var{dir} @opindex I +@item -I@var{dir} Specify a directory to use when searching for imported modules at compile time. Multiple @option{-I} options can be used, and the paths are searched in the same order. -@item -J@var{dir} @opindex J +@item -J@var{dir} Specify a directory to use when searching for files in string imports at compile time. This switch is required in order to use @code{import(file)} expressions. Multiple @option{-J} options can be used, and the paths are searched in the same order. -@item -L@var{dir} @opindex L +@item -L@var{dir} When linking, specify a library search directory, as with @command{gcc}. -@item -B@var{dir} @opindex B +@item -B@var{dir} This option specifies where to find the executables, libraries, source files, and data files of the compiler itself, as with @command{gcc}. -@item -fmodule-file=@var{module}=@var{spec} @opindex fmodule-file +@item -fmodule-file=@var{module}=@var{spec} This option manipulates file paths of imported modules, such that if an imported module matches all or the leftmost part of @var{module}, the file path in @var{spec} is used as the location to search for D sources. @@ -492,19 +492,19 @@ import C.D.E; // Matches C, searches for bar/D/E.d import A.B.C; // No match, searches for A/B/C.d @end example -@item -imultilib @var{dir} @opindex imultilib +@item -imultilib @var{dir} Use @var{dir} as a subdirectory of the gcc directory containing target-specific D sources and interfaces. -@item -iprefix @var{prefix} @opindex iprefix +@item -iprefix @var{prefix} Specify @var{prefix} as the prefix for the gcc directory containing target-specific D sources and interfaces. If the @var{prefix} represents a directory, you should include the final @code{'/'}. -@item -nostdinc @opindex nostdinc +@item -nostdinc Do not search the standard system directories for D source and interface files. Only the directories that have been specified with @option{-I} options (and the directory of the current file, if appropriate) are searched. @@ -520,107 +520,107 @@ In addition to the many @command{gcc} options controlling code generation, @table @gcctabopt -@item -H @opindex H +@item -H Generates D interface files for all modules being compiled. The compiler determines the output file based on the name of the input file, removes any directory components and suffix, and applies the @file{.di} suffix. -@item -Hd @var{dir} @opindex Hd +@item -Hd @var{dir} Same as @option{-H}, but writes interface files to directory @var{dir}. This option can be used with @option{-Hf @var{file}} to independently set the output file and directory path. -@item -Hf @var{file} @opindex Hf +@item -Hf @var{file} Same as @option{-H} but writes interface files to @var{file}. This option can be used with @option{-Hd @var{dir}} to independently set the output file and directory path. -@item -M @opindex M +@item -M Output the module dependencies of all source files being compiled in a format suitable for @command{make}. The compiler outputs one @command{make} rule containing the object file name for that source file, a colon, and the names of all imported files. -@item -MM @opindex MM +@item -MM Like @option{-M} but does not mention imported modules from the D standard library package directories. -@item -MF @var{file} @opindex MF +@item -MF @var{file} When used with @option{-M} or @option{-MM}, specifies a @var{file} to write the dependencies to. When used with the driver options @option{-MD} or @option{-MMD}, @option{-MF} overrides the default dependency output file. -@item -MG @opindex MG +@item -MG This option is for compatibility with @command{gcc}, and is ignored by the compiler. -@item -MP @opindex MP +@item -MP Outputs a phony target for each dependency other than the modules being compiled, causing each to depend on nothing. -@item -MT @var{target} @opindex MT +@item -MT @var{target} Change the @var{target} of the rule emitted by dependency generation to be exactly the string you specify. If you want multiple targets, you can specify them as a single argument to @option{-MT}, or use multiple @option{-MT} options. -@item -MQ @var{target} @opindex MQ +@item -MQ @var{target} Same as @option{-MT}, but it quotes any characters which are special to @command{make}. -@item -MD @opindex MD +@item -MD This option is equivalent to @option{-M -MF @var{file}}. The driver determines @var{file} by removing any directory components and suffix from the input file, and then adding a @file{.deps} suffix. -@item -MMD @opindex MMD +@item -MMD Like @option{-MD} but does not mention imported modules from the D standard library package directories. -@item -X @opindex X +@item -X Output information describing the contents of all source files being compiled in JSON format to a file. The driver determines @var{file} by removing any directory components and suffix from the input file, and then adding a @file{.json} suffix. -@item -Xf @var{file} @opindex Xf +@item -Xf @var{file} Same as @option{-X}, but writes all JSON contents to the specified @var{file}. -@item -fdoc @opindex fdoc +@item -fdoc Generates @code{Ddoc} documentation and writes it to a file. The compiler determines @var{file} by removing any directory components and suffix from the input file, and then adding a @file{.html} suffix. -@item -fdoc-dir=@var{dir} @opindex fdoc-dir +@item -fdoc-dir=@var{dir} Same as @option{-fdoc}, but writes documentation to directory @var{dir}. This option can be used with @option{-fdoc-file=@var{file}} to independently set the output file and directory path. -@item -fdoc-file=@var{file} @opindex fdoc-file +@item -fdoc-file=@var{file} Same as @option{-fdoc}, but writes documentation to @var{file}. This option can be used with @option{-fdoc-dir=@var{dir}} to independently set the output file and directory path. -@item -fdoc-inc=@var{file} @opindex fdoc-inc +@item -fdoc-inc=@var{file} Specify @var{file} as a @var{Ddoc} macro file to be read. Multiple @option{-fdoc-inc} options can be used, and files are read and processed in the same order. @@ -632,8 +632,8 @@ For D source files, generate corresponding C++ declarations in @var{file}. In conjunction with @option{-fdump-c++-spec=} above, add comments for ignored declarations in the generated C++ header. -@item -fsave-mixins=@var{file} @opindex fsave-mixins +@item -fsave-mixins=@var{file} Generates code expanded from D @code{mixin} statements and writes the processed sources to @var{file}. This is useful to debug errors in compilation and provides source for debuggers to show when requested. @@ -656,93 +656,93 @@ specified, they do not prevent compilation of the program. @table @gcctabopt -@item -Wall @opindex Wall @opindex Wno-all +@item -Wall Turns on all warnings messages. Warnings are not a defined part of the D language, and all constructs for which this may generate a warning message are valid code. -@item -Walloca @opindex Walloca +@item -Walloca This option warns on all uses of "alloca" in the source. -@item -Walloca-larger-than=@var{n} @opindex Walloca-larger-than @opindex Wno-alloca-larger-than +@item -Walloca-larger-than=@var{n} Warn on unbounded uses of alloca, and on bounded uses of alloca whose bound can be larger than @var{n} bytes. @option{-Wno-alloca-larger-than} disables @option{-Walloca-larger-than} warning and is equivalent to @option{-Walloca-larger-than=@var{SIZE_MAX}} or larger. -@item -Wno-builtin-declaration-mismatch @opindex Wno-builtin-declaration-mismatch @opindex Wbuiltin-declaration-mismatch +@item -Wno-builtin-declaration-mismatch Warn if a built-in function is declared with an incompatible signature. -@item -Wcast-result @opindex Wcast-result @opindex Wno-cast-result +@item -Wcast-result Warn about casts that will produce a null or zero result. Currently this is only done for casting between an imaginary and non-imaginary data type, or casting between a D and C++ class. -@item -Wno-deprecated @opindex Wdeprecated @opindex Wno-deprecated +@item -Wno-deprecated Do not warn about usage of deprecated features and symbols with @code{deprecated} attributes. -@item -Werror @opindex Werror @opindex Wno-error +@item -Werror Turns all warnings into errors. -@item -Wspeculative @opindex Wspeculative @opindex Wno-speculative +@item -Wspeculative List all error messages from speculative compiles, such as @code{__traits(compiles, ...)}. This option does not report messages as warnings, and these messages therefore never become errors when the @option{-Werror} option is also used. -@item -Wunknown-pragmas @opindex Wunknown-pragmas @opindex Wno-unknown-pragmas +@item -Wunknown-pragmas Warn when a @code{pragma()} is encountered that is not understood by @command{gdc}. This differs from @option{-fignore-unknown-pragmas} where a pragma that is part of the D language, but not implemented by the compiler, won't get reported. -@item -Wno-varargs @opindex Wvarargs @opindex Wno-varargs +@item -Wno-varargs Do not warn upon questionable usage of the macros used to handle variable arguments like @code{va_start}. -@item -fignore-unknown-pragmas @opindex fignore-unknown-pragmas @opindex fno-ignore-unknown-pragmas +@item -fignore-unknown-pragmas Turns off errors for unsupported pragmas. -@item -fmax-errors=@var{n} @opindex fmax-errors +@item -fmax-errors=@var{n} Limits the maximum number of error messages to @var{n}, at which point @command{gdc} bails out rather than attempting to continue processing the source code. If @var{n} is 0 (the default), there is no limit on the number of error messages produced. -@item -fsyntax-only @opindex fsyntax-only @opindex fno-syntax-only +@item -fsyntax-only Check the code for syntax errors, but do not actually compile it. This can be used in conjunction with @option{-fdoc} or @option{-H} to generate files for each module present on the command-line, but no other output file. -@item -ftransition=@var{id} @opindex ftransition +@item -ftransition=@var{id} Report additional information about D language changes identified by @var{id}. The following values are supported: @@ -776,35 +776,35 @@ a link step. @table @gcctabopt -@item -defaultlib=@var{libname} @opindex defaultlib= +@item -defaultlib=@var{libname} Specify the library to use instead of libphobos when linking. Options specifying the linkage of libphobos, such as @option{-static-libphobos} or @option{-shared-libphobos}, are ignored. -@item -debuglib=@var{libname} @opindex debuglib= +@item -debuglib=@var{libname} Specify the debug library to use instead of libphobos when linking. This option has no effect unless the @option{-g} option was also given on the command line. Options specifying the linkage of libphobos, such as @option{-static-libphobos} or @option{-shared-libphobos}, are ignored. -@item -nophoboslib @opindex nophoboslib +@item -nophoboslib Do not use the Phobos or D runtime library when linking. Options specifying the linkage of libphobos, such as @option{-static-libphobos} or @option{-shared-libphobos}, are ignored. The standard system libraries are used normally, unless @option{-nostdlib} or @option{-nodefaultlibs} is used. -@item -shared-libphobos @opindex shared-libphobos +@item -shared-libphobos On systems that provide @file{libgphobos} and @file{libgdruntime} as a shared and a static library, this option forces the use of the shared version. If no shared version was built when the compiler was configured, this option has no effect. -@item -static-libphobos @opindex static-libphobos +@item -static-libphobos On systems that provide @file{libgphobos} and @file{libgdruntime} as a shared and a static library, this option forces the use of the static version. If no static version was built when the compiler was configured, @@ -823,13 +823,13 @@ interest to developers or language tooling. @table @gcctabopt -@item -fdump-d-original @opindex fdump-d-original +@item -fdump-d-original Output the internal front-end AST after the @code{semantic3} stage. This option is only useful for debugging the GNU D compiler itself. -@item -v @opindex v +@item -v Dump information about the compiler language processing stages as the source program is being compiled. This includes listing all modules that are processed through the @code{parse}, @code{semantic}, @code{semantic2}, and diff --git a/gcc/doc/cppdiropts.texi b/gcc/doc/cppdiropts.texi index 759d1c31464..76e7d694d4d 100644 --- a/gcc/doc/cppdiropts.texi +++ b/gcc/doc/cppdiropts.texi @@ -9,14 +9,14 @@ @c If this file is included with the flag ``cppmanual'' set, it is @c formatted for inclusion in the CPP manual; otherwise the main GCC manual. -@item -I @var{dir} -@itemx -iquote @var{dir} -@itemx -isystem @var{dir} -@itemx -idirafter @var{dir} @opindex I @opindex iquote @opindex isystem @opindex idirafter +@item -I @var{dir} +@itemx -iquote @var{dir} +@itemx -isystem @var{dir} +@itemx -idirafter @var{dir} Add the directory @var{dir} to the list of directories to be searched for header files during preprocessing. @ifset cppmanual @@ -90,8 +90,8 @@ use the @option{-nostdinc} and/or @option{-isystem} options. @xref{System Headers}. @end ifset -@item -I- @opindex I- +@item -I- Split the include path. This option has been deprecated. Please use @option{-iquote} instead for @option{-I} directories before the @option{-I-} and remove the @option{-I-} @@ -111,43 +111,43 @@ file directory as the first search directory for @code{@w{#include @xref{Search Path}. @end ifset -@item -iprefix @var{prefix} @opindex iprefix +@item -iprefix @var{prefix} Specify @var{prefix} as the prefix for subsequent @option{-iwithprefix} options. If the prefix represents a directory, you should include the final @samp{/}. -@item -iwithprefix @var{dir} -@itemx -iwithprefixbefore @var{dir} @opindex iwithprefix @opindex iwithprefixbefore +@item -iwithprefix @var{dir} +@itemx -iwithprefixbefore @var{dir} Append @var{dir} to the prefix specified previously with @option{-iprefix}, and add the resulting directory to the include search path. @option{-iwithprefixbefore} puts it in the same place @option{-I} would; @option{-iwithprefix} puts it where @option{-idirafter} would. -@item -isysroot @var{dir} @opindex isysroot +@item -isysroot @var{dir} This option is like the @option{--sysroot} option, but applies only to header files (except for Darwin targets, where it applies to both header files and libraries). See the @option{--sysroot} option for more information. -@item -imultilib @var{dir} @opindex imultilib +@item -imultilib @var{dir} Use @var{dir} as a subdirectory of the directory containing target-specific C++ headers. -@item -nostdinc @opindex nostdinc +@item -nostdinc Do not search the standard system directories for header files. Only the directories explicitly specified with @option{-I}, @option{-iquote}, @option{-isystem}, and/or @option{-idirafter} options (and the directory of the current file, if appropriate) are searched. -@item -nostdinc++ @opindex nostdinc++ +@item -nostdinc++ Do not search for header files in the C++-specific standard directories, but do still search the other standard directories. (This option is used when building the C++ library.) diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi index 9819e812b11..647d25239ed 100644 --- a/gcc/doc/cppopts.texi +++ b/gcc/doc/cppopts.texi @@ -9,8 +9,8 @@ @c If this file is included with the flag ``cppmanual'' set, it is @c formatted for inclusion in the CPP manual; otherwise the main GCC manual. -@item -D @var{name} @opindex D +@item -D @var{name} Predefine @var{name} as a macro, with definition @code{1}. @item -D @var{name}=@var{definition} @@ -34,13 +34,13 @@ are given on the command line. All @option{-imacros @var{file}} and @option{-include @var{file}} options are processed after all @option{-D} and @option{-U} options. -@item -U @var{name} @opindex U +@item -U @var{name} Cancel any previous definition of @var{name}, either built in or provided with a @option{-D} option. -@item -include @var{file} @opindex include +@item -include @var{file} Process @var{file} as if @code{#include "file"} appeared as the first line of the primary source file. However, the first directory searched for @var{file} is the preprocessor's working directory @emph{instead of} @@ -51,8 +51,8 @@ chain as normal. If multiple @option{-include} options are given, the files are included in the order they appear on the command line. -@item -imacros @var{file} @opindex imacros +@item -imacros @var{file} Exactly like @option{-include}, except that any output produced by scanning @var{file} is thrown away. Macros it defines remain defined. This allows you to acquire all the macros from a header without also @@ -61,23 +61,23 @@ processing its declarations. All files specified by @option{-imacros} are processed before all files specified by @option{-include}. -@item -undef @opindex undef +@item -undef Do not predefine any system-specific or GCC-specific macros. The standard predefined macros remain defined. @ifset cppmanual @xref{Standard Predefined Macros}. @end ifset -@item -pthread @opindex pthread +@item -pthread Define additional macros required for using the POSIX threads library. You should use this option consistently for both compilation and linking. This option is supported on GNU/Linux targets, most other Unix derivatives, and also on x86 Cygwin and MinGW targets. -@item -M @opindex M +@item -M @cindex @command{make} @cindex dependencies, @command{make} Instead of outputting the result of preprocessing, output a rule @@ -104,8 +104,8 @@ is still sent to the regular output stream as normal. Passing @option{-M} to the driver implies @option{-E}, and suppresses warnings with an implicit @option{-w}. -@item -MM @opindex MM +@item -MM Like @option{-M} but do not mention header files that are found in system header directories, nor header files that are included, directly or indirectly, from such a header. @@ -115,8 +115,8 @@ This implies that the choice of angle brackets or double quotes in an header appears in @option{-MM} dependency output. @anchor{dashMF} -@item -MF @var{file} @opindex MF +@item -MF @var{file} When used with @option{-M} or @option{-MM}, specifies a file to write the dependencies to. If no @option{-MF} switch is given the preprocessor sends the rules to the same place it would send @@ -127,8 +127,8 @@ When used with the driver options @option{-MD} or @option{-MMD}, If @var{file} is @file{-}, then the dependencies are written to @file{stdout}. -@item -MG @opindex MG +@item -MG In conjunction with an option such as @option{-M} requesting dependency generation, @option{-MG} assumes missing header files are generated files and adds them to the dependency list without raising @@ -139,12 +139,12 @@ this useless. This feature is used in automatic updating of makefiles. -@item -Mno-modules @opindex Mno-modules +@item -Mno-modules Disable dependency generation for compiled module interfaces. -@item -MP @opindex MP +@item -MP This option instructs CPP to add a phony target for each dependency other than the main file, causing each to depend on nothing. These dummy rules work around errors @command{make} gives if you remove header @@ -158,8 +158,8 @@ test.o: test.c test.h test.h: @end smallexample -@item -MT @var{target} @opindex MT +@item -MT @var{target} Change the target of the rule emitted by dependency generation. By default CPP takes the name of the main input file, deletes any @@ -176,8 +176,8 @@ For example, @option{@w{-MT '$(objpfx)foo.o'}} might give $(objpfx)foo.o: foo.c @end smallexample -@item -MQ @var{target} @opindex MQ +@item -MQ @var{target} Same as @option{-MT}, but it quotes any characters which are special to Make. @option{@w{-MQ '$(objpfx)foo.o'}} gives @@ -189,8 +189,8 @@ $$(objpfx)foo.o: foo.c The default target is automatically quoted, as if it were given with @option{-MQ}. -@item -MD @opindex MD +@item -MD @option{-MD} is equivalent to @option{-M -MF @var{file}}, except that @option{-E} is not implied. The driver determines @var{file} based on whether an @option{-o} option is given. If it is, the driver uses its @@ -206,13 +206,13 @@ is understood to specify a target object file. Since @option{-E} is not implied, @option{-MD} can be used to generate a dependency output file as a side effect of the compilation process. -@item -MMD @opindex MMD +@item -MMD Like @option{-MD} except mention only user header files, not system header files. -@item -fpreprocessed @opindex fpreprocessed +@item -fpreprocessed Indicate to the preprocessor that the input file has already been preprocessed. This suppresses things like macro expansion, trigraph conversion, escaped newline splicing, and processing of most directives. @@ -226,8 +226,8 @@ extensions @samp{.i}, @samp{.ii} or @samp{.mi}. These are the extensions that GCC uses for preprocessed files created by @option{-save-temps}. -@item -fdirectives-only @opindex fdirectives-only +@item -fdirectives-only When preprocessing, handle directives, but do not expand macros. The option's behavior depends on the @option{-E} and @option{-fpreprocessed} @@ -248,37 +248,37 @@ With both @option{-E} and @option{-fpreprocessed}, the rules for @option{-fpreprocessed} take precedence. This enables full preprocessing of files previously preprocessed with @code{-E -fdirectives-only}. -@item -fdollars-in-identifiers @opindex fdollars-in-identifiers +@item -fdollars-in-identifiers @anchor{fdollars-in-identifiers} Accept @samp{$} in identifiers. @ifset cppmanual @xref{Identifier characters}. @end ifset -@item -fextended-identifiers @opindex fextended-identifiers +@item -fextended-identifiers Accept universal character names and extended characters in identifiers. This option is enabled by default for C99 (and later C standard versions) and C++. -@item -fno-canonical-system-headers @opindex fno-canonical-system-headers +@item -fno-canonical-system-headers When preprocessing, do not shorten system header paths with canonicalization. -@item -fmax-include-depth=@var{depth} @opindex fmax-include-depth +@item -fmax-include-depth=@var{depth} Set the maximum depth of the nested #include. The default is 200. -@item -ftabstop=@var{width} @opindex ftabstop +@item -ftabstop=@var{width} Set the distance between tab stops. This helps the preprocessor report correct column numbers in warnings or errors, even if tabs appear on the line. If the value is less than 1 or greater than 100, the option is ignored. The default is 8. -@item -ftrack-macro-expansion@r{[}=@var{level}@r{]} @opindex ftrack-macro-expansion +@item -ftrack-macro-expansion@r{[}=@var{level}@r{]} Track locations of tokens across macro expansions. This allows the compiler to emit diagnostic about the current macro expansion stack when a compilation error occurs in a macro expansion. Using this @@ -296,8 +296,8 @@ When this option is given no argument, the default parameter value is Note that @code{-ftrack-macro-expansion=2} is activated by default. -@item -fmacro-prefix-map=@var{old}=@var{new} @opindex fmacro-prefix-map +@item -fmacro-prefix-map=@var{old}=@var{new} When preprocessing files residing in directory @file{@var{old}}, expand the @code{__FILE__} and @code{__BASE_FILE__} macros as if the files resided in directory @file{@var{new}} instead. This can be used @@ -307,15 +307,15 @@ location independent. This option also affects @code{__builtin_FILE()} during compilation. See also @option{-ffile-prefix-map}. -@item -fexec-charset=@var{charset} @opindex fexec-charset +@item -fexec-charset=@var{charset} @cindex character set, execution Set the execution character set, used for string and character constants. The default is UTF-8. @var{charset} can be any encoding supported by the system's @code{iconv} library routine. -@item -fwide-exec-charset=@var{charset} @opindex fwide-exec-charset +@item -fwide-exec-charset=@var{charset} @cindex character set, wide execution Set the wide execution character set, used for wide string and character constants. The default is one of UTF-32BE, UTF-32LE, UTF-16BE, @@ -325,8 +325,8 @@ with @option{-fexec-charset}, @var{charset} can be any encoding supported by the system's @code{iconv} library routine; however, you will have problems with encodings that do not fit exactly in @code{wchar_t}. -@item -finput-charset=@var{charset} @opindex finput-charset +@item -finput-charset=@var{charset} @cindex character set, input Set the input character set, used for translation from the character set of the input file to the source character set used by GCC@. If the @@ -337,8 +337,8 @@ precedence if there's a conflict. @var{charset} can be any encoding supported by the system's @code{iconv} library routine. @ifclear cppmanual -@item -fpch-deps @opindex fpch-deps +@item -fpch-deps When using precompiled headers (@pxref{Precompiled Headers}), this flag causes the dependency-output flags to also list the files from the precompiled header's dependencies. If not specified, only the @@ -346,8 +346,8 @@ precompiled header are listed and not the files that were used to create it, because those files are not consulted when a precompiled header is used. -@item -fpch-preprocess @opindex fpch-preprocess +@item -fpch-preprocess This option allows use of a precompiled header (@pxref{Precompiled Headers}) together with @option{-E}. It inserts a special @code{#pragma}, @code{#pragma GCC pch_preprocess "@var{filename}"} in the output to mark @@ -365,9 +365,9 @@ location. The filename may be absolute or it may be relative to GCC's current directory. @end ifclear -@item -fworking-directory @opindex fworking-directory @opindex fno-working-directory +@item -fworking-directory Enable generation of linemarkers in the preprocessor output that let the compiler know the current working directory at the time of preprocessing. When this option is enabled, the preprocessor @@ -381,8 +381,8 @@ form @option{-fno-working-directory}. If the @option{-P} flag is present in the command line, this option has no effect, since no @code{#line} directives are emitted whatsoever. -@item -A @var{predicate}=@var{answer} @opindex A +@item -A @var{predicate}=@var{answer} Make an assertion with the predicate @var{predicate} and answer @var{answer}. This form is preferred to the older form @option{-A @var{predicate}(@var{answer})}, which is still supported, because @@ -395,8 +395,8 @@ it does not use shell special characters. Cancel an assertion with the predicate @var{predicate} and answer @var{answer}. -@item -C @opindex C +@item -C Do not discard comments. All comments are passed through to the output file, except for comments in processed directives, which are deleted along with the directive. @@ -407,8 +407,8 @@ For example, comments appearing at the start of what would be a directive line have the effect of turning that line into an ordinary source line, since the first token on the line is no longer a @samp{#}. -@item -CC @opindex CC +@item -CC Do not discard comments, including during macro expansion. This is like @option{-C}, except that comments contained within macros are also passed through to the output file where the macro is expanded. @@ -421,8 +421,8 @@ the source line. The @option{-CC} option is generally used to support lint comments. -@item -P @opindex P +@item -P Inhibit generation of linemarkers in the output from the preprocessor. This might be useful when running the preprocessor on something that is not C code, and will be sent to a program which might be confused by the @@ -433,10 +433,10 @@ linemarkers. @cindex traditional C language @cindex C language, traditional -@item -traditional -@itemx -traditional-cpp @opindex traditional-cpp @opindex traditional +@item -traditional +@itemx -traditional-cpp Try to imitate the behavior of pre-standard C preprocessors, as opposed to ISO C preprocessors. @@ -451,8 +451,8 @@ Note that GCC does not otherwise attempt to emulate a pre-standard C compiler, and these options are only supported with the @option{-E} switch, or when invoking CPP explicitly. -@item -trigraphs @opindex trigraphs +@item -trigraphs Support ISO C trigraphs. These are three-character sequences, all starting with @samp{??}, that are defined by ISO C to stand for single characters. For example, @@ -475,21 +475,21 @@ By default, GCC ignores trigraphs, but in standard-conforming modes it converts them. See the @option{-std} and @option{-ansi} options. -@item -remap @opindex remap +@item -remap Enable special code to work around file systems which only permit very short file names, such as MS-DOS@. -@item -H @opindex H +@item -H Print the name of each header file used, in addition to other normal activities. Each name is indented to show how deep in the @samp{#include} stack it is. Precompiled header files are also printed, even if they are found to be invalid; an invalid precompiled header file is printed with @samp{...x} and a valid one with @samp{...!} . -@item -d@var{letters} @opindex d +@item -d@var{letters} Says to make debugging dumps during compilation as specified by @var{letters}. The flags documented here are those relevant to the preprocessor. Other @var{letters} are interpreted @@ -501,8 +501,8 @@ conflicts, the result is undefined. @end ifclear @table @gcctabopt -@item -dM @opindex dM +@item -dM Instead of the normal output, generate a list of @samp{#define} directives for all the macros defined during the execution of the preprocessor, including predefined macros. This gives you a way of @@ -522,24 +522,24 @@ interpreted as a synonym for @option{-fdump-rtl-mach}. @xref{Developer Options, , ,gcc}. @end ifclear -@item -dD @opindex dD +@item -dD Like @option{-dM} except in two respects: it does @emph{not} include the predefined macros, and it outputs @emph{both} the @samp{#define} directives and the result of preprocessing. Both kinds of output go to the standard output file. -@item -dN @opindex dN +@item -dN Like @option{-dD}, but emit only the macro names, not their expansions. -@item -dI @opindex dI +@item -dI Output @samp{#include} directives in addition to the result of preprocessing. -@item -dU @opindex dU +@item -dU Like @option{-dD} except that only macros that are expanded, or whose definedness is tested in preprocessor directives, are output; the output is delayed until the use or test of the macro; and @@ -547,8 +547,8 @@ output is delayed until the use or test of the macro; and undefined at the time. @end table -@item -fdebug-cpp @opindex fdebug-cpp +@item -fdebug-cpp This option is only useful for debugging GCC. When used from CPP or with @option{-E}, it dumps debugging information about location maps. Every token in the output is preceded by the dump of the map its location diff --git a/gcc/doc/cppwarnopts.texi b/gcc/doc/cppwarnopts.texi index 29fba13378d..ab17ecba60e 100644 --- a/gcc/doc/cppwarnopts.texi +++ b/gcc/doc/cppwarnopts.texi @@ -9,16 +9,16 @@ @c If this file is included with the flag ``cppmanual'' set, it is @c formatted for inclusion in the CPP manual; otherwise the main GCC manual. -@item -Wcomment -@itemx -Wcomments @opindex Wcomment @opindex Wcomments +@item -Wcomment +@itemx -Wcomments Warn whenever a comment-start sequence @samp{/*} appears in a @samp{/*} comment, or whenever a backslash-newline appears in a @samp{//} comment. This warning is enabled by @option{-Wall}. -@item -Wtrigraphs @opindex Wtrigraphs +@item -Wtrigraphs @anchor{Wtrigraphs} Warn if any trigraphs are encountered that might change the meaning of the program. Trigraphs within comments are not warned about, @@ -29,21 +29,21 @@ given, this option is still enabled unless trigraphs are enabled. To get trigraph conversion without warnings, but get the other @option{-Wall} warnings, use @samp{-trigraphs -Wall -Wno-trigraphs}. -@item -Wundef @opindex Wundef @opindex Wno-undef +@item -Wundef Warn if an undefined identifier is evaluated in an @code{#if} directive. Such identifiers are replaced with zero. -@item -Wexpansion-to-defined @opindex Wexpansion-to-defined +@item -Wexpansion-to-defined Warn whenever @samp{defined} is encountered in the expansion of a macro (including the case where the macro is expanded by an @samp{#if} directive). Such usage is not portable. This warning is also enabled by @option{-Wpedantic} and @option{-Wextra}. -@item -Wunused-macros @opindex Wunused-macros +@item -Wunused-macros Warn about macros defined in the main file that are unused. A macro is @dfn{used} if it is expanded or tested for existence at least once. The preprocessor also warns if the macro has not been used at the @@ -63,9 +63,9 @@ Alternatively, you could provide a dummy use with something like: #endif @end smallexample -@item -Wno-endif-labels @opindex Wno-endif-labels @opindex Wendif-labels +@item -Wno-endif-labels Do not warn whenever an @code{#else} or an @code{#endif} are followed by text. This sometimes happens in older programs with code of the form diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a7ec1a99385..04ca9d9b02b 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1653,8 +1653,8 @@ one of the options @option{-c}, @option{-S}, or @option{-E} to say where @samp{-x cpp-output -E}) instruct @command{gcc} to do nothing at all. @table @gcctabopt -@item -c @opindex c +@item -c Compile or assemble the source files, but do not link. The linking stage simply is not done. The ultimate output is in the form of an object file for each source file. @@ -1665,8 +1665,8 @@ the suffix @samp{.c}, @samp{.i}, @samp{.s}, etc., with @samp{.o}. Unrecognized input files, not requiring compilation or assembly, are ignored. -@item -S @opindex S +@item -S Stop after the stage of compilation proper; do not assemble. The output is in the form of an assembler code file for each non-assembler input file specified. @@ -1676,8 +1676,8 @@ replacing the suffix @samp{.c}, @samp{.i}, etc., with @samp{.s}. Input files that don't require compilation are ignored. -@item -E @opindex E +@item -E Stop after the preprocessing stage; do not run the compiler proper. The output is in the form of preprocessed source code, which is sent to the standard output. @@ -1685,8 +1685,8 @@ standard output. Input files that don't require preprocessing are ignored. @cindex output file option -@item -o @var{file} @opindex o +@item -o @var{file} Place the primary output in file @var{file}. This applies to whatever sort of output is being produced, whether it be an executable file, an object file, an assembler file or preprocessed C code. @@ -1756,8 +1756,8 @@ by the options @option{-dumpbase}, @option{-dumpbase-ext}, @option{-save-temps=obj}. -@item -dumpbase @var{dumpbase} @opindex dumpbase +@item -dumpbase @var{dumpbase} This option sets the base name for auxiliary and dump output files. It does not affect the name of the primary output file. Intermediate outputs, when preserved, are not regarded as primary outputs, but as @@ -1845,8 +1845,8 @@ linking will use @file{dir/foobar.} as the prefix for dumps and auxiliary files. -@item -dumpbase-ext @var{auxdropsuf} @opindex dumpbase-ext +@item -dumpbase-ext @var{auxdropsuf} When forming the name of an auxiliary (but not a dump) output file, drop trailing @var{auxdropsuf} from @var{dumpbase} before appending any suffixes. If not specified, this option defaults to the suffix of a @@ -1879,8 +1879,8 @@ the auxiliary and dump outputs by using the executable name minus @file{main-foo.c.*} and @file{main-bar.c.*}. -@item -dumpdir @var{dumppfx} @opindex dumpdir +@item -dumpdir @var{dumppfx} When forming the name of an auxiliary or dump output file, use @var{dumppfx} as a prefix: @@ -2007,20 +2007,20 @@ names to the received @var{dumppfx}, ensures it contains a directory component so that it overrides any @option{-dumpdir}, and passes that as @option{-dumpbase} to sub-compilers. -@item -v @opindex v +@item -v Print (on standard error output) the commands executed to run the stages of compilation. Also print the version number of the compiler driver program and of the preprocessor and the compiler proper. -@item -### @opindex ### +@item -### Like @option{-v} except the commands are not executed and arguments are quoted unless they contain only alphanumeric characters or @code{./-_}. This is useful for shell scripts to capture the driver-generated command lines. -@item --help @opindex help +@item --help Print (on the standard output) a description of the command-line options understood by @command{gcc}. If the @option{-v} option is also specified then @option{--help} is also passed on to the various processes @@ -2029,8 +2029,8 @@ they accept. If the @option{-Wextra} option has also been specified (prior to the @option{--help} option), then command-line options that have no documentation associated with them are also displayed. -@item --target-help @opindex target-help +@item --target-help Print (on the standard output) a description of target-specific command-line options for each tool. For some targets extra target-specific information may also be printed. @@ -2154,12 +2154,12 @@ gcc -c -Q -O2 --help=optimizers > /tmp/O2-opts diff /tmp/O2-opts /tmp/O3-opts | grep enabled @end smallexample -@item --version @opindex version +@item --version Display the version number and copyrights of the invoked GCC@. -@item -pass-exit-codes @opindex pass-exit-codes +@item -pass-exit-codes Normally the @command{gcc} program exits with the code of 1 if any phase of the compiler returns a non-success return code. If you specify @option{-pass-exit-codes}, the @command{gcc} program instead returns with @@ -2167,15 +2167,15 @@ the numerically highest error produced by any phase returning an error indication. The C, C++, and Fortran front ends return 4 if an internal compiler error is encountered. -@item -pipe @opindex pipe +@item -pipe Use pipes rather than temporary files for communication between the various stages of compilation. This fails to work on some systems where the assembler is unable to read from a pipe; but the GNU assembler has no trouble. -@item -specs=@var{file} @opindex specs +@item -specs=@var{file} Process @var{file} after the compiler reads in the standard @file{specs} file, in order to override the defaults which the @command{gcc} driver program uses when determining what switches to pass to @command{cc1}, @@ -2184,8 +2184,8 @@ program uses when determining what switches to pass to @command{cc1}, are processed in order, from left to right. @xref{Spec Files}, for information about the format of the @var{file}. -@item -wrapper @opindex wrapper +@item -wrapper Invoke all subcommands under a wrapper program. The name of the wrapper program and its parameters are passed as a comma separated list. @@ -2199,8 +2199,8 @@ This invokes all subprograms of @command{gcc} under @samp{gdb --args}, thus the invocation of @command{cc1} is @samp{gdb --args cc1 @dots{}}. -@item -ffile-prefix-map=@var{old}=@var{new} @opindex ffile-prefix-map +@item -ffile-prefix-map=@var{old}=@var{new} When compiling files residing in directory @file{@var{old}}, record any references to them in the result of the compilation as if the files resided in directory @file{@var{new}} instead. Specifying this @@ -2211,8 +2211,8 @@ directives are not affected by these options. See also @option{-fmacro-prefix-map}, @option{-fdebug-prefix-map} and @option{-fprofile-prefix-map}. -@item -fplugin=@var{name}.so @opindex fplugin +@item -fplugin=@var{name}.so 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 @@ -2221,24 +2221,24 @@ purposes of argument parsing (See Each plugin should define the callback functions specified in the Plugins API. -@item -fplugin-arg-@var{name}-@var{key}=@var{value} @opindex fplugin-arg +@item -fplugin-arg-@var{name}-@var{key}=@var{value} 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 +@item -fdump-ada-spec@r{[}-slim@r{]} 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 -fada-spec-parent=@var{unit} @opindex fada-spec-parent +@item -fada-spec-parent=@var{unit} In conjunction with @option{-fdump-ada-spec@r{[}-slim@r{]}} above, generate Ada specs as child units of parent @var{unit}. -@item -fdump-go-spec=@var{file} @opindex fdump-go-spec +@item -fdump-go-spec=@var{file} 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 @@ -2296,8 +2296,8 @@ accepts: @table @gcctabopt @cindex ANSI support @cindex ISO support -@item -ansi @opindex ansi +@item -ansi In C mode, this is equivalent to @option{-std=c90}. In C++ mode, it is equivalent to @option{-std=c++98}. @@ -2334,8 +2334,8 @@ functions when @option{-ansi} is used. @xref{Other Builtins,,Other built-in functions provided by GCC}, for details of the functions affected. -@item -std= @opindex std +@item -std= Determine the language standard. @xref{Standards,,Language Standards Supported by GCC}, for details of these standard versions. This option is currently only supported when compiling C or C++. @@ -2493,8 +2493,8 @@ and will almost certainly change in incompatible ways in future releases. @end table -@item -aux-info @var{filename} @opindex aux-info +@item -aux-info @var{filename} Output to the given filename prototyped declarations for all functions declared and/or defined in a translation unit, including those in header files. This option is silently ignored in any language other than C@. @@ -2509,9 +2509,9 @@ character). In the case of function definitions, a K&R-style list of arguments followed by their declarations is also provided, inside comments, after the declaration. -@item -fno-asm @opindex fno-asm @opindex fasm +@item -fno-asm Do not recognize @code{asm}, @code{inline} or @code{typeof} as a keyword, so that code can use these words as identifiers. You can use the keywords @code{__asm__}, @code{__inline__} and @code{__typeof__} @@ -2527,10 +2527,10 @@ since @code{inline} is a standard keyword in ISO C99. In C2X mode the @code{asm} keyword, since @code{typeof} is a standard keyword in ISO C2X. -@item -fno-builtin -@itemx -fno-builtin-@var{function} @opindex fno-builtin @opindex fbuiltin +@item -fno-builtin +@itemx -fno-builtin-@var{function} @cindex built-in functions Don't recognize built-in functions that do not begin with @samp{__builtin_} as prefix. @xref{Other Builtins,,Other built-in @@ -2568,14 +2568,14 @@ built-in functions selectively when using @option{-fno-builtin} or #define strcpy(d, s) __builtin_strcpy ((d), (s)) @end smallexample -@item -fcond-mismatch @opindex fcond-mismatch +@item -fcond-mismatch Allow conditional expressions with mismatched types in the second and third arguments. The value of such an expression is void. This option is not supported for C++. -@item -ffreestanding @opindex ffreestanding +@item -ffreestanding @cindex hosted environment Assert that compilation targets a freestanding environment. This @@ -2587,15 +2587,15 @@ This is equivalent to @option{-fno-hosted}. @xref{Standards,,Language Standards Supported by GCC}, for details of freestanding and hosted environments. -@item -fgimple @opindex fgimple +@item -fgimple Enable parsing of function definitions marked with @code{__GIMPLE}. This is an experimental feature that allows unit testing of GIMPLE passes. -@item -fgnu-tm @opindex fgnu-tm +@item -fgnu-tm When the option @option{-fgnu-tm} is specified, the compiler generates code for the Linux variant of Intel's current Transactional Memory ABI specification document (Revision 1.1, May 6 2009). This is @@ -2610,8 +2610,8 @@ Transactional Memory Library}. Note that the transactional memory feature is not supported with non-call exceptions (@option{-fnon-call-exceptions}). -@item -fgnu89-inline @opindex fgnu89-inline +@item -fgnu89-inline The option @option{-fgnu89-inline} tells GCC to use the traditional GNU semantics for @code{inline} functions when in C99 mode. @xref{Inline,,An Inline Function is As Fast As a Macro}. @@ -2630,8 +2630,8 @@ The preprocessor macros @code{__GNUC_GNU_INLINE__} and in effect for @code{inline} functions. @xref{Common Predefined Macros,,,cpp,The C Preprocessor}. -@item -fhosted @opindex fhosted +@item -fhosted @cindex hosted environment Assert that compilation targets a hosted environment. This implies @@ -2640,14 +2640,14 @@ entire standard library is available, and in which @code{main} has a return type of @code{int}. Examples are nearly everything except a kernel. This is equivalent to @option{-fno-freestanding}. -@item -flax-vector-conversions @opindex flax-vector-conversions +@item -flax-vector-conversions Allow implicit conversions between vectors with differing numbers of elements and/or incompatible element types. This option should not be used for new code. -@item -fms-extensions @opindex fms-extensions +@item -fms-extensions Accept some non-standard constructs used in Microsoft header files. In C++ code, this allows member names in structures to be similar @@ -2667,10 +2667,10 @@ fields within structs/unions}, for details. Note that this option is off for all targets except for x86 targets using ms-abi. +@opindex foffload @item -foffload=disable @itemx -foffload=default @itemx -foffload=@var{target-list} -@opindex foffload @cindex Offloading targets @cindex OpenACC offloading targets @cindex OpenMP offloading targets @@ -2685,9 +2685,9 @@ Offload targets are specified in GCC's internal target-triplet format. You can run the compiler with @option{-v} to show the list of configured offload targets under @code{OFFLOAD_TARGET_NAMES}. +@opindex foffload-options @item -foffload-options=@var{options} @itemx -foffload-options=@var{target-triplet-list}=@var{options} -@opindex foffload-options @cindex Offloading options @cindex OpenACC offloading options @cindex OpenMP offloading options @@ -2707,8 +2707,8 @@ Typical command lines are -foffload-options=amdgcn-amdhsa=-march=gfx906 -foffload-options=-lm @end smallexample -@item -fopenacc @opindex fopenacc +@item -fopenacc @cindex OpenACC accelerator programming Enable handling of OpenACC directives @code{#pragma acc} in C/C++ and @code{!$acc} in Fortran. When @option{-fopenacc} is specified, the @@ -2717,16 +2717,16 @@ Programming Interface v2.6 @w{@uref{https://www.openacc.org}}. This option implies @option{-pthread}, and thus is only supported on targets that have support for @option{-pthread}. -@item -fopenacc-dim=@var{geom} @opindex fopenacc-dim +@item -fopenacc-dim=@var{geom} @cindex OpenACC accelerator programming Specify default compute dimensions for parallel offload regions that do not explicitly specify. The @var{geom} value is a triple of ':'-separated sizes, in order 'gang', 'worker' and, 'vector'. A size can be omitted, to use a target-specific default value. -@item -fopenmp @opindex fopenmp +@item -fopenmp @cindex OpenMP parallel Enable handling of OpenMP directives @code{#pragma omp} in C/C++, @code{[[omp::directive(...)]]} and @code{[[omp::sequence(...)]]} in C++ and @@ -2737,8 +2737,8 @@ implies @option{-pthread}, and thus is only supported on targets that have support for @option{-pthread}. @option{-fopenmp} implies @option{-fopenmp-simd}. -@item -fopenmp-simd @opindex fopenmp-simd +@item -fopenmp-simd @cindex OpenMP SIMD @cindex SIMD Enable handling of OpenMP's @code{simd}, @code{declare simd}, @@ -2748,9 +2748,9 @@ Enable handling of OpenMP's @code{simd}, @code{declare simd}, @code{[[omp::directive(...)]]} and @code{[[omp::sequence(...)]]} in C++ and @code{!$omp} in Fortran. Other OpenMP directives are ignored. +@opindex fopenmp-target-simd-clone @item -fopenmp-target-simd-clone @item -fopenmp-target-simd-clone=@var{device-type} -@opindex fopenmp-target-simd-clone @cindex OpenMP target SIMD clone In addition to generating SIMD clones for functions marked with the @code{declare simd} directive, GCC also generates clones @@ -2769,10 +2769,10 @@ At @option{-O2} and higher (but not @option{-Os} or @option{-Og}) this optimization defaults to @option{-fopenmp-target-simd-clone=nohost}; otherwise it is disabled by default. -@item -fpermitted-flt-eval-methods=@var{style} @opindex fpermitted-flt-eval-methods @opindex fpermitted-flt-eval-methods=c11 @opindex fpermitted-flt-eval-methods=ts-18661-3 +@item -fpermitted-flt-eval-methods=@var{style} ISO/IEC TS 18661-3 defines new permissible values for @code{FLT_EVAL_METHOD} that indicate that operations and constants with a semantic type that is an interchange or extended format should be @@ -2793,8 +2793,8 @@ is @option{-fpermitted-flt-eval-methods=c11}. The default when in a GNU dialect (@option{-std=gnu11} or similar) is @option{-fpermitted-flt-eval-methods=ts-18661-3}. -@item -fplan9-extensions @opindex fplan9-extensions +@item -fplan9-extensions Accept some non-standard constructs used in Plan 9 code. This enables @option{-fms-extensions}, permits passing pointers to @@ -2804,29 +2804,29 @@ fields declared using a typedef. @xref{Unnamed Fields,,Unnamed struct/union fields within structs/unions}, for details. This is only supported for C, not C++. -@item -fsigned-bitfields -@itemx -funsigned-bitfields -@itemx -fno-signed-bitfields -@itemx -fno-unsigned-bitfields @opindex fsigned-bitfields @opindex funsigned-bitfields @opindex fno-signed-bitfields @opindex fno-unsigned-bitfields +@item -fsigned-bitfields +@itemx -funsigned-bitfields +@itemx -fno-signed-bitfields +@itemx -fno-unsigned-bitfields These options control whether a bit-field is signed or unsigned, when the declaration does not use either @code{signed} or @code{unsigned}. By default, such a bit-field is signed, because this is consistent: the basic integer types such as @code{int} are signed types. -@item -fsigned-char @opindex fsigned-char +@item -fsigned-char Let the type @code{char} be signed, like @code{signed char}. Note that this is equivalent to @option{-fno-unsigned-char}, which is the negative form of @option{-funsigned-char}. Likewise, the option @option{-fno-signed-char} is equivalent to @option{-funsigned-char}. -@item -funsigned-char @opindex funsigned-char +@item -funsigned-char Let the type @code{char} be unsigned, like @code{unsigned char}. Each kind of machine has a default for what @code{char} should @@ -2844,9 +2844,9 @@ The type @code{char} is always a distinct type from each of @code{signed char} or @code{unsigned char}, even though its behavior is always just like one of those two. -@item -fstrict-flex-arrays @opindex fstrict-flex-arrays @opindex fno-strict-flex-arrays +@item -fstrict-flex-arrays Control when to treat the trailing array of a structure as a flexible array member for the purpose of accessing the elements of such an array. The positive form is equivalent to @option{-fstrict-flex-arrays=3}, which is the @@ -2856,8 +2856,8 @@ The negative form is equivalent to @option{-fstrict-flex-arrays=0}, which is the least strict. All trailing arrays of structures are treated as flexible array members. -@item -fstrict-flex-arrays=@var{level} @opindex fstrict-flex-arrays=@var{level} +@item -fstrict-flex-arrays=@var{level} Control when to treat the trailing array of a structure as a flexible array member for the purpose of accessing the elements of such an array. The value of @var{level} controls the level of strictness. @@ -2869,8 +2869,8 @@ You can control this behavior for a specific trailing array field of a structure by using the variable attribute @code{strict_flex_array} attribute (@pxref{Variable Attributes}). -@item -fsso-struct=@var{endianness} @opindex fsso-struct +@item -fsso-struct=@var{endianness} Set the default scalar storage order of structures and unions to the specified endianness. The accepted values are @samp{big-endian}, @samp{little-endian} and @samp{native} for the native endianness of @@ -2909,8 +2909,8 @@ Here is a list of options that are @emph{only} for compiling C++ programs: @table @gcctabopt -@item -fabi-version=@var{n} @opindex fabi-version +@item -fabi-version=@var{n} Use version @var{n} of the C++ ABI@. The default is version 0. Version 0 refers to the version conforming most closely to @@ -2986,8 +2986,8 @@ that have additional context. See also @option{-Wabi}. -@item -fabi-compat-version=@var{n} @opindex fabi-compat-version +@item -fabi-compat-version=@var{n} On targets that support strong aliases, G++ works around mangling changes by creating an alias with the correct mangled name when defining a symbol with an incorrect mangled name. @@ -3003,14 +3003,14 @@ version is used for compatibility aliases. If this option is provided along with @option{-Wabi} (without the version), the version from this option is used for the warning. -@item -fno-access-control @opindex fno-access-control @opindex faccess-control +@item -fno-access-control Turn off all access checking. This switch is mainly useful for working around bugs in the access control code. -@item -faligned-new @opindex faligned-new +@item -faligned-new Enable support for C++17 @code{new} of types that require more alignment than @code{void* ::operator new(std::size_t)} provides. A numeric argument such as @code{-faligned-new=32} can be used to @@ -3020,10 +3020,10 @@ but few users will need to override the default of This flag is enabled by default for @option{-std=c++17}. -@item -fchar8_t -@itemx -fno-char8_t @opindex fchar8_t @opindex fno-char8_t +@item -fchar8_t +@itemx -fno-char8_t Enable support for @code{char8_t} as adopted for C++20. This includes the addition of a new @code{char8_t} fundamental type, changes to the types of UTF-8 string and character literals, new signatures for @@ -3072,8 +3072,8 @@ s = u8"xx"s; // error: conversion from // type `basic_string<char>' requested @end smallexample -@item -fcheck-new @opindex fcheck-new +@item -fcheck-new Check that the pointer returned by @code{operator new} is non-null before attempting to modify the storage allocated. This check is normally unnecessary because the C++ standard specifies that @@ -3084,10 +3084,10 @@ return value even without this option. In all other cases, when exhaustion is signalled by throwing @code{std::bad_alloc}. See also @samp{new (nothrow)}. -@item -fconcepts -@itemx -fconcepts-ts @opindex fconcepts @opindex fconcepts-ts +@item -fconcepts +@itemx -fconcepts-ts Enable support for the C++ Concepts feature for constraining template arguments. With @option{-std=c++20} and above, Concepts are part of the language standard, so @option{-fconcepts} defaults to on. @@ -3097,15 +3097,15 @@ Concepts Technical Specification, ISO 19217 (2015), but didn't make it into the standard, can additionally be enabled by @option{-fconcepts-ts}. -@item -fconstexpr-depth=@var{n} @opindex fconstexpr-depth +@item -fconstexpr-depth=@var{n} Set the maximum nested evaluation depth for C++11 constexpr functions to @var{n}. A limit is needed to detect endless recursion during constant expression evaluation. The minimum specified by the standard is 512. -@item -fconstexpr-cache-depth=@var{n} @opindex fconstexpr-cache-depth +@item -fconstexpr-cache-depth=@var{n} Set the maximum level of nested evaluation depth for C++11 constexpr functions that will be cached to @var{n}. This is a heuristic that trades off compilation speed (when the cache avoids repeated @@ -3115,8 +3115,8 @@ users are likely to want to adjust it, but if your code does heavy constexpr calculations you might want to experiment to find which value works best for you. -@item -fconstexpr-fp-except @opindex fconstexpr-fp-except +@item -fconstexpr-fp-except Annex F of the C standard specifies that IEC559 floating point exceptions encountered at compile time should not stop compilation. C++ compilers have historically not followed this guidance, instead @@ -3129,14 +3129,14 @@ is undefined. constexpr float inf = 1./0.; // OK with -fconstexpr-fp-except @end smallexample -@item -fconstexpr-loop-limit=@var{n} @opindex fconstexpr-loop-limit +@item -fconstexpr-loop-limit=@var{n} Set the maximum number of iterations for a loop in C++14 constexpr functions to @var{n}. A limit is needed to detect infinite loops during constant expression evaluation. The default is 262144 (1<<18). -@item -fconstexpr-ops-limit=@var{n} @opindex fconstexpr-ops-limit +@item -fconstexpr-ops-limit=@var{n} Set the maximum number of operations during a single constexpr evaluation. Even when number of iterations of a single loop is limited with the above limit, if there are several nested loops and each of them has many iterations but still @@ -3145,8 +3145,8 @@ of a loop too many expressions need to be evaluated, the resulting constexpr evaluation might take too long. The default is 33554432 (1<<25). -@item -fcontracts @opindex fcontracts +@item -fcontracts Enable experimental support for the C++ Contracts feature, as briefly added to and then removed from the C++20 working paper (N4820). The implementation also includes proposed enhancements from papers P1290, @@ -3166,29 +3166,29 @@ contracts, P1332 contracts, or P1429 contracts; these sets cannot be used together. @table @gcctabopt -@item -fcontract-mode=[on|off] @opindex fcontract-mode +@item -fcontract-mode=[on|off] Control whether any contracts have any semantics at all. Defaults to on. -@item -fcontract-assumption-mode=[on|off] @opindex fcontract-assumption-mode +@item -fcontract-assumption-mode=[on|off] [N4820] Control whether contracts with level @samp{axiom} should have the assume semantic. Defaults to on. -@item -fcontract-build-level=[off|default|audit] @opindex fcontract-build-level +@item -fcontract-build-level=[off|default|audit] [N4820] Specify which level of contracts to generate checks for. Defaults to @samp{default}. -@item -fcontract-continuation-mode=[on|off] @opindex fcontract-continuation-mode +@item -fcontract-continuation-mode=[on|off] [N4820] Control whether to allow the program to continue executing after a contract violation. That is, do checked contracts have the @samp{maybe} semantic described below rather than the @samp{never} semantic. Defaults to off. -@item -fcontract-role=<name>:<default>,<audit>,<axiom> @opindex fcontract-role +@item -fcontract-role=<name>:<default>,<audit>,<axiom> [P1332] Specify the concrete semantics for each contract level of a particular contract role. @@ -3196,8 +3196,8 @@ of a particular contract role. [P1429] Specify the concrete semantic for a particular contract level. -@item -fcontract-strict-declarations=[on|off] @opindex fcontract-strict-declarations +@item -fcontract-strict-declarations=[on|off] Control whether to reject adding contracts to a function after its first declaration. Defaults to off. @end table @@ -3224,13 +3224,13 @@ This contract is checked. If it fails, the violation handler is called. If the handler returns, execution continues normally. @end table -@item -fcoroutines @opindex fcoroutines +@item -fcoroutines Enable support for the C++ coroutines extension (experimental). -@item -fno-elide-constructors @opindex fno-elide-constructors @opindex felide-constructors +@item -fno-elide-constructors The C++ standard allows an implementation to omit creating a temporary that is only used to initialize another object of the same type. Specifying this option disables that optimization, and forces G++ to @@ -3240,9 +3240,9 @@ to call trivial member functions which otherwise would be expanded inline. In C++17, the compiler is required to omit these temporaries, but this option still affects trivial member functions. -@item -fno-enforce-eh-specs @opindex fno-enforce-eh-specs @opindex fenforce-eh-specs +@item -fno-enforce-eh-specs Don't generate code to check for violation of exception specifications at run time. This option violates the C++ standard, but may be useful for reducing code size in production builds, much like defining @@ -3251,10 +3251,10 @@ exceptions in violation of the exception specifications; the compiler still optimizes based on the specifications, so throwing an unexpected exception results in undefined behavior at run time. -@item -fextern-tls-init -@itemx -fno-extern-tls-init @opindex fextern-tls-init @opindex fno-extern-tls-init +@item -fextern-tls-init +@itemx -fno-extern-tls-init The C++11 and OpenMP standards allow @code{thread_local} and @code{threadprivate} variables to have dynamic (runtime) initialization. To support this, any use of such a variable goes @@ -3274,34 +3274,34 @@ On targets that support symbol aliases, the default is @option{-fextern-tls-init}. On targets that do not support symbol aliases, the default is @option{-fno-extern-tls-init}. -@item -ffold-simple-inlines -@itemx -fno-fold-simple-inlines @opindex ffold-simple-inlines @opindex fno-fold-simple-inlines +@item -ffold-simple-inlines +@itemx -fno-fold-simple-inlines Permit the C++ frontend to fold calls to @code{std::move}, @code{std::forward}, @code{std::addressof} and @code{std::as_const}. In contrast to inlining, this means no debug information will be generated for such calls. Since these functions are rarely interesting to debug, this flag is enabled by default unless @option{-fno-inline} is active. -@item -fno-gnu-keywords @opindex fno-gnu-keywords @opindex fgnu-keywords +@item -fno-gnu-keywords Do not recognize @code{typeof} as a keyword, so that code can use this word as an identifier. You can use the keyword @code{__typeof__} instead. This option is implied by the strict ISO C++ dialects: @option{-ansi}, @option{-std=c++98}, @option{-std=c++11}, etc. -@item -fimplicit-constexpr @opindex fimplicit-constexpr +@item -fimplicit-constexpr Make inline functions implicitly constexpr, if they satisfy the requirements for a constexpr function. This option can be used in C++14 mode or later. This can result in initialization changing from dynamic to static and other optimizations. -@item -fno-implicit-templates @opindex fno-implicit-templates @opindex fimplicit-templates +@item -fno-implicit-templates Never emit code for non-inline templates that are instantiated implicitly (i.e.@: by use); only emit code for explicit instantiations. If you use this option, you must take care to structure your code to @@ -3309,37 +3309,37 @@ include all the necessary explicit instantiations to avoid getting undefined symbols at link time. @xref{Template Instantiation}, for more information. -@item -fno-implicit-inline-templates @opindex fno-implicit-inline-templates @opindex fimplicit-inline-templates +@item -fno-implicit-inline-templates Don't emit code for implicit instantiations of inline templates, either. The default is to handle inlines differently so that compiles with and without optimization need the same set of explicit instantiations. -@item -fno-implement-inlines @opindex fno-implement-inlines @opindex fimplement-inlines +@item -fno-implement-inlines To save space, do not emit out-of-line copies of inline functions controlled by @code{#pragma implementation}. This causes linker errors if these functions are not inlined everywhere they are called. -@item -fmodules-ts -@itemx -fno-modules-ts @opindex fmodules-ts @opindex fno-modules-ts +@item -fmodules-ts +@itemx -fno-modules-ts Enable support for C++20 modules (@pxref{C++ Modules}). The @option{-fno-modules-ts} is usually not needed, as that is the default. Even though this is a C++20 feature, it is not currently implicitly enabled by selecting that standard version. +@opindex fmodule-header @item -fmodule-header @itemx -fmodule-header=user @itemx -fmodule-header=system -@opindex fmodule-header Compile a header file to create an importable header unit. -@item -fmodule-implicit-inline @opindex fmodule-implicit-inline +@item -fmodule-implicit-inline Member functions defined in their class definitions are not implicitly inline for modular code. This is different to traditional C++ behavior, for good reasons. However, it may result in a difficulty @@ -3348,9 +3348,9 @@ implicitly inline. It does however generate an ABI incompatibility, so you must use it everywhere or nowhere. (Such definitions outside of a named module remain implicitly inline, regardless.) -@item -fno-module-lazy @opindex fno-module-lazy @opindex fmodule-lazy +@item -fno-module-lazy Disable lazy module importing and module mapper creation. @item -fmodule-mapper=@r{[}@var{hostname}@r{]}:@var{port}@r{[}?@var{ident}@r{]} @@ -3365,39 +3365,39 @@ An oracle to query for module name to filename mappings. If unspecified the @env{CXX_MODULE_MAPPER} environment variable is used, and if that is unset, an in-process default is provided. -@item -fmodule-only @opindex fmodule-only +@item -fmodule-only Only emit the Compiled Module Interface, inhibiting any object file. -@item -fms-extensions @opindex fms-extensions +@item -fms-extensions Disable Wpedantic warnings about constructs used in MFC, such as implicit int and getting a pointer to member function via non-standard syntax. -@item -fnew-inheriting-ctors @opindex fnew-inheriting-ctors +@item -fnew-inheriting-ctors Enable the P0136 adjustment to the semantics of C++11 constructor inheritance. This is part of C++17 but also considered to be a Defect Report against C++11 and C++14. This flag is enabled by default unless @option{-fabi-version=10} or lower is specified. -@item -fnew-ttp-matching @opindex fnew-ttp-matching +@item -fnew-ttp-matching Enable the P0522 resolution to Core issue 150, template template parameters and default arguments: this allows a template with default template arguments as an argument for a template template parameter with fewer template parameters. This flag is enabled by default for @option{-std=c++17}. -@item -fno-nonansi-builtins @opindex fno-nonansi-builtins @opindex fnonansi-builtins +@item -fno-nonansi-builtins Disable built-in declarations of functions that are not mandated by ANSI/ISO C@. These include @code{ffs}, @code{alloca}, @code{_exit}, @code{index}, @code{bzero}, @code{conjf}, and other related functions. -@item -fnothrow-opt @opindex fnothrow-opt +@item -fnothrow-opt Treat a @code{throw()} exception specification as if it were a @code{noexcept} specification to reduce or eliminate the text size overhead relative to a function with no exception specification. If @@ -3408,29 +3408,29 @@ optimized away. The semantic effect is that an exception thrown out of a function with such an exception specification results in a call to @code{terminate} rather than @code{unexpected}. -@item -fno-operator-names @opindex fno-operator-names @opindex foperator-names +@item -fno-operator-names Do not treat the operator name keywords @code{and}, @code{bitand}, @code{bitor}, @code{compl}, @code{not}, @code{or} and @code{xor} as synonyms as keywords. -@item -fno-optional-diags @opindex fno-optional-diags @opindex foptional-diags +@item -fno-optional-diags Disable diagnostics that the standard says a compiler does not need to issue. Currently, the only such diagnostic issued by G++ is the one for a name having multiple meanings within a class. -@item -fpermissive @opindex fpermissive +@item -fpermissive Downgrade some diagnostics about nonconformant code from errors to warnings. Thus, using @option{-fpermissive} allows some nonconforming code to compile. -@item -fno-pretty-templates @opindex fno-pretty-templates @opindex fpretty-templates +@item -fno-pretty-templates When an error message refers to a specialization of a function template, the compiler normally prints the signature of the template followed by the template arguments and any typedefs or @@ -3442,9 +3442,9 @@ the default template arguments for that template. If either of these behaviors make it harder to understand the error message rather than easier, you can use @option{-fno-pretty-templates} to disable them. -@item -fno-rtti @opindex fno-rtti @opindex frtti +@item -fno-rtti Disable generation of information about every class with virtual functions for use by the C++ run-time type identification features (@code{dynamic_cast} and @code{typeid}). If you don't use those parts @@ -3459,8 +3459,8 @@ Mixing code compiled with @option{-frtti} with that compiled with fail to link if a class compiled with @option{-fno-rtti} is used as a base for a class compiled with @option{-frtti}. -@item -fsized-deallocation @opindex fsized-deallocation +@item -fsized-deallocation Enable the built-in global declarations @smallexample void operator delete (void *, std::size_t) noexcept; @@ -3472,8 +3472,8 @@ to make deallocation faster. Enabled by default under @option{-std=c++14} and above. The flag @option{-Wsized-deallocation} warns about places that might want to add a definition. -@item -fstrict-enums @opindex fstrict-enums +@item -fstrict-enums Allow the compiler to optimize using the assumption that a value of enumerated type can only be one of the values of the enumeration (as defined in the C++ standard; basically, a value that can be @@ -3481,8 +3481,8 @@ represented in the minimum number of bits needed to represent all the enumerators). This assumption may not be valid if the program uses a cast to convert an arbitrary integer value to the enumerated type. -@item -fstrong-eval-order @opindex fstrong-eval-order +@item -fstrong-eval-order Evaluate member access, array subscripting, and shift expressions in left-to-right order, and evaluate assignment in right-to-left order, as adopted for C++17. Enabled by default with @option{-std=c++17}. @@ -3490,13 +3490,13 @@ as adopted for C++17. Enabled by default with @option{-std=c++17}. access and shift expressions, and is the default without @option{-std=c++17}. -@item -ftemplate-backtrace-limit=@var{n} @opindex ftemplate-backtrace-limit +@item -ftemplate-backtrace-limit=@var{n} Set the maximum number of template instantiation notes for a single warning or error to @var{n}. The default value is 10. -@item -ftemplate-depth=@var{n} @opindex ftemplate-depth +@item -ftemplate-depth=@var{n} Set the maximum instantiation depth for template classes to @var{n}. A limit on the template instantiation depth is needed to detect endless recursions during template class instantiation. ANSI/ISO C++ @@ -3504,31 +3504,31 @@ conforming programs must not rely on a maximum depth greater than 17 (changed to 1024 in C++11). The default value is 900, as the compiler can run out of stack space before hitting 1024 in some situations. -@item -fno-threadsafe-statics @opindex fno-threadsafe-statics @opindex fthreadsafe-statics +@item -fno-threadsafe-statics Do not emit the extra code to use the routines specified in the C++ ABI for thread-safe initialization of local statics. You can use this option to reduce code size slightly in code that doesn't need to be thread-safe. -@item -fuse-cxa-atexit @opindex fuse-cxa-atexit +@item -fuse-cxa-atexit Register destructors for objects with static storage duration with the @code{__cxa_atexit} function rather than the @code{atexit} function. This option is required for fully standards-compliant handling of static destructors, but only works if your C library supports @code{__cxa_atexit}. -@item -fno-use-cxa-get-exception-ptr @opindex fno-use-cxa-get-exception-ptr @opindex fuse-cxa-get-exception-ptr +@item -fno-use-cxa-get-exception-ptr Don't use the @code{__cxa_get_exception_ptr} runtime routine. This causes @code{std::uncaught_exception} to be incorrect, but is necessary if the runtime routine is not available. -@item -fvisibility-inlines-hidden @opindex fvisibility-inlines-hidden +@item -fvisibility-inlines-hidden This switch declares that the user does not attempt to compare pointers to inline functions or methods where the addresses of the two functions are taken in different shared objects. @@ -3555,8 +3555,8 @@ Explicitly instantiated inline methods are unaffected by this option as their linkage might otherwise cross a shared library boundary. @xref{Template Instantiation}. -@item -fvisibility-ms-compat @opindex fvisibility-ms-compat +@item -fvisibility-ms-compat This flag attempts to use visibility settings to make GCC's C++ linkage model compatible with that of Microsoft Visual Studio. @@ -3589,18 +3589,18 @@ and that pointers to function members defined in different shared objects may not compare equal. When this flag is given, it is a violation of the ODR to define types with the same name differently. -@item -fno-weak @opindex fno-weak @opindex fweak +@item -fno-weak Do not use weak symbol support, even if it is provided by the linker. By default, G++ uses weak symbols if they are available. This option exists only for testing, and should not be used by end-users; it results in inferior code and has no benefits. This option may be removed in a future release of G++. -@item -fext-numeric-literals @r{(C++ and Objective-C++ only)} @opindex fext-numeric-literals @opindex fno-ext-numeric-literals +@item -fext-numeric-literals @r{(C++ and Objective-C++ only)} Accept imaginary, fixed-point, or machine-defined literal number suffixes as GNU extensions. When this option is turned off these suffixes are treated @@ -3611,17 +3611,17 @@ This is on by default for all pre-C++11 dialects and all GNU dialects: This option is off by default for ISO C++11 onwards (@option{-std=c++11}, ...). -@item -nostdinc++ @opindex nostdinc++ +@item -nostdinc++ Do not search for header files in the standard directories specific to C++, but do still search the other standard directories. (This option is used when building the C++ library.) +@opindex flang-info-include-translate +@opindex flang-info-include-translate-not @item -flang-info-include-translate @itemx -flang-info-include-translate-not @itemx -flang-info-include-translate=@var{header} -@opindex flang-info-include-translate -@opindex flang-info-include-translate-not Inform of include translation events. The first will note accepted include translations, the second will note declined include translations. The @var{header} form will inform of include @@ -3629,17 +3629,17 @@ translations relating to that specific header. If @var{header} is of the form @code{"user"} or @code{<system>} it will be resolved to a specific user or system header using the include path. +@opindex flang-info-module-cmi @item -flang-info-module-cmi @itemx -flang-info-module-cmi=@var{module} -@opindex flang-info-module-cmi Inform of Compiled Module Interface pathnames. The first will note all read CMI pathnames. The @var{module} form will not reading a specific module's CMI. @var{module} may be a named module or a header-unit (the latter indicated by either being a pathname containing directory separators or enclosed in @code{<>} or @code{""}). -@item -stdlib=@var{libstdc++,libc++} @opindex stdlib +@item -stdlib=@var{libstdc++,libc++} When G++ is configured to support this option, it allows specification of alternate C++ runtime libraries. Two options are available: @var{libstdc++} (the default, native C++ runtime for G++) and @var{libc++} which is the @@ -3652,15 +3652,15 @@ when a C++ runtime is required for linking. In addition, these warning options have meanings only for C++ programs: @table @gcctabopt -@item -Wabi-tag @r{(C++ and Objective-C++ only)} @opindex Wabi-tag +@item -Wabi-tag @r{(C++ and Objective-C++ only)} Warn when a type with an ABI tag is used in a context that does not have that ABI tag. See @ref{C++ Attributes} for more information about ABI tags. -@item -Wcomma-subscript @r{(C++ and Objective-C++ only)} @opindex Wcomma-subscript @opindex Wno-comma-subscript +@item -Wcomma-subscript @r{(C++ and Objective-C++ only)} Warn about uses of a comma expression within a subscripting expression. This usage was deprecated in C++20 and is going to be removed in C++23. However, a comma expression wrapped in @code{( )} is not deprecated. Example: @@ -3684,9 +3684,9 @@ in C++20 with a pedantic warning that can be disabled with Enabled by default with @option{-std=c++20} unless @option{-Wno-deprecated}, and with @option{-std=c++23} regardless of @option{-Wno-deprecated}. -@item -Wctad-maybe-unsupported @r{(C++ and Objective-C++ only)} @opindex Wctad-maybe-unsupported @opindex Wno-ctad-maybe-unsupported +@item -Wctad-maybe-unsupported @r{(C++ and Objective-C++ only)} Warn when performing class template argument deduction (CTAD) on a type with no explicitly written deduction guides. This warning will point out cases where CTAD succeeded only because the compiler synthesized the implicit @@ -3703,18 +3703,18 @@ template <typename T> struct S @{ S(allow_ctad_t) -> S<void>; // guide with incomplete parameter type will never be considered @end smallexample -@item -Wctor-dtor-privacy @r{(C++ and Objective-C++ only)} @opindex Wctor-dtor-privacy @opindex Wno-ctor-dtor-privacy +@item -Wctor-dtor-privacy @r{(C++ and Objective-C++ only)} Warn when a class seems unusable because all the constructors or destructors in that class are private, and it has neither friends nor public static member functions. Also warn if there are no non-private methods, and there's at least one private member function that isn't a constructor or destructor. -@item -Wdangling-reference @r{(C++ and Objective-C++ only)} @opindex Wdangling-reference @opindex Wno-dangling-reference +@item -Wdangling-reference @r{(C++ and Objective-C++ only)} Warn when a reference is bound to a temporary whose lifetime has ended. For example: @@ -3770,18 +3770,18 @@ the call to @code{std::minmax}. This warning is enabled by @option{-Wall}. -@item -Wdelete-non-virtual-dtor @r{(C++ and Objective-C++ only)} @opindex Wdelete-non-virtual-dtor @opindex Wno-delete-non-virtual-dtor +@item -Wdelete-non-virtual-dtor @r{(C++ and Objective-C++ only)} Warn when @code{delete} is used to destroy an instance of a class that has virtual functions and non-virtual destructor. It is unsafe to delete an instance of a derived class through a pointer to a base class if the base class does not have a virtual destructor. This warning is enabled by @option{-Wall}. -@item -Wdeprecated-copy @r{(C++ and Objective-C++ only)} @opindex Wdeprecated-copy @opindex Wno-deprecated-copy +@item -Wdeprecated-copy @r{(C++ and Objective-C++ only)} Warn that the implicit declaration of a copy constructor or copy assignment operator is deprecated if the class has a user-provided copy constructor or copy assignment operator, in C++11 and up. This @@ -3789,9 +3789,9 @@ warning is enabled by @option{-Wextra}. With @option{-Wdeprecated-copy-dtor}, also deprecate if the class has a user-provided destructor. -@item -Wno-deprecated-enum-enum-conversion @r{(C++ and Objective-C++ only)} @opindex Wdeprecated-enum-enum-conversion @opindex Wno-deprecated-enum-enum-conversion +@item -Wno-deprecated-enum-enum-conversion @r{(C++ and Objective-C++ only)} Disable the warning about the case when the usual arithmetic conversions are applied on operands where one is of enumeration type and the other is of a different enumeration type. This conversion was deprecated in C++20. @@ -3807,9 +3807,9 @@ int k = f - e; @option{-std=c++20}. In pre-C++20 dialects, this warning can be enabled by @option{-Wenum-conversion}. -@item -Wno-deprecated-enum-float-conversion @r{(C++ and Objective-C++ only)} @opindex Wdeprecated-enum-float-conversion @opindex Wno-deprecated-enum-float-conversion +@item -Wno-deprecated-enum-float-conversion @r{(C++ and Objective-C++ only)} Disable the warning about the case when the usual arithmetic conversions are applied on operands where one is of enumeration type and the other is of a floating-point type. This conversion was deprecated in C++20. For @@ -3825,9 +3825,9 @@ bool b = e <= 3.7; @option{-std=c++20}. In pre-C++20 dialects, this warning can be enabled by @option{-Wenum-conversion}. -@item -Wno-init-list-lifetime @r{(C++ and Objective-C++ only)} @opindex Winit-list-lifetime @opindex Wno-init-list-lifetime +@item -Wno-init-list-lifetime @r{(C++ and Objective-C++ only)} Do not warn about uses of @code{std::initializer_list} that are likely to result in dangling pointers. Since the underlying array for an @code{initializer_list} is handled like a normal C++ temporary object, @@ -3870,9 +3870,9 @@ the variable declaration statement. @end itemize -@item -Winvalid-constexpr @opindex Winvalid-constexpr @opindex Wno-invalid-constexpr +@item -Winvalid-constexpr Warn when a function never produces a constant expression. In C++20 and earlier, for every @code{constexpr} function and function template, @@ -3896,17 +3896,17 @@ g (int& i) @} @end smallexample -@item -Winvalid-imported-macros @opindex Winvalid-imported-macros @opindex Wno-invalid-imported-macros +@item -Winvalid-imported-macros Verify all imported macro definitions are valid at the end of compilation. This is not enabled by default, as it requires additional processing to determine. It may be useful when preparing sets of header-units to ensure consistent macros. -@item -Wno-literal-suffix @r{(C++ and Objective-C++ only)} @opindex Wliteral-suffix @opindex Wno-literal-suffix +@item -Wno-literal-suffix @r{(C++ and Objective-C++ only)} Do not warn when a string or character literal is followed by a ud-suffix which does not begin with an underscore. As a conforming extension, GCC treats such suffixes as separate preprocessing tokens @@ -3933,9 +3933,9 @@ with an underscore are reserved for future standardization. These warnings are enabled by default. -@item -Wno-narrowing @r{(C++ and Objective-C++ only)} @opindex Wnarrowing @opindex Wno-narrowing +@item -Wno-narrowing @r{(C++ and Objective-C++ only)} For C++11 and later standards, narrowing conversions are diagnosed by default, as required by the standard. A narrowing conversion from a constant produces an error, and a narrowing conversion from a non-constant produces a warning, @@ -3953,17 +3953,17 @@ int i = @{ 2.2 @}; // error: narrowing from double to int This flag is included in @option{-Wall} and @option{-Wc++11-compat}. -@item -Wnoexcept @r{(C++ and Objective-C++ only)} @opindex Wnoexcept @opindex Wno-noexcept +@item -Wnoexcept @r{(C++ and Objective-C++ only)} Warn when a noexcept-expression evaluates to false because of a call to a function that does not have a non-throwing exception specification (i.e. @code{throw()} or @code{noexcept}) but is known by the compiler to never throw an exception. -@item -Wnoexcept-type @r{(C++ and Objective-C++ only)} @opindex Wnoexcept-type @opindex Wno-noexcept-type +@item -Wnoexcept-type @r{(C++ and Objective-C++ only)} Warn if the C++17 feature making @code{noexcept} part of a function type changes the mangled name of a symbol relative to C++14. Enabled by @option{-Wabi} and @option{-Wc++17-compat}. @@ -3980,9 +3980,9 @@ void h() @{ f(g); @} In C++14, @code{f} calls @code{f<void(*)()>}, but in C++17 it calls @code{f<void(*)()noexcept>}. -@item -Wclass-memaccess @r{(C++ and Objective-C++ only)} @opindex Wclass-memaccess @opindex Wno-class-memaccess +@item -Wclass-memaccess @r{(C++ and Objective-C++ only)} Warn when the destination of a call to a raw memory function such as @code{memset} or @code{memcpy} is an object of class type, and when writing into such an object might bypass the class non-trivial or deleted constructor @@ -4002,9 +4002,9 @@ Explicitly casting the pointer to the class object to @code{void *} or to a type that can be safely accessed by the raw memory function suppresses the warning. -@item -Wnon-virtual-dtor @r{(C++ and Objective-C++ only)} @opindex Wnon-virtual-dtor @opindex Wno-non-virtual-dtor +@item -Wnon-virtual-dtor @r{(C++ and Objective-C++ only)} Warn when a class has virtual functions and an accessible non-virtual destructor itself or in an accessible polymorphic base class, in which case it is possible but unsafe to delete an instance of a derived @@ -4014,18 +4014,18 @@ The @option{-Wdelete-non-virtual-dtor} option (enabled by @option{-Wall}) should be preferred because it warns about the unsafe cases without false positives. -@item -Wregister @r{(C++ and Objective-C++ only)} @opindex Wregister @opindex Wno-register +@item -Wregister @r{(C++ and Objective-C++ only)} Warn on uses of the @code{register} storage class specifier, except when it is part of the GNU @ref{Explicit Register Variables} extension. The use of the @code{register} keyword as storage class specifier has been deprecated in C++11 and removed in C++17. Enabled by default with @option{-std=c++17}. -@item -Wreorder @r{(C++ and Objective-C++ only)} @opindex Wreorder @opindex Wno-reorder +@item -Wreorder @r{(C++ and Objective-C++ only)} @cindex reordering, warning @cindex warning for reordering of member initializers Warn when the order of member initializers given in the code does not @@ -4044,9 +4044,9 @@ The compiler rearranges the member initializers for @code{i} and @code{j} to match the declaration order of the members, emitting a warning to that effect. This warning is enabled by @option{-Wall}. -@item -Wno-pessimizing-move @r{(C++ and Objective-C++ only)} @opindex Wpessimizing-move @opindex Wno-pessimizing-move +@item -Wno-pessimizing-move @r{(C++ and Objective-C++ only)} This warning warns when a call to @code{std::move} prevents copy elision. A typical scenario when copy elision can occur is when returning in a function with a class return type, when the expression being returned is the @@ -4069,9 +4069,9 @@ But in this example, the @code{std::move} call prevents copy elision. This warning is enabled by @option{-Wall}. -@item -Wno-redundant-move @r{(C++ and Objective-C++ only)} @opindex Wredundant-move @opindex Wno-redundant-move +@item -Wno-redundant-move @r{(C++ and Objective-C++ only)} This warning warns about redundant calls to @code{std::move}; that is, when a move operation would have been performed even without the @code{std::move} call. This happens because the compiler is forced to treat the object as if @@ -4112,9 +4112,9 @@ treats the return value as if it were designated by an rvalue. This warning is enabled by @option{-Wextra}. -@item -Wrange-loop-construct @r{(C++ and Objective-C++ only)} @opindex Wrange-loop-construct @opindex Wno-range-loop-construct +@item -Wrange-loop-construct @r{(C++ and Objective-C++ only)} This warning warns when a C++ range-based for-loop is creating an unnecessary copy. This can happen when the range declaration is not a reference, but probably should be. For example: @@ -4146,9 +4146,9 @@ type @code{double} is created and destroyed, to which the reference This warning is enabled by @option{-Wall}. -@item -Wredundant-tags @r{(C++ and Objective-C++ only)} @opindex Wredundant-tags @opindex Wno-redundant-tags +@item -Wredundant-tags @r{(C++ and Objective-C++ only)} Warn about redundant class-key and enum-key in references to class types and enumerated types in contexts where the key can be eliminated without causing an ambiguity. For example: @@ -4167,9 +4167,9 @@ void foo (); // "hides" struct foo void bar (struct foo&); // no warning, keyword struct is necessary @end smallexample -@item -Wno-subobject-linkage @r{(C++ and Objective-C++ only)} @opindex Wsubobject-linkage @opindex Wno-subobject-linkage +@item -Wno-subobject-linkage @r{(C++ and Objective-C++ only)} Do not warn if a class type has a base or a field whose type uses the anonymous namespace or depends on a type with no linkage. If a type A depends on @@ -4182,9 +4182,9 @@ compiler doesn't give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions. @option{-Wsubobject-linkage} is enabled by default. -@item -Weffc++ @r{(C++ and Objective-C++ only)} @opindex Weffc++ @opindex Wno-effc++ +@item -Weffc++ @r{(C++ and Objective-C++ only)} Warn about violations of the following style guidelines from Scott Meyers' @cite{Effective C++} series of books: @@ -4220,24 +4220,24 @@ When selecting this option, be aware that the standard library headers do not obey all of these guidelines; use @samp{grep -v} to filter out those warnings. -@item -Wno-exceptions @r{(C++ and Objective-C++ only)} @opindex Wexceptions @opindex Wno-exceptions +@item -Wno-exceptions @r{(C++ and Objective-C++ only)} Disable the warning about the case when an exception handler is shadowed by another handler, which can point out a wrong ordering of exception handlers. -@item -Wstrict-null-sentinel @r{(C++ and Objective-C++ only)} @opindex Wstrict-null-sentinel @opindex Wno-strict-null-sentinel +@item -Wstrict-null-sentinel @r{(C++ and Objective-C++ only)} Warn about the use of an uncasted @code{NULL} as sentinel. When compiling only with GCC this is a valid sentinel, as @code{NULL} is defined to @code{__null}. Although it is a null pointer constant rather than a null pointer, it is guaranteed to be of the same size as a pointer. But this use is not portable across different compilers. -@item -Wno-non-template-friend @r{(C++ and Objective-C++ only)} @opindex Wno-non-template-friend @opindex Wnon-template-friend +@item -Wno-non-template-friend @r{(C++ and Objective-C++ only)} Disable warnings when non-template friend functions are declared within a template. In very old versions of GCC that predate implementation of the ISO standard, declarations such as @@ -4246,18 +4246,18 @@ could be interpreted as a particular specialization of a template function; the warning exists to diagnose compatibility problems, and is enabled by default. -@item -Wold-style-cast @r{(C++ and Objective-C++ only)} @opindex Wold-style-cast @opindex Wno-old-style-cast +@item -Wold-style-cast @r{(C++ and Objective-C++ only)} Warn if an old-style (C-style) cast to a non-void type is used within a C++ program. The new-style casts (@code{dynamic_cast}, @code{static_cast}, @code{reinterpret_cast}, and @code{const_cast}) are less vulnerable to unintended effects and much easier to search for. -@item -Woverloaded-virtual @r{(C++ and Objective-C++ only)} -@itemx -Woverloaded-virtual=@var{n} @opindex Woverloaded-virtual @opindex Wno-overloaded-virtual +@item -Woverloaded-virtual @r{(C++ and Objective-C++ only)} +@itemx -Woverloaded-virtual=@var{n} @cindex overloaded virtual function, warning @cindex warning for overloaded virtual function Warn when a function declaration hides virtual functions from a @@ -4311,32 +4311,32 @@ At level 1, this case does not warn; at level 2, it does. @option{-Woverloaded-virtual} by itself selects level 2. Level 1 is included in @option{-Wall}. -@item -Wno-pmf-conversions @r{(C++ and Objective-C++ only)} @opindex Wno-pmf-conversions @opindex Wpmf-conversions +@item -Wno-pmf-conversions @r{(C++ and Objective-C++ only)} Disable the diagnostic for converting a bound pointer to member function to a plain pointer. -@item -Wsign-promo @r{(C++ and Objective-C++ only)} @opindex Wsign-promo @opindex Wno-sign-promo +@item -Wsign-promo @r{(C++ and Objective-C++ only)} Warn when overload resolution chooses a promotion from unsigned or enumerated type to a signed type, over a conversion to an unsigned type of the same size. Previous versions of G++ tried to preserve unsignedness, but the standard mandates the current behavior. -@item -Wtemplates @r{(C++ and Objective-C++ only)} @opindex Wtemplates @opindex Wno-templates +@item -Wtemplates @r{(C++ and Objective-C++ only)} Warn when a primary template declaration is encountered. Some coding rules disallow templates, and this may be used to enforce that rule. The warning is inactive inside a system header file, such as the STL, so one can still use the STL. One may also instantiate or specialize templates. -@item -Wmismatched-new-delete @r{(C++ and Objective-C++ only)} @opindex Wmismatched-new-delete @opindex Wno-mismatched-new-delete +@item -Wmismatched-new-delete @r{(C++ and Objective-C++ only)} Warn for mismatches between calls to @code{operator new} or @code{operator delete} and the corresponding call to the allocation or deallocation function. This includes invocations of C++ @code{operator delete} with pointers @@ -4368,9 +4368,9 @@ new} and @code{operator delete}. @option{-Wmismatched-new-delete} is included in @option{-Wall}. -@item -Wmismatched-tags @r{(C++ and Objective-C++ only)} @opindex Wmismatched-tags @opindex Wno-mismatched-tags +@item -Wmismatched-tags @r{(C++ and Objective-C++ only)} Warn for declarations of structs, classes, and class templates and their specializations with a class-key that does not match either the definition or the first declaration if no definition is provided. @@ -4394,27 +4394,27 @@ unresolved references due to the difference in the mangling of symbols declared with different class-keys. The option can be used either on its own or in conjunction with @option{-Wredundant-tags}. -@item -Wmultiple-inheritance @r{(C++ and Objective-C++ only)} @opindex Wmultiple-inheritance @opindex Wno-multiple-inheritance +@item -Wmultiple-inheritance @r{(C++ and Objective-C++ only)} Warn when a class is defined with multiple direct base classes. Some coding rules disallow multiple inheritance, and this may be used to enforce that rule. The warning is inactive inside a system header file, such as the STL, so one can still use the STL. One may also define classes that indirectly use multiple inheritance. -@item -Wvirtual-inheritance @opindex Wvirtual-inheritance @opindex Wno-virtual-inheritance +@item -Wvirtual-inheritance Warn when a class is defined with a virtual direct base class. Some coding rules disallow multiple inheritance, and this may be used to enforce that rule. The warning is inactive inside a system header file, such as the STL, so one can still use the STL. One may also define classes that indirectly use virtual inheritance. -@item -Wno-virtual-move-assign @opindex Wvirtual-move-assign @opindex Wno-virtual-move-assign +@item -Wno-virtual-move-assign Suppress warnings about inheriting from a virtual base with a non-trivial C++11 move assignment operator. This is dangerous because if the virtual base is reachable along more than one path, it is @@ -4422,23 +4422,23 @@ moved multiple times, which can mean both objects end up in the moved-from state. If the move assignment operator is written to avoid moving from a moved-from object, this warning can be disabled. -@item -Wnamespaces @opindex Wnamespaces @opindex Wno-namespaces +@item -Wnamespaces Warn when a namespace definition is opened. Some coding rules disallow namespaces, and this may be used to enforce that rule. The warning is inactive inside a system header file, such as the STL, so one can still use the STL. One may also use using directives and qualified names. -@item -Wno-terminate @r{(C++ and Objective-C++ only)} @opindex Wterminate @opindex Wno-terminate +@item -Wno-terminate @r{(C++ and Objective-C++ only)} Disable the warning about a throw-expression that will immediately result in a call to @code{terminate}. -@item -Wno-vexing-parse @r{(C++ and Objective-C++ only)} @opindex Wvexing-parse @opindex Wno-vexing-parse +@item -Wno-vexing-parse @r{(C++ and Objective-C++ only)} Warn about the most vexing parse syntactic ambiguity. This warns about the cases when a declaration looks like a variable definition, but the C++ language requires it to be interpreted as a function declaration. @@ -4467,16 +4467,16 @@ it can suggest removing the parentheses or using braces instead. This warning is enabled by default. -@item -Wno-class-conversion @r{(C++ and Objective-C++ only)} @opindex Wno-class-conversion @opindex Wclass-conversion +@item -Wno-class-conversion @r{(C++ and Objective-C++ only)} Do not warn when a conversion function converts an object to the same type, to a base class of that type, or to void; such a conversion function will never be called. -@item -Wvolatile @r{(C++ and Objective-C++ only)} @opindex Wvolatile @opindex Wno-volatile +@item -Wvolatile @r{(C++ and Objective-C++ only)} Warn about deprecated uses of the @code{volatile} qualifier. This includes postfix and prefix @code{++} and @code{--} expressions of @code{volatile}-qualified types, using simple assignments where the left @@ -4488,15 +4488,15 @@ non-class type, @code{volatile}-qualified function return type, Enabled by default with @option{-std=c++20}. -@item -Wzero-as-null-pointer-constant @r{(C++ and Objective-C++ only)} @opindex Wzero-as-null-pointer-constant @opindex Wno-zero-as-null-pointer-constant +@item -Wzero-as-null-pointer-constant @r{(C++ and Objective-C++ only)} Warn when a literal @samp{0} is used as null pointer constant. This can be useful to facilitate the conversion to @code{nullptr} in C++11. -@item -Waligned-new @opindex Waligned-new @opindex Wno-aligned-new +@item -Waligned-new Warn about a new-expression of a type that requires greater alignment than the @code{alignof(std::max_align_t)} but uses an allocation function without an explicit alignment parameter. This option is @@ -4506,10 +4506,10 @@ Normally this only warns about global allocation functions, but @option{-Waligned-new=all} also warns about class member allocation functions. -@item -Wno-placement-new -@itemx -Wplacement-new=@var{n} @opindex Wplacement-new @opindex Wno-placement-new +@item -Wno-placement-new +@itemx -Wplacement-new=@var{n} Warn about placement new expressions with undefined behavior, such as constructing an object in a buffer that is smaller than the type of the object. For example, the placement new expression below is diagnosed @@ -4550,10 +4550,10 @@ new (s->a)int [32](); @end table -@item -Wcatch-value -@itemx -Wcatch-value=@var{n} @r{(C++ and Objective-C++ only)} @opindex Wcatch-value @opindex Wno-catch-value +@item -Wcatch-value +@itemx -Wcatch-value=@var{n} @r{(C++ and Objective-C++ only)} Warn about catch handlers that do not catch via reference. With @option{-Wcatch-value=1} (or @option{-Wcatch-value} for short) warn about polymorphic class types that are caught by value. @@ -4561,25 +4561,25 @@ With @option{-Wcatch-value=2} warn about all class types that are caught by value. With @option{-Wcatch-value=3} warn about all types that are not caught by reference. @option{-Wcatch-value} is enabled by @option{-Wall}. -@item -Wconditionally-supported @r{(C++ and Objective-C++ only)} @opindex Wconditionally-supported @opindex Wno-conditionally-supported +@item -Wconditionally-supported @r{(C++ and Objective-C++ only)} Warn for conditionally-supported (C++11 [intro.defs]) constructs. -@item -Wno-delete-incomplete @r{(C++ and Objective-C++ only)} @opindex Wdelete-incomplete @opindex Wno-delete-incomplete +@item -Wno-delete-incomplete @r{(C++ and Objective-C++ only)} Do not warn when deleting a pointer to incomplete type, which may cause undefined behavior at runtime. This warning is enabled by default. -@item -Wextra-semi @r{(C++, Objective-C++ only)} @opindex Wextra-semi @opindex Wno-extra-semi +@item -Wextra-semi @r{(C++, Objective-C++ only)} Warn about redundant semicolons after in-class function definitions. -@item -Wno-inaccessible-base @r{(C++, Objective-C++ only)} @opindex Winaccessible-base @opindex Wno-inaccessible-base +@item -Wno-inaccessible-base @r{(C++, Objective-C++ only)} This option controls warnings when a base class is inaccessible in a class derived from it due to ambiguity. The warning is enabled by default. @@ -4595,16 +4595,16 @@ struct C : B, A @{ @}; @end group @end smallexample -@item -Wno-inherited-variadic-ctor @opindex Winherited-variadic-ctor @opindex Wno-inherited-variadic-ctor +@item -Wno-inherited-variadic-ctor Suppress warnings about use of C++11 inheriting constructors when the base class inherited from has a C variadic constructor; the warning is on by default because the ellipsis is not inherited. -@item -Wno-invalid-offsetof @r{(C++ and Objective-C++ only)} @opindex Wno-invalid-offsetof @opindex Winvalid-offsetof +@item -Wno-invalid-offsetof @r{(C++ and Objective-C++ only)} Suppress warnings from applying the @code{offsetof} macro to a non-POD type. According to the 2014 ISO C++ standard, applying @code{offsetof} to a non-standard-layout type is undefined. In existing C++ implementations, @@ -4616,9 +4616,9 @@ warning about it. The restrictions on @code{offsetof} may be relaxed in a future version of the C++ standard. -@item -Wsized-deallocation @r{(C++ and Objective-C++ only)} @opindex Wsized-deallocation @opindex Wno-sized-deallocation +@item -Wsized-deallocation @r{(C++ and Objective-C++ only)} Warn about a definition of an unsized deallocation function @smallexample void operator delete (void *) noexcept; @@ -4632,9 +4632,9 @@ void operator delete[] (void *, std::size_t) noexcept; or vice versa. Enabled by @option{-Wextra} along with @option{-fsized-deallocation}. -@item -Wsuggest-final-types @opindex Wno-suggest-final-types @opindex Wsuggest-final-types +@item -Wsuggest-final-types Warn about types with virtual methods where code quality would be improved if the type were declared with the C++11 @code{final} specifier, or, if possible, @@ -4644,9 +4644,9 @@ link-time optimization, where the information about the class hierarchy graph is more complete. -@item -Wsuggest-final-methods @opindex Wno-suggest-final-methods @opindex Wsuggest-final-methods +@item -Wsuggest-final-methods Warn about virtual methods where code quality would be improved if the method were declared with the C++11 @code{final} specifier, or, if possible, its type were @@ -4657,16 +4657,16 @@ class hierarchy graph is more complete. It is recommended to first consider suggestions of @option{-Wsuggest-final-types} and then rebuild with new annotations. -@item -Wsuggest-override @opindex Wsuggest-override @opindex Wno-suggest-override +@item -Wsuggest-override Warn about overriding virtual functions that are not marked with the @code{override} keyword. -@item -Wuse-after-free -@itemx -Wuse-after-free=@var{n} @opindex Wuse-after-free @opindex Wno-use-after-free +@item -Wuse-after-free +@itemx -Wuse-after-free=@var{n} Warn about uses of pointers to dynamically allocated objects that have been rendered indeterminate by a call to a deallocation function. The warning is enabled at all optimization levels but may yield different @@ -4724,9 +4724,9 @@ pointers after reallocation. @option{-Wuse-after-free=2} is included in @option{-Wall}. -@item -Wuseless-cast @r{(C++ and Objective-C++ only)} @opindex Wuseless-cast @opindex Wno-useless-cast +@item -Wuseless-cast @r{(C++ and Objective-C++ only)} Warn when an expression is cast to its own type. This warning does not occur when a class object is converted to a non-reference type as that is a way to create a temporary: @@ -4740,9 +4740,9 @@ void f (S&& arg) @} @end smallexample -@item -Wno-conversion-null @r{(C++ and Objective-C++ only)} @opindex Wconversion-null @opindex Wno-conversion-null +@item -Wno-conversion-null @r{(C++ and Objective-C++ only)} Do not warn for conversions between @code{NULL} and non-pointer types. @option{-Wconversion-null} is enabled by default. @@ -4781,8 +4781,8 @@ Here is a list of options that are @emph{only} for compiling Objective-C and Objective-C++ programs: @table @gcctabopt -@item -fconstant-string-class=@var{class-name} @opindex fconstant-string-class +@item -fconstant-string-class=@var{class-name} Use @var{class-name} as the name of the class to instantiate for each literal string specified with the syntax @code{@@"@dots{}"}. The default class name is @code{NXConstantString} if the GNU runtime is being used, and @@ -4791,29 +4791,29 @@ class name is @code{NXConstantString} if the GNU runtime is being used, and @option{-fconstant-string-class} setting and cause @code{@@"@dots{}"} literals to be laid out as constant CoreFoundation strings. -@item -fgnu-runtime @opindex fgnu-runtime +@item -fgnu-runtime Generate object code compatible with the standard GNU Objective-C runtime. This is the default for most types of systems. -@item -fnext-runtime @opindex fnext-runtime +@item -fnext-runtime Generate output compatible with the NeXT runtime. This is the default for NeXT-based systems, including Darwin and Mac OS X@. The macro @code{__NEXT_RUNTIME__} is predefined if (and only if) this option is used. -@item -fno-nil-receivers @opindex fno-nil-receivers @opindex fnil-receivers +@item -fno-nil-receivers Assume that all Objective-C message dispatches (@code{[receiver message:arg]}) in this translation unit ensure that the receiver is not @code{nil}. This allows for more efficient entry points in the runtime to be used. This option is only available in conjunction with the NeXT runtime and ABI version 0 or 1. -@item -fobjc-abi-version=@var{n} @opindex fobjc-abi-version +@item -fobjc-abi-version=@var{n} Use version @var{n} of the Objective-C ABI for the selected runtime. This option is currently supported only for the NeXT runtime. In that case, Version 0 is the traditional (32-bit) ABI without support for @@ -4823,8 +4823,8 @@ Objective-C 2.0 additions. Version 2 is the modern (64-bit) ABI. If nothing is specified, the default is Version 0 on 32-bit target machines, and Version 2 on 64-bit target machines. -@item -fobjc-call-cxx-cdtors @opindex fobjc-call-cxx-cdtors +@item -fobjc-call-cxx-cdtors For each Objective-C class, check if any of its instance variables is a C++ object with a non-trivial default constructor. If so, synthesize a special @code{- (id) .cxx_construct} instance method which runs @@ -4848,13 +4848,13 @@ As of this writing, only the NeXT runtime on Mac OS X 10.4 and later has support for invoking the @code{- (id) .cxx_construct} and @code{- (void) .cxx_destruct} methods. -@item -fobjc-direct-dispatch @opindex fobjc-direct-dispatch +@item -fobjc-direct-dispatch Allow fast jumps to the message dispatcher. On Darwin this is accomplished via the comm page. -@item -fobjc-exceptions @opindex fobjc-exceptions +@item -fobjc-exceptions Enable syntactic support for structured exception handling in Objective-C, similar to what is offered by C++. This option is required to use the Objective-C keywords @code{@@try}, @@ -4863,15 +4863,15 @@ is required to use the Objective-C keywords @code{@@try}, runtime and the NeXT runtime (but not available in conjunction with the NeXT runtime on Mac OS X 10.2 and earlier). -@item -fobjc-gc @opindex fobjc-gc +@item -fobjc-gc Enable garbage collection (GC) in Objective-C and Objective-C++ programs. This option is only available with the NeXT runtime; the GNU runtime has a different garbage collection implementation that does not require special compiler flags. -@item -fobjc-nilcheck @opindex fobjc-nilcheck +@item -fobjc-nilcheck For the NeXT runtime with version 2 of the ABI, check for a nil receiver in method invocations before doing the actual method call. This is the default and can be disabled using @@ -4880,8 +4880,8 @@ checked for nil in this way no matter what this flag is set to. Currently this flag does nothing when the GNU runtime, or an older version of the NeXT runtime ABI, is used. -@item -fobjc-std=objc1 @opindex fobjc-std +@item -fobjc-std=objc1 Conform to the language syntax of Objective-C 1.0, the language recognized by GCC 4.0. This only affects the Objective-C additions to the C/C++ language; it does not affect conformance to C/C++ standards, @@ -4891,8 +4891,8 @@ any Objective-C syntax that is not recognized by GCC 4.0 is rejected. This is useful if you need to make sure that your Objective-C code can be compiled with older versions of GCC@. -@item -freplace-objc-classes @opindex freplace-objc-classes +@item -freplace-objc-classes Emit a special marker instructing @command{ld(1)} not to statically link in the resulting object file, and allow @command{dyld(1)} to load it in at run time instead. This is used in conjunction with the Fix-and-Continue @@ -4902,8 +4902,8 @@ to restart the program itself. Currently, Fix-and-Continue functionality is only available in conjunction with the NeXT runtime on Mac OS X 10.3 and later. -@item -fzero-link @opindex fzero-link +@item -fzero-link When compiling for the NeXT runtime, the compiler ordinarily replaces calls to @code{objc_getClass("@dots{}")} (when the name of the class is known at compile time) with static class references that get initialized at load time, @@ -4914,9 +4914,9 @@ for individual class implementations to be modified during program execution. The GNU runtime currently always retains calls to @code{objc_get_class("@dots{}")} regardless of command-line options. -@item -fno-local-ivars @opindex fno-local-ivars @opindex flocal-ivars +@item -fno-local-ivars By default instance variables in Objective-C can be accessed as if they were local variables from within the methods of the class they're declared in. This can lead to shadowing between instance variables @@ -4924,32 +4924,32 @@ and other variables declared either locally inside a class method or globally with the same name. Specifying the @option{-fno-local-ivars} flag disables this behavior thus avoiding variable shadowing issues. -@item -fivar-visibility=@r{[}public@r{|}protected@r{|}private@r{|}package@r{]} @opindex fivar-visibility +@item -fivar-visibility=@r{[}public@r{|}protected@r{|}private@r{|}package@r{]} Set the default instance variable visibility to the specified option so that instance variables declared outside the scope of any access modifier directives default to the specified visibility. -@item -gen-decls @opindex gen-decls +@item -gen-decls Dump interface declarations for all classes seen in the source file to a file named @file{@var{sourcename}.decl}. -@item -Wassign-intercept @r{(Objective-C and Objective-C++ only)} @opindex Wassign-intercept @opindex Wno-assign-intercept +@item -Wassign-intercept @r{(Objective-C and Objective-C++ only)} Warn whenever an Objective-C assignment is being intercepted by the garbage collector. -@item -Wno-property-assign-default @r{(Objective-C and Objective-C++ only)} @opindex Wproperty-assign-default @opindex Wno-property-assign-default +@item -Wno-property-assign-default @r{(Objective-C and Objective-C++ only)} Do not warn if a property for an Objective-C object has no assign semantics specified. -@item -Wno-protocol @r{(Objective-C and Objective-C++ only)} @opindex Wno-protocol @opindex Wprotocol +@item -Wno-protocol @r{(Objective-C and Objective-C++ only)} If a class is declared to implement a protocol, a warning is issued for every method in the protocol that is not implemented by the class. The default behavior is to issue a warning for every method not explicitly @@ -4958,16 +4958,16 @@ from the superclass. If you use the @option{-Wno-protocol} option, then methods inherited from the superclass are considered to be implemented, and no warning is issued for them. -@item -Wobjc-root-class @r{(Objective-C and Objective-C++ only)} @opindex Wobjc-root-class +@item -Wobjc-root-class @r{(Objective-C and Objective-C++ only)} Warn if a class interface lacks a superclass. Most classes will inherit from @code{NSObject} (or @code{Object}) for example. When declaring classes intended to be root classes, the warning can be suppressed by marking their interfaces with @code{__attribute__((objc_root_class))}. -@item -Wselector @r{(Objective-C and Objective-C++ only)} @opindex Wselector @opindex Wno-selector +@item -Wselector @r{(Objective-C and Objective-C++ only)} Warn if multiple methods of different types for the same selector are found during compilation. The check is performed on the list of methods in the final stage of compilation. Additionally, a check is performed @@ -4979,9 +4979,9 @@ stage of compilation is not reached, for example because an error is found during compilation, or because the @option{-fsyntax-only} option is being used. -@item -Wstrict-selector-match @r{(Objective-C and Objective-C++ only)} @opindex Wstrict-selector-match @opindex Wno-strict-selector-match +@item -Wstrict-selector-match @r{(Objective-C and Objective-C++ only)} Warn if multiple methods with differing argument and/or return types are found for a given selector when attempting to send a message using this selector to a receiver of type @code{id} or @code{Class}. When this flag @@ -4989,9 +4989,9 @@ is off (which is the default behavior), the compiler omits such warnings if any differences found are confined to types that share the same size and alignment. -@item -Wundeclared-selector @r{(Objective-C and Objective-C++ only)} @opindex Wundeclared-selector @opindex Wno-undeclared-selector +@item -Wundeclared-selector @r{(Objective-C and Objective-C++ only)} Warn if a @code{@@selector(@dots{})} expression referring to an undeclared selector is found. A selector is considered undeclared if no method with that name has been declared before the @@ -5003,8 +5003,8 @@ while @option{-Wselector} only performs its checks in the final stage of compilation. This also enforces the coding style convention that methods and selectors must be declared before being used. -@item -print-objc-runtime-info @opindex print-objc-runtime-info +@item -print-objc-runtime-info Generate C header describing the largest structure that is passed by value, if any. @@ -5025,8 +5025,8 @@ information should be reported. Note that some language front ends may not honor these options. @table @gcctabopt -@item -fmessage-length=@var{n} @opindex fmessage-length +@item -fmessage-length=@var{n} Try to format error messages so that they fit on lines of about @var{n} characters. If @var{n} is zero, then no line-wrapping is done; each error message appears on a single line. This is the @@ -5051,8 +5051,8 @@ options: In the future, if GCC changes the default appearance of its diagnostics, the corresponding option to disable the new behavior will be added to this list. -@item -fdiagnostics-show-location=once @opindex fdiagnostics-show-location +@item -fdiagnostics-show-location=once Only meaningful in line-wrapping mode. Instructs the diagnostic messages reporter to emit source location information @emph{once}; that is, in case the message is too long to fit on a single physical line and has to @@ -5066,9 +5066,9 @@ messages reporter to emit the same source location information (as prefix) for physical lines that result from the process of breaking a message which is too long to fit on a single line. +@opindex fdiagnostics-color @item -fdiagnostics-color[=@var{WHEN}] @itemx -fno-diagnostics-color -@opindex fdiagnostics-color @cindex highlight, color @vindex GCC_COLORS @r{environment variable} Use color in diagnostics. @var{WHEN} is @samp{never}, @samp{always}, @@ -5195,8 +5195,8 @@ SGR substring for highlighting mismatching types within template arguments in the C++ frontend. @end table -@item -fdiagnostics-urls[=@var{WHEN}] @opindex fdiagnostics-urls +@item -fdiagnostics-urls[=@var{WHEN}] @cindex urls @vindex GCC_URLS @r{environment variable} @vindex TERM_URLS @r{environment variable} @@ -5239,17 +5239,17 @@ That list is currently xfce4-terminal, certain known to be buggy gnome-terminal versions, the linux console, and mingw. This check can be skipped with the @option{-fdiagnostics-urls=always}. -@item -fno-diagnostics-show-option @opindex fno-diagnostics-show-option @opindex fdiagnostics-show-option +@item -fno-diagnostics-show-option By default, each diagnostic emitted includes text indicating the command-line option that directly controls the diagnostic (if such an option is known to the diagnostic machinery). Specifying the @option{-fno-diagnostics-show-option} flag suppresses that behavior. -@item -fno-diagnostics-show-caret @opindex fno-diagnostics-show-caret @opindex fdiagnostics-show-caret +@item -fno-diagnostics-show-caret By default, each diagnostic emitted includes the original source line and a caret @samp{^} indicating the column. This option suppresses this information. The source line is truncated to @var{n} characters, if @@ -5257,9 +5257,9 @@ the @option{-fmessage-length=n} option is given. When the output is done to the terminal, the width is limited to the width given by the @env{COLUMNS} environment variable or, if not set, to the terminal width. -@item -fno-diagnostics-show-labels @opindex fno-diagnostics-show-labels @opindex fdiagnostics-show-labels +@item -fno-diagnostics-show-labels By default, when printing source code (via @option{-fdiagnostics-show-caret}), diagnostics can label ranges of source code with pertinent information, such as the types of expressions: @@ -5274,9 +5274,9 @@ as the types of expressions: This option suppresses the printing of these labels (in the example above, the vertical bars and the ``char *'' and ``long int'' text). -@item -fno-diagnostics-show-cwe @opindex fno-diagnostics-show-cwe @opindex fdiagnostics-show-cwe +@item -fno-diagnostics-show-cwe Diagnostic messages can optionally have an associated @uref{https://cwe.mitre.org/index.html, CWE} identifier. GCC itself only provides such metadata for some of the @option{-fanalyzer} @@ -5284,29 +5284,29 @@ diagnostics. GCC plugins may also provide diagnostics with such metadata. By default, if this information is present, it will be printed with the diagnostic. This option suppresses the printing of this metadata. -@item -fno-diagnostics-show-rules @opindex fno-diagnostics-show-rules @opindex fdiagnostics-show-rules +@item -fno-diagnostics-show-rules Diagnostic messages can optionally have rules associated with them, such as from a coding standard, or a specification. GCC itself does not do this for any of its diagnostics, but plugins may do so. By default, if this information is present, it will be printed with the diagnostic. This option suppresses the printing of this metadata. -@item -fno-diagnostics-show-line-numbers @opindex fno-diagnostics-show-line-numbers @opindex fdiagnostics-show-line-numbers +@item -fno-diagnostics-show-line-numbers By default, when printing source code (via @option{-fdiagnostics-show-caret}), a left margin is printed, showing line numbers. This option suppresses this left margin. -@item -fdiagnostics-minimum-margin-width=@var{width} @opindex fdiagnostics-minimum-margin-width +@item -fdiagnostics-minimum-margin-width=@var{width} This option controls the minimum width of the left margin printed by @option{-fdiagnostics-show-line-numbers}. It defaults to 6. -@item -fdiagnostics-parseable-fixits @opindex fdiagnostics-parseable-fixits +@item -fdiagnostics-parseable-fixits Emit fix-it hints in a machine-parseable format, suitable for consumption by IDEs. For each fix-it, a line will be printed after the relevant diagnostic, starting with the string ``fix-it:''. For example: @@ -5336,8 +5336,8 @@ An empty replacement string indicates that the given range is to be removed. An empty range (e.g. ``45:3-45:3'') indicates that the string is to be inserted at the given position. -@item -fdiagnostics-generate-patch @opindex fdiagnostics-generate-patch +@item -fdiagnostics-generate-patch Print fix-it hints to stderr in unified diff format, after any diagnostics are printed. For example: @@ -5357,8 +5357,8 @@ are printed. For example: The diff may or may not be colorized, following the same rules as for diagnostics (see @option{-fdiagnostics-color}). -@item -fdiagnostics-show-template-tree @opindex fdiagnostics-show-template-tree +@item -fdiagnostics-show-template-tree In the C++ frontend, when printing diagnostics showing mismatching template types, such as: @@ -5382,9 +5382,9 @@ such as: The parts that differ are highlighted with color (``double'' and ``float'' in this case). -@item -fno-elide-type @opindex fno-elide-type @opindex felide-type +@item -fno-elide-type By default when the C++ frontend prints diagnostics showing mismatching template types, common parts of the types are printed as ``[...]'' to simplify the error message. For example: @@ -5398,8 +5398,8 @@ Specifying the @option{-fno-elide-type} flag suppresses that behavior. This flag also affects the output of the @option{-fdiagnostics-show-template-tree} flag. -@item -fdiagnostics-path-format=@var{KIND} @opindex fdiagnostics-path-format +@item -fdiagnostics-path-format=@var{KIND} Specify how to print paths of control-flow events for diagnostics that have such a path associated with them. @@ -5495,8 +5495,8 @@ For example: (etc) @end smallexample -@item -fdiagnostics-show-path-depths @opindex fdiagnostics-show-path-depths +@item -fdiagnostics-show-path-depths This option provides additional information when printing control-flow paths associated with a diagnostic. @@ -5509,15 +5509,15 @@ each event. This is intended for use by GCC developers and plugin developers when debugging diagnostics that report interprocedural control flow. -@item -fno-show-column @opindex fno-show-column @opindex fshow-column +@item -fno-show-column Do not print column numbers in diagnostics. This may be necessary if diagnostics are being scanned by a program that does not understand the column numbers, such as @command{dejagnu}. -@item -fdiagnostics-column-unit=@var{UNIT} @opindex fdiagnostics-column-unit +@item -fdiagnostics-column-unit=@var{UNIT} Select the units for the column number. This affects traditional diagnostics (in the absence of @option{-fno-show-column}), as well as JSON format diagnostics if requested. @@ -5534,15 +5534,15 @@ its UTF-8 encoding requires four bytes. Setting @var{UNIT} to @samp{byte} changes the column number to the raw byte count in all cases, as was traditionally output by GCC prior to version 11.1.0. -@item -fdiagnostics-column-origin=@var{ORIGIN} @opindex fdiagnostics-column-origin +@item -fdiagnostics-column-origin=@var{ORIGIN} Select the origin for column numbers, i.e. the column number assigned to the first column. The default value of 1 corresponds to traditional GCC behavior and to the GNU style guide. Some utilities may perform better with an origin of 0; any non-negative value may be specified. -@item -fdiagnostics-escape-format=@var{FORMAT} @opindex fdiagnostics-escape-format +@item -fdiagnostics-escape-format=@var{FORMAT} When GCC prints pertinent source lines for a diagnostic it normally attempts to print the source bytes directly. However, some diagnostics relate to encoding issues in the source file, such as malformed UTF-8, or issues with Unicode @@ -5573,8 +5573,8 @@ Unicode characters. For the example above, the following will be printed: before<CF><80><BF>after @end smallexample -@item -fdiagnostics-format=@var{FORMAT} @opindex fdiagnostics-format +@item -fdiagnostics-format=@var{FORMAT} Select a different format for printing diagnostics. @var{FORMAT} is @samp{text}, @samp{sarif-stderr}, @samp{sarif-file}, @samp{json}, @samp{json-stderr}, or @samp{json-file}. @@ -5873,12 +5873,12 @@ warnings but control the kinds of diagnostics produced by GCC@. @table @gcctabopt @cindex syntax checking -@item -fsyntax-only @opindex fsyntax-only +@item -fsyntax-only Check the code for syntax errors, but don't do anything beyond that. -@item -fmax-errors=@var{n} @opindex fmax-errors +@item -fmax-errors=@var{n} Limits the maximum number of error messages to @var{n}, at which point GCC bails out rather than attempting to continue processing the source code. If @var{n} is 0 (the default), there is no limit on the number @@ -5886,18 +5886,18 @@ of error messages produced. If @option{-Wfatal-errors} is also specified, then @option{-Wfatal-errors} takes precedence over this option. -@item -w @opindex w +@item -w Inhibit all warning messages. -@item -Werror @opindex Werror @opindex Wno-error +@item -Werror Make all warnings into errors. -@item -Werror= @opindex Werror= @opindex Wno-error= +@item -Werror= Make the specified warning into an error. The specifier for a warning is appended; for example @option{-Werror=switch} turns the warnings controlled by @option{-Wswitch} into errors. This switch takes a @@ -5916,9 +5916,9 @@ Note that specifying @option{-Werror=}@var{foo} automatically implies @option{-W}@var{foo}. However, @option{-Wno-error=}@var{foo} does not imply anything. -@item -Wfatal-errors @opindex Wfatal-errors @opindex Wno-fatal-errors +@item -Wfatal-errors This option causes the compiler to abort compilation on the first error occurred rather than trying to keep going and printing further error messages. @@ -5962,11 +5962,11 @@ in general improves the efficacy of control and data flow sensitive warnings, in some cases it may also cause false positives. @table @gcctabopt -@item -Wpedantic -@itemx -pedantic @opindex pedantic @opindex Wpedantic @opindex Wno-pedantic +@item -Wpedantic +@itemx -pedantic Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++. For ISO C, follows the @@ -6008,8 +6008,8 @@ C dialect, since by definition the GNU dialects of C include all features the compiler supports with the given option, and there would be nothing to warn about.) -@item -pedantic-errors @opindex pedantic-errors +@item -pedantic-errors Give an error whenever the @dfn{base standard} (see @option{-Wpedantic}) requires a diagnostic, in some cases where there is undefined behavior at compile-time and in some other cases that do not prevent compilation @@ -6017,9 +6017,9 @@ of programs that are valid according to the standard. This is not equivalent to @option{-Werror=pedantic}, since there are errors enabled by this option and not enabled by the latter and vice versa. -@item -Wall @opindex Wall @opindex Wno-all +@item -Wall This enables all the warnings about constructions that some users consider questionable, and that are easy to avoid (or modify to prevent the warning), even in conjunction with macros. This also @@ -6102,10 +6102,10 @@ some cases, and there is no simple way to modify the code to suppress the warning. Some of them are enabled by @option{-Wextra} but many of them must be enabled individually. -@item -Wextra @opindex W @opindex Wextra @opindex Wno-extra +@item -Wextra This enables some extra warning flags that are not enabled by @option{-Wall}. (This option used to be called @option{-W}. The older name is still supported, but the newer name is more descriptive.) @@ -6160,9 +6160,9 @@ of a derived class. @end itemize -@item -Wabi @r{(C, Objective-C, C++ and Objective-C++ only)} @opindex Wabi @opindex Wno-abi +@item -Wabi @r{(C, Objective-C, C++ and Objective-C++ only)} Warn about code affected by ABI changes. This includes code that may not be compatible with the vendor-neutral C++ ABI as well as the psABI @@ -6308,17 +6308,17 @@ error case can be reduced to a warning with Both diagnostics are also suppressed by @option{-fms-extensions}. -@item -Wchar-subscripts @opindex Wchar-subscripts @opindex Wno-char-subscripts +@item -Wchar-subscripts Warn if an array subscript has type @code{char}. This is a common cause of error, as programmers often forget that this type is signed on some machines. This warning is enabled by @option{-Wall}. -@item -Wno-coverage-mismatch @opindex Wno-coverage-mismatch @opindex Wcoverage-mismatch +@item -Wno-coverage-mismatch Warn if feedback profiles do not match when using the @option{-fprofile-use} option. If a source file is changed between compiling with @option{-fprofile-generate} @@ -6332,9 +6332,9 @@ poorly optimized code and is useful only in the case of very minor changes such as bug fixes to an existing code-base. Completely disabling the warning is not recommended. -@item -Wno-coverage-invalid-line-number @opindex Wno-coverage-invalid-line-number @opindex Wcoverage-invalid-line-number +@item -Wno-coverage-invalid-line-number Warn in case a function ends earlier than it begins due to an invalid linenum macros. The warning is emitted only with @option{--coverage} enabled. @@ -6344,14 +6344,14 @@ error. @option{-Wno-coverage-invalid-line-number} can be used to disable the warning or @option{-Wno-error=coverage-invalid-line-number} can be used to disable the error. -@item -Wno-cpp @r{(C, Objective-C, C++, Objective-C++ and Fortran only)} @opindex Wno-cpp @opindex Wcpp +@item -Wno-cpp @r{(C, Objective-C, C++, Objective-C++ and Fortran only)} Suppress warning messages emitted by @code{#warning} directives. -@item -Wdouble-promotion @r{(C, C++, Objective-C and Objective-C++ only)} @opindex Wdouble-promotion @opindex Wno-double-promotion +@item -Wdouble-promotion @r{(C, C++, Objective-C and Objective-C++ only)} Give a warning when a value of type @code{float} is implicitly promoted to @code{double}. CPUs with a 32-bit ``single-precision'' floating-point unit implement @code{float} in hardware, but emulate @@ -6373,20 +6373,20 @@ float area(float radius) the compiler performs the entire computation with @code{double} because the floating-point literal is a @code{double}. -@item -Wduplicate-decl-specifier @r{(C and Objective-C only)} @opindex Wduplicate-decl-specifier @opindex Wno-duplicate-decl-specifier +@item -Wduplicate-decl-specifier @r{(C and Objective-C only)} Warn if a declaration has duplicate @code{const}, @code{volatile}, @code{restrict} or @code{_Atomic} specifier. This warning is enabled by @option{-Wall}. -@item -Wformat -@itemx -Wformat=@var{n} @opindex Wformat @opindex Wno-format @opindex ffreestanding @opindex fno-builtin @opindex Wformat= +@item -Wformat +@itemx -Wformat=@var{n} Check calls to @code{printf} and @code{scanf}, etc., to make sure that the arguments supplied have types appropriate to the format string specified, and that the conversions specified in the format string make @@ -6411,10 +6411,10 @@ since those are not in any version of the C standard). @xref{C Dialect Options,,Options Controlling C Dialect}. @table @gcctabopt -@item -Wformat=1 -@itemx -Wformat @opindex Wformat @opindex Wformat=1 +@item -Wformat=1 +@itemx -Wformat 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 @@ -6424,22 +6424,22 @@ options: @option{-Wno-format-contains-nul}, @option{-Wno-format-extra-args}, and @option{-Wno-format-zero-length}. @option{-Wformat} is enabled by @option{-Wall}. -@item -Wformat=2 @opindex Wformat=2 +@item -Wformat=2 Enable @option{-Wformat} plus additional format checks. Currently equivalent to @option{-Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k}. @end table -@item -Wno-format-contains-nul @opindex Wno-format-contains-nul @opindex Wformat-contains-nul +@item -Wno-format-contains-nul If @option{-Wformat} is specified, do not warn about format strings that contain NUL bytes. -@item -Wno-format-extra-args @opindex Wno-format-extra-args @opindex Wformat-extra-args +@item -Wno-format-extra-args If @option{-Wformat} is specified, do not warn about excess arguments to a @code{printf} or @code{scanf} format function. The C standard specifies that such arguments are ignored. @@ -6452,10 +6452,10 @@ in the case of @code{scanf} formats, this option suppresses the warning if the unused arguments are all pointers, since the Single Unix Specification says that such unused arguments are allowed. -@item -Wformat-overflow -@itemx -Wformat-overflow=@var{level} @opindex Wformat-overflow @opindex Wno-format-overflow +@item -Wformat-overflow +@itemx -Wformat-overflow=@var{level} Warn about calls to formatted input/output functions such as @code{sprintf} and @code{vsprintf} that might overflow the destination buffer. When the exact number of bytes written by a format directive cannot be determined @@ -6465,10 +6465,10 @@ will in most cases improve the accuracy of the warning, it may also result in false positives. @table @gcctabopt -@item -Wformat-overflow -@itemx -Wformat-overflow=1 @opindex Wformat-overflow @opindex Wno-format-overflow +@item -Wformat-overflow +@itemx -Wformat-overflow=1 Level @var{1} of @option{-Wformat-overflow} enabled by @option{-Wformat} employs a conservative approach that warns only about calls that most likely overflow the buffer. At this level, numeric arguments to format @@ -6531,22 +6531,22 @@ void f (int a, int b) @end smallexample @end table -@item -Wno-format-zero-length @opindex Wno-format-zero-length @opindex Wformat-zero-length +@item -Wno-format-zero-length If @option{-Wformat} is specified, do not warn about zero-length formats. The C standard specifies that zero-length formats are allowed. -@item -Wformat-nonliteral @opindex Wformat-nonliteral @opindex Wno-format-nonliteral +@item -Wformat-nonliteral If @option{-Wformat} is specified, also warn if the format string is not a string literal and so cannot be checked, unless the format function takes its format arguments as a @code{va_list}. -@item -Wformat-security @opindex Wformat-security @opindex Wno-format-security +@item -Wformat-security If @option{-Wformat} is specified, also warn about uses of format functions that represent possible security problems. At present, this warns about calls to @code{printf} and @code{scanf} functions where the @@ -6557,16 +6557,16 @@ currently a subset of what @option{-Wformat-nonliteral} warns about, but in future warnings may be added to @option{-Wformat-security} that are not included in @option{-Wformat-nonliteral}.) -@item -Wformat-signedness @opindex Wformat-signedness @opindex Wno-format-signedness +@item -Wformat-signedness If @option{-Wformat} is specified, also warn if the format string requires an unsigned argument and the argument is signed and vice versa. -@item -Wformat-truncation -@itemx -Wformat-truncation=@var{level} @opindex Wformat-truncation @opindex Wno-format-truncation +@item -Wformat-truncation +@itemx -Wformat-truncation=@var{level} Warn about calls to formatted input/output functions such as @code{snprintf} and @code{vsnprintf} that might result in output truncation. When the exact number of bytes written by a format directive cannot be determined at @@ -6577,10 +6577,10 @@ in false positives. Except as noted otherwise, the option uses the same logic @option{-Wformat-overflow}. @table @gcctabopt -@item -Wformat-truncation -@itemx -Wformat-truncation=1 @opindex Wformat-truncation @opindex Wno-format-truncation +@item -Wformat-truncation +@itemx -Wformat-truncation=1 Level @var{1} of @option{-Wformat-truncation} enabled by @option{-Wformat} employs a conservative approach that warns only about calls to bounded functions whose return value is unused and that will most likely result @@ -6592,42 +6592,42 @@ value is used and that might result in truncation given an argument of sufficient length or magnitude. @end table -@item -Wformat-y2k @opindex Wformat-y2k @opindex Wno-format-y2k +@item -Wformat-y2k If @option{-Wformat} is specified, also warn about @code{strftime} formats that may yield only a two-digit year. -@item -Wnonnull @opindex Wnonnull @opindex Wno-nonnull +@item -Wnonnull Warn about passing a null pointer for arguments marked as requiring a non-null value by the @code{nonnull} function attribute. @option{-Wnonnull} is included in @option{-Wall} and @option{-Wformat}. It can be disabled with the @option{-Wno-nonnull} option. -@item -Wnonnull-compare @opindex Wnonnull-compare @opindex Wno-nonnull-compare +@item -Wnonnull-compare Warn when comparing an argument marked with the @code{nonnull} function attribute against null inside the function. @option{-Wnonnull-compare} is included in @option{-Wall}. It can be disabled with the @option{-Wno-nonnull-compare} option. -@item -Wnull-dereference @opindex Wnull-dereference @opindex Wno-null-dereference +@item -Wnull-dereference Warn if the compiler detects paths that trigger erroneous or undefined behavior due to dereferencing a null pointer. This option is only active when @option{-fdelete-null-pointer-checks} is active, which is enabled by optimizations in most targets. The precision of the warnings depends on the optimization options used. -@item -Winfinite-recursion @opindex Winfinite-recursion @opindex Wno-infinite-recursion +@item -Winfinite-recursion Warn about infinitely recursive calls. The warning is effective at all optimization levels but requires optimization in order to detect infinite recursion in calls between two or more functions. @@ -6637,9 +6637,9 @@ Compare with @option{-Wanalyzer-infinite-recursion} which provides a similar diagnostic, but is implemented in a different way (as part of @option{-fanalyzer}). -@item -Winit-self @r{(C, C++, Objective-C and Objective-C++ only)} @opindex Winit-self @opindex Wno-init-self +@item -Winit-self @r{(C, C++, Objective-C and Objective-C++ only)} Warn about uninitialized variables that are initialized with themselves. Note this option can only be used with the @option{-Wuninitialized} option. @@ -6657,36 +6657,36 @@ int f() This warning is enabled by @option{-Wall} in C++. -@item -Wno-implicit-int @r{(C and Objective-C only)} @opindex Wimplicit-int @opindex Wno-implicit-int +@item -Wno-implicit-int @r{(C and Objective-C only)} This option controls warnings when a declaration does not specify a type. This warning is enabled by default in C99 and later dialects of C, and also by @option{-Wall}. -@item -Wno-implicit-function-declaration @r{(C and Objective-C only)} @opindex Wimplicit-function-declaration @opindex Wno-implicit-function-declaration +@item -Wno-implicit-function-declaration @r{(C and Objective-C only)} This option controls warnings when a function is used before being declared. This warning is enabled by default in C99 and later dialects of C, and also by @option{-Wall}. The warning is made into an error by @option{-pedantic-errors}. -@item -Wimplicit @r{(C and Objective-C only)} @opindex Wimplicit @opindex Wno-implicit +@item -Wimplicit @r{(C and Objective-C only)} Same as @option{-Wimplicit-int} and @option{-Wimplicit-function-declaration}. This warning is enabled by @option{-Wall}. -@item -Wimplicit-fallthrough @opindex Wimplicit-fallthrough @opindex Wno-implicit-fallthrough +@item -Wimplicit-fallthrough @option{-Wimplicit-fallthrough} is the same as @option{-Wimplicit-fallthrough=3} and @option{-Wno-implicit-fallthrough} is the same as @option{-Wimplicit-fallthrough=0}. -@item -Wimplicit-fallthrough=@var{n} @opindex Wimplicit-fallthrough= +@item -Wimplicit-fallthrough=@var{n} Warn when a switch case falls through. For example: @smallexample @@ -6823,15 +6823,15 @@ switch (cond) The @option{-Wimplicit-fallthrough=3} warning is enabled by @option{-Wextra}. -@item -Wno-if-not-aligned @r{(C, C++, Objective-C and Objective-C++ only)} @opindex Wif-not-aligned @opindex Wno-if-not-aligned +@item -Wno-if-not-aligned @r{(C, C++, Objective-C and Objective-C++ only)} Control if warnings triggered by the @code{warn_if_not_aligned} attribute should be issued. These warnings are enabled by default. -@item -Wignored-qualifiers @r{(C and C++ only)} @opindex Wignored-qualifiers @opindex Wno-ignored-qualifiers +@item -Wignored-qualifiers @r{(C and C++ only)} Warn if the return type of a function has a type qualifier such as @code{const}. For ISO C such a type qualifier has no effect, since the value returned by a function is not an lvalue. @@ -6842,27 +6842,27 @@ even without this option. This warning is also enabled by @option{-Wextra}. -@item -Wno-ignored-attributes @r{(C and C++ only)} @opindex Wignored-attributes @opindex Wno-ignored-attributes +@item -Wno-ignored-attributes @r{(C and C++ only)} This option controls warnings when an attribute is ignored. This is different from the @option{-Wattributes} option in that it warns whenever the compiler decides to drop an attribute, not that the attribute is either unknown, used in a wrong place, etc. This warning is enabled by default. -@item -Wmain @opindex Wmain @opindex Wno-main +@item -Wmain Warn if the type of @code{main} is suspicious. @code{main} should be a function with external linkage, returning int, taking either zero arguments, two, or three arguments of appropriate types. This warning is enabled by default in C++ and is enabled by either @option{-Wall} or @option{-Wpedantic}. -@item -Wmisleading-indentation @r{(C and C++ only)} @opindex Wmisleading-indentation @opindex Wno-misleading-indentation +@item -Wmisleading-indentation @r{(C and C++ only)} Warn when the indentation of the code does not reflect the block structure. Specifically, a warning is issued for @code{if}, @code{else}, @code{while}, and @code{for} clauses with a guarded statement that does not use braces, @@ -6899,9 +6899,9 @@ about the layout of the file that the directive references. This warning is enabled by @option{-Wall} in C and C++. -@item -Wmissing-attributes @opindex Wmissing-attributes @opindex Wno-missing-attributes +@item -Wmissing-attributes Warn when a declaration of a function is missing one or more attributes that a related function is declared with and whose absence may adversely affect the correctness or efficiency of generated code. For example, @@ -6947,9 +6947,9 @@ void* __attribute__ ((malloc)) // missing alloc_size allocate<void> (size_t); @end smallexample -@item -Wmissing-braces @opindex Wmissing-braces @opindex Wno-missing-braces +@item -Wmissing-braces Warn if an aggregate or union initializer is not fully bracketed. In the following example, the initializer for @code{a} is not fully bracketed, but that for @code{b} is fully bracketed. @@ -6961,16 +6961,16 @@ int b[2][2] = @{ @{ 0, 1 @}, @{ 2, 3 @} @}; This warning is enabled by @option{-Wall}. -@item -Wmissing-include-dirs @r{(C, C++, Objective-C, Objective-C++ and Fortran only)} @opindex Wmissing-include-dirs @opindex Wno-missing-include-dirs +@item -Wmissing-include-dirs @r{(C, C++, Objective-C, Objective-C++ and Fortran only)} Warn if a user-supplied include directory does not exist. This opions is disabled by default for C, C++, Objective-C and Objective-C++. For Fortran, it is partially enabled by default by warning for -I and -J, only. -@item -Wno-missing-profile @opindex Wmissing-profile @opindex Wno-missing-profile +@item -Wno-missing-profile This option controls warnings if feedback profiles are missing when using the @option{-fprofile-use} option. This option diagnoses those cases where a new function or a new file is added @@ -6987,9 +6987,9 @@ Ignoring the warning can result in poorly optimized code. disable the warning, but this is not recommended and should be done only when non-existent profile data is justified. -@item -Wmismatched-dealloc @opindex Wmismatched-dealloc @opindex Wno-mismatched-dealloc +@item -Wmismatched-dealloc Warn for calls to deallocation functions with pointer arguments returned from from allocations functions for which the former isn't a suitable @@ -7022,9 +7022,9 @@ mismatches involving either @code{operator new} or @code{operator delete}. Option @option{-Wmismatched-dealloc} is included in @option{-Wall}. -@item -Wmultistatement-macros @opindex Wmultistatement-macros @opindex Wno-multistatement-macros +@item -Wmultistatement-macros Warn about unsafe multiple statement macros that appear to be guarded by a clause such as @code{if}, @code{else}, @code{for}, @code{switch}, or @code{while}, in which only the first statement is actually guarded after @@ -7048,9 +7048,9 @@ if (c) This warning is enabled by @option{-Wall} in C and C++. -@item -Wparentheses @opindex Wparentheses @opindex Wno-parentheses +@item -Wparentheses Warn if parentheses are omitted in certain contexts, such as when there is an assignment in a context where a truth value is expected, or when operators are nested whose precedence people @@ -7079,9 +7079,9 @@ of a declaration: This warning is enabled by @option{-Wall}. -@item -Wno-self-move @r{(C++ and Objective-C++ only)} @opindex Wself-move @opindex Wno-self-move +@item -Wno-self-move @r{(C++ and Objective-C++ only)} This warning warns when a value is moved to itself with @code{std::move}. Such a @code{std::move} typically has no effect. @@ -7099,9 +7099,9 @@ void fn() This warning is enabled by @option{-Wall}. -@item -Wsequence-point @opindex Wsequence-point @opindex Wno-sequence-point +@item -Wsequence-point Warn about code that may have undefined semantics because of violations of sequence point rules in the C and C++ standards. @@ -7152,15 +7152,15 @@ definitions, may be found on the GCC readings page, at This warning is enabled by @option{-Wall} for C and C++. -@item -Wno-return-local-addr @opindex Wno-return-local-addr @opindex Wreturn-local-addr +@item -Wno-return-local-addr Do not warn about returning a pointer (or in C++, a reference) to a variable that goes out of scope after the function returns. -@item -Wreturn-type @opindex Wreturn-type @opindex Wno-return-type +@item -Wreturn-type Warn whenever a function is defined with a return type that defaults to @code{int}. Also warn about any @code{return} statement with no return value in a function whose return type is not @code{void} @@ -7181,28 +7181,28 @@ the function is not used. This warning is enabled by default in C++ and by @option{-Wall} otherwise. -@item -Wno-shift-count-negative @opindex Wshift-count-negative @opindex Wno-shift-count-negative +@item -Wno-shift-count-negative Controls warnings if a shift count is negative. This warning is enabled by default. -@item -Wno-shift-count-overflow @opindex Wshift-count-overflow @opindex Wno-shift-count-overflow +@item -Wno-shift-count-overflow Controls warnings if a shift count is greater than or equal to the bit width of the type. This warning is enabled by default. -@item -Wshift-negative-value @opindex Wshift-negative-value @opindex Wno-shift-negative-value +@item -Wshift-negative-value Warn if left shifting a negative value. This warning is enabled by @option{-Wextra} in C99 (and newer) and C++11 to C++17 modes. -@item -Wno-shift-overflow -@itemx -Wshift-overflow=@var{n} @opindex Wshift-overflow @opindex Wno-shift-overflow +@item -Wno-shift-overflow +@itemx -Wshift-overflow=@var{n} These options control warnings about left shift overflows. @table @gcctabopt @@ -7219,9 +7219,9 @@ This warning level also warns about left-shifting 1 into the sign bit, unless C++14 mode (or newer) is active. @end table -@item -Wswitch @opindex Wswitch @opindex Wno-switch +@item -Wswitch Warn whenever a @code{switch} statement has an index of enumerated type and lacks a @code{case} for one or more of the named codes of that enumeration. (The presence of a @code{default} label prevents this @@ -7230,15 +7230,15 @@ provoke warnings when this option is used (even if there is a @code{default} label). This warning is enabled by @option{-Wall}. -@item -Wswitch-default @opindex Wswitch-default @opindex Wno-switch-default +@item -Wswitch-default Warn whenever a @code{switch} statement does not have a @code{default} case. -@item -Wswitch-enum @opindex Wswitch-enum @opindex Wno-switch-enum +@item -Wswitch-enum Warn whenever a @code{switch} statement has an index of enumerated type and lacks a @code{case} for one or more of the named codes of that enumeration. @code{case} labels outside the enumeration range also @@ -7247,9 +7247,9 @@ between @option{-Wswitch} and this option is that this option gives a warning about an omitted enumeration code even if there is a @code{default} label. -@item -Wno-switch-bool @opindex Wswitch-bool @opindex Wno-switch-bool +@item -Wno-switch-bool Do not warn when a @code{switch} statement has an index of boolean type and the case values are outside the range of a boolean type. It is possible to suppress this warning by casting the controlling @@ -7264,17 +7264,17 @@ switch ((int) (a == 4)) @end smallexample This warning is enabled by default for C and C++ programs. -@item -Wno-switch-outside-range @opindex Wswitch-outside-range @opindex Wno-switch-outside-range +@item -Wno-switch-outside-range This option controls warnings when a @code{switch} case has a value that is outside of its respective type range. This warning is enabled by default for C and C++ programs. -@item -Wno-switch-unreachable @opindex Wswitch-unreachable @opindex Wno-switch-unreachable +@item -Wno-switch-unreachable Do not warn when a @code{switch} statement contains statements between the controlling expression and the first case label, which will never be executed. For example: @@ -7305,23 +7305,23 @@ switch (cond) @end smallexample This warning is enabled by default for C and C++ programs. -@item -Wsync-nand @r{(C and C++ only)} @opindex Wsync-nand @opindex Wno-sync-nand +@item -Wsync-nand @r{(C and C++ only)} Warn when @code{__sync_fetch_and_nand} and @code{__sync_nand_and_fetch} built-in functions are used. These functions changed semantics in GCC 4.4. -@item -Wtrivial-auto-var-init @opindex Wtrivial-auto-var-init @opindex Wno-trivial-auto-var-init +@item -Wtrivial-auto-var-init Warn when @code{-ftrivial-auto-var-init} cannot initialize the automatic variable. A common situation is an automatic variable that is declared between the controlling expression and the first case label of a @code{switch} statement. -@item -Wunused-but-set-parameter @opindex Wunused-but-set-parameter @opindex Wno-unused-but-set-parameter +@item -Wunused-but-set-parameter Warn whenever a function parameter is assigned to, but otherwise unused (aside from its declaration). @@ -7331,9 +7331,9 @@ To suppress this warning use the @code{unused} attribute This warning is also enabled by @option{-Wunused} together with @option{-Wextra}. -@item -Wunused-but-set-variable @opindex Wunused-but-set-variable @opindex Wno-unused-but-set-variable +@item -Wunused-but-set-variable Warn whenever a local variable is assigned to, but otherwise unused (aside from its declaration). This warning is enabled by @option{-Wall}. @@ -7344,46 +7344,46 @@ To suppress this warning use the @code{unused} attribute This warning is also enabled by @option{-Wunused}, which is enabled by @option{-Wall}. -@item -Wunused-function @opindex Wunused-function @opindex Wno-unused-function +@item -Wunused-function Warn whenever a static function is declared but not defined or a non-inline static function is unused. This warning is enabled by @option{-Wall}. -@item -Wunused-label @opindex Wunused-label @opindex Wno-unused-label +@item -Wunused-label Warn whenever a label is declared but not used. This warning is enabled by @option{-Wall}. To suppress this warning use the @code{unused} attribute (@pxref{Variable Attributes}). -@item -Wunused-local-typedefs @r{(C, Objective-C, C++ and Objective-C++ only)} @opindex Wunused-local-typedefs @opindex Wno-unused-local-typedefs +@item -Wunused-local-typedefs @r{(C, Objective-C, C++ and Objective-C++ only)} Warn when a typedef locally defined in a function is not used. This warning is enabled by @option{-Wall}. -@item -Wunused-parameter @opindex Wunused-parameter @opindex Wno-unused-parameter +@item -Wunused-parameter Warn whenever a function parameter is unused aside from its declaration. To suppress this warning use the @code{unused} attribute (@pxref{Variable Attributes}). -@item -Wno-unused-result @opindex Wunused-result @opindex Wno-unused-result +@item -Wno-unused-result Do not warn if a caller of a function marked with attribute @code{warn_unused_result} (@pxref{Function Attributes}) does not use its return value. The default is @option{-Wunused-result}. -@item -Wunused-variable @opindex Wunused-variable @opindex Wno-unused-variable +@item -Wunused-variable Warn whenever a local or static variable is unused aside from its declaration. This option implies @option{-Wunused-const-variable=1} for C, but not for C++. This warning is enabled by @option{-Wall}. @@ -7391,10 +7391,10 @@ but not for C++. This warning is enabled by @option{-Wall}. To suppress this warning use the @code{unused} attribute (@pxref{Variable Attributes}). -@item -Wunused-const-variable -@itemx -Wunused-const-variable=@var{n} @opindex Wunused-const-variable @opindex Wno-unused-const-variable +@item -Wunused-const-variable +@itemx -Wunused-const-variable=@var{n} Warn whenever a constant static variable is unused aside from its declaration. @option{-Wunused-const-variable=1} is enabled by @option{-Wunused-variable} for C, but not for C++. In C this declares variable storage, but in C++ this @@ -7418,9 +7418,9 @@ in C++ this isn't an error and in C it might be harder to clean up all headers included. @end table -@item -Wunused-value @opindex Wunused-value @opindex Wno-unused-value +@item -Wunused-value Warn whenever a statement computes a result that is explicitly not used. To suppress this warning cast the unused expression to @code{void}. This includes an expression-statement or the left-hand @@ -7430,18 +7430,18 @@ an expression such as @code{x[i,j]} causes a warning, while This warning is enabled by @option{-Wall}. -@item -Wunused @opindex Wunused @opindex Wno-unused +@item -Wunused All the above @option{-Wunused} options combined. In order to get a warning about an unused function parameter, you must either specify @option{-Wextra -Wunused} (note that @option{-Wall} implies @option{-Wunused}), or separately specify @option{-Wunused-parameter}. -@item -Wuninitialized @opindex Wuninitialized @opindex Wno-uninitialized +@item -Wuninitialized Warn if an object with automatic or allocated storage duration is used without having been initialized. In C++, also warn if a non-static reference or non-static @code{const} member appears in a class without @@ -7480,9 +7480,9 @@ struct A @{ @}; @end smallexample -@item -Wno-invalid-memory-model @opindex Winvalid-memory-model @opindex Wno-invalid-memory-model +@item -Wno-invalid-memory-model This option controls warnings for invocations of @ref{__atomic Builtins}, @ref{__sync Builtins}, and the C11 atomic generic functions with a memory consistency argument @@ -7501,9 +7501,9 @@ void store (int *i) @option{-Winvalid-memory-model} is enabled by default. -@item -Wmaybe-uninitialized @opindex Wmaybe-uninitialized @opindex Wno-maybe-uninitialized +@item -Wmaybe-uninitialized For an object with automatic or allocated storage duration, if there exists a path from the function entry to a use of the object that is initialized, but there exist some other paths for which the object is not initialized, @@ -7562,9 +7562,9 @@ Attributes}. This warning is enabled by @option{-Wall} or @option{-Wextra}. -@item -Wunknown-pragmas @opindex Wunknown-pragmas @opindex Wno-unknown-pragmas +@item -Wunknown-pragmas @cindex warning for unknown pragmas @cindex unknown pragmas, warning @cindex pragmas, warning of unknown @@ -7573,16 +7573,16 @@ GCC@. If this command-line option is used, warnings are even issued for unknown pragmas in system header files. This is not the case if the warnings are only enabled by the @option{-Wall} command-line option. -@item -Wno-pragmas @opindex Wno-pragmas @opindex Wpragmas +@item -Wno-pragmas Do not warn about misuses of pragmas, such as incorrect parameters, invalid syntax, or conflicts between pragmas. See also @option{-Wunknown-pragmas}. -@item -Wno-prio-ctor-dtor @opindex Wno-prio-ctor-dtor @opindex Wprio-ctor-dtor +@item -Wno-prio-ctor-dtor Do not warn if a priority from 0 to 100 is used for constructor or destructor. The use of constructor and destructor attributes allow you to assign a priority to the constructor/destructor to control its order of execution @@ -7590,9 +7590,9 @@ before @code{main} is called or after it returns. The priority values must be greater than 100 as the compiler reserves priority values between 0--100 for the implementation. -@item -Wstrict-aliasing @opindex Wstrict-aliasing @opindex Wno-strict-aliasing +@item -Wstrict-aliasing This option is only active when @option{-fstrict-aliasing} is active. It warns about code that might break the strict aliasing rules that the compiler is using for optimization. The warning does not catch all @@ -7600,8 +7600,8 @@ cases, but does attempt to catch the more common pitfalls. It is included in @option{-Wall}. It is equivalent to @option{-Wstrict-aliasing=3} -@item -Wstrict-aliasing=n @opindex Wstrict-aliasing=n +@item -Wstrict-aliasing=n This option is only active when @option{-fstrict-aliasing} is active. It warns about code that might break the strict aliasing rules that the compiler is using for optimization. @@ -7633,10 +7633,10 @@ with multiple statement cases using flow-sensitive points-to information. Only warns when the converted pointer is dereferenced. Does not warn about incomplete types. -@item -Wstrict-overflow -@itemx -Wstrict-overflow=@var{n} @opindex Wstrict-overflow @opindex Wno-strict-overflow +@item -Wstrict-overflow +@itemx -Wstrict-overflow=@var{n} This option is only active when signed overflow is undefined. It warns about cases where the compiler optimizes based on the assumption that signed overflow does not occur. Note that it does not @@ -7687,9 +7687,9 @@ comparisons, so this warning level gives a very large number of false positives. @end table -@item -Wstring-compare @opindex Wstring-compare @opindex Wno-string-compare +@item -Wstring-compare Warn for calls to @code{strcmp} and @code{strncmp} whose result is determined to be either zero or non-zero in tests for such equality owing to the length of one argument being greater than the size of @@ -7711,11 +7711,11 @@ void f (char *d) @option{-Wstring-compare} is enabled by @option{-Wextra}. +@opindex Wstringop-overflow +@opindex Wno-stringop-overflow @item -Wno-stringop-overflow @item -Wstringop-overflow @itemx -Wstringop-overflow=@var{type} -@opindex Wstringop-overflow -@opindex Wno-stringop-overflow Warn for calls to string manipulation functions such as @code{memcpy} and @code{strcpy} that are determined to overflow the destination buffer. The optional argument is one greater than the type of Object Size Checking to @@ -7754,10 +7754,10 @@ const char* f (enum Color clr) Option @option{-Wstringop-overflow=2} is enabled by default. @table @gcctabopt -@item -Wstringop-overflow -@itemx -Wstringop-overflow=1 @opindex Wstringop-overflow @opindex Wno-stringop-overflow +@item -Wstringop-overflow +@itemx -Wstringop-overflow=1 The @option{-Wstringop-overflow=1} option uses type-zero Object Size Checking to determine the sizes of destination objects. At this setting the option does not warn for writes past the end of subobjects of larger objects accessed @@ -7792,18 +7792,18 @@ whether to issue a warning. Similarly to @option{-Wstringop-overflow=3} this setting of the option may result in warnings for benign code. @end table -@item -Wno-stringop-overread @opindex Wstringop-overread @opindex Wno-stringop-overread +@item -Wno-stringop-overread Warn for calls to string manipulation functions such as @code{memchr}, or @code{strcpy} that are determined to read past the end of the source sequence. Option @option{-Wstringop-overread} is enabled by default. -@item -Wno-stringop-truncation @opindex Wstringop-truncation @opindex Wno-stringop-truncation +@item -Wno-stringop-truncation Do not warn for calls to bounded string manipulation functions such as @code{strncat}, @code{strncpy}, and @code{stpncpy} that may either truncate the copied string @@ -7859,9 +7859,9 @@ however, are not suitable arguments to functions that expect such arrays GCC issues warnings unless it can prove that the use is safe. @xref{Common Variable Attributes}. -@item -Wstrict-flex-arrays @opindex Wstrict-flex-arrays @opindex Wno-strict-flex-arrays +@item -Wstrict-flex-arrays Warn about inproper usages of flexible array members according to the @var{level} of the @code{strict_flex_array (@var{level})} attribute attached to the trailing array field of a structure if it's @@ -7884,18 +7884,13 @@ issued for a trailing zero-length array reference of a structure if the array is referenced as a flexible array member. -@item -Wsuggest-attribute=@r{[}pure@r{|}const@r{|}noreturn@r{|}format@r{|}cold@r{|}malloc@r{]} @opindex Wsuggest-attribute= @opindex Wno-suggest-attribute= +@item -Wsuggest-attribute=@r{[}pure@r{|}const@r{|}noreturn@r{|}format@r{|}cold@r{|}malloc@r{]} Warn for cases where adding an attribute may be beneficial. The attributes currently supported are listed below. @table @gcctabopt -@item -Wsuggest-attribute=pure -@itemx -Wsuggest-attribute=const -@itemx -Wsuggest-attribute=noreturn -@itemx -Wmissing-noreturn -@itemx -Wsuggest-attribute=malloc @opindex Wsuggest-attribute=pure @opindex Wno-suggest-attribute=pure @opindex Wsuggest-attribute=const @@ -7906,6 +7901,11 @@ attributes currently supported are listed below. @opindex Wno-missing-noreturn @opindex Wsuggest-attribute=malloc @opindex Wno-suggest-attribute=malloc +@item -Wsuggest-attribute=pure +@itemx -Wsuggest-attribute=const +@itemx -Wsuggest-attribute=noreturn +@itemx -Wmissing-noreturn +@itemx -Wsuggest-attribute=malloc Warn about functions that might be candidates for attributes @code{pure}, @code{const} or @code{noreturn} or @code{malloc}. The compiler @@ -7917,14 +7917,14 @@ requires option @option{-fipa-pure-const}, which is enabled by default at @option{-O} and higher. Higher optimization levels improve the accuracy of the analysis. -@item -Wsuggest-attribute=format -@itemx -Wmissing-format-attribute @opindex Wsuggest-attribute=format @opindex Wmissing-format-attribute @opindex Wno-suggest-attribute=format @opindex Wno-missing-format-attribute @opindex Wformat @opindex Wno-format +@item -Wsuggest-attribute=format +@itemx -Wmissing-format-attribute Warn about function pointers that might be candidates for @code{format} attributes. Note these are only possible candidates, not absolute ones. @@ -7944,9 +7944,9 @@ might be appropriate for any function that calls a function like case, and some functions for which @code{format} attributes are appropriate may not be detected. -@item -Wsuggest-attribute=cold @opindex Wsuggest-attribute=cold @opindex Wno-suggest-attribute=cold +@item -Wsuggest-attribute=cold Warn about functions that might be candidates for @code{cold} attribute. This is based on static detection and generally only warns about functions which @@ -7954,9 +7954,9 @@ always leads to a call to another @code{cold} function such as wrappers of C++ @code{throw} or fatal error reporting functions leading to @code{abort}. @end table -@item -Walloc-zero @opindex Wno-alloc-zero @opindex Walloc-zero +@item -Walloc-zero Warn about calls to allocation functions decorated with attribute @code{alloc_size} that specify zero bytes, including those to the built-in forms of the functions @code{aligned_alloc}, @code{alloca}, @code{calloc}, @@ -7965,9 +7965,9 @@ when called with a zero size differs among implementations (and in the case of @code{realloc} has been deprecated) relying on it may result in subtle portability bugs and should be avoided. -@item -Walloc-size-larger-than=@var{byte-size} @opindex Walloc-size-larger-than= @opindex Wno-alloc-size-larger-than +@item -Walloc-size-larger-than=@var{byte-size} Warn about calls to functions decorated with attribute @code{alloc_size} that attempt to allocate objects larger than the specified number of bytes, or where the result of the size computation in an integer type with infinite @@ -7978,20 +7978,20 @@ Warnings controlled by the option can be disabled either by specifying @option{-Wno-alloc-size-larger-than}. @xref{Function Attributes}. -@item -Wno-alloc-size-larger-than @opindex Wno-alloc-size-larger-than +@item -Wno-alloc-size-larger-than Disable @option{-Walloc-size-larger-than=} warnings. The option is equivalent to @option{-Walloc-size-larger-than=}@samp{SIZE_MAX} or larger. -@item -Walloca @opindex Wno-alloca @opindex Walloca +@item -Walloca This option warns on all uses of @code{alloca} in the source. -@item -Walloca-larger-than=@var{byte-size} @opindex Walloca-larger-than= @opindex Wno-alloca-larger-than +@item -Walloca-larger-than=@var{byte-size} This option warns on calls to @code{alloca} with an integer argument whose value is either zero, or that is not bounded by a controlling predicate that limits its value to at most @var{byte-size}. It also warns for calls @@ -8057,14 +8057,14 @@ for @option{-O2} and above). See also @option{-Wvla-larger-than=}@samp{byte-size}. -@item -Wno-alloca-larger-than @opindex Wno-alloca-larger-than +@item -Wno-alloca-larger-than Disable @option{-Walloca-larger-than=} warnings. The option is equivalent to @option{-Walloca-larger-than=}@samp{SIZE_MAX} or larger. -@item -Warith-conversion @opindex Warith-conversion @opindex Wno-arith-conversion +@item -Warith-conversion Do warn about implicit conversions from arithmetic operations even when conversion of the operands to the same type cannot change their values. This affects warnings from @option{-Wconversion}, @@ -8080,10 +8080,10 @@ void f (char c, int i) @end group @end smallexample -@item -Warray-bounds -@itemx -Warray-bounds=@var{n} @opindex Wno-array-bounds @opindex Warray-bounds +@item -Warray-bounds +@itemx -Warray-bounds=@var{n} Warn about out of bounds subscripts or offsets into arrays. This warning is enabled by @option{-Wall}. It is more effective when @option{-ftree-vrp} is active (the default for @option{-O2} and above) but a subset of instances @@ -8119,9 +8119,9 @@ arithmetic that may yield out of bounds values. This warning level may give a larger number of false positives and is deactivated by default. @end table -@item -Warray-compare @opindex Warray-compare @opindex Wno-array-compare +@item -Warray-compare Warn about equality and relational comparisons between two operands of array type. This comparison was deprecated in C++20. For example: @@ -8133,9 +8133,9 @@ bool same = arr1 == arr2; @option{-Warray-compare} is enabled by @option{-Wall}. +@opindex Wno-array-parameter @item -Warray-parameter @itemx -Warray-parameter=@var{n} -@opindex Wno-array-parameter Warn about redeclarations of functions involving arguments of array or pointer types of inconsistent kinds or forms, and enable the detection of out-of-bounds accesses to such parameters by warnings such as @@ -8181,10 +8181,10 @@ void g (int[8]); // warning (inconsistent array bound) @option{-Wvla-parameter} option triggers warnings for similar inconsistencies involving Variable Length Array arguments. -@item -Wattribute-alias=@var{n} -@itemx -Wno-attribute-alias @opindex Wattribute-alias @opindex Wno-attribute-alias +@item -Wattribute-alias=@var{n} +@itemx -Wno-attribute-alias Warn about declarations using the @code{alias} and similar attributes whose target is incompatible with the type of the alias. @xref{Function Attributes,,Declaring Attributes of Functions}. @@ -8216,10 +8216,10 @@ Attributes considered include @code{alloc_align}, @code{alloc_size}, This is the default. You can disable these warnings with either @option{-Wno-attribute-alias} or @option{-Wattribute-alias=0}. -@item -Wbidi-chars=@r{[}none@r{|}unpaired@r{|}any@r{|}ucn@r{]} @opindex Wbidi-chars= @opindex Wbidi-chars @opindex Wno-bidi-chars +@item -Wbidi-chars=@r{[}none@r{|}unpaired@r{|}any@r{|}ucn@r{]} Warn about possibly misleading UTF-8 bidirectional control characters in comments, string literals, character constants, and identifiers. Such characters can change left-to-right writing direction into right-to-left @@ -8239,9 +8239,9 @@ to turn on such checking by using @option{-Wbidi-chars=unpaired,ucn} or and is equivalent to @option{-Wbidi-chars=unpaired,ucn}, if no previous @option{-Wbidi-chars=any} was specified. -@item -Wbool-compare @opindex Wno-bool-compare @opindex Wbool-compare +@item -Wbool-compare Warn about boolean expression compared with an integer value different from @code{true}/@code{false}. For instance, the following comparison is always false: @@ -8252,9 +8252,9 @@ if ((n > 1) == 2) @{ @dots{} @} @end smallexample This warning is enabled by @option{-Wall}. -@item -Wbool-operation @opindex Wno-bool-operation @opindex Wbool-operation +@item -Wbool-operation Warn about suspicious operations on expressions of a boolean type. For instance, bitwise negation of a boolean is very likely a bug in the program. For C, this warning also warns about incrementing or decrementing a boolean, @@ -8263,9 +8263,9 @@ Incrementing a boolean is invalid in C++17, and deprecated otherwise.) This warning is enabled by @option{-Wall}. -@item -Wduplicated-branches @opindex Wno-duplicated-branches @opindex Wduplicated-branches +@item -Wduplicated-branches Warn when an if-else has identical branches. This warning detects cases like @smallexample if (p != NULL) @@ -8279,9 +8279,9 @@ also warn for conditional operators: int i = x ? *p : *p; @end smallexample -@item -Wduplicated-cond @opindex Wno-duplicated-cond @opindex Wduplicated-cond +@item -Wduplicated-cond Warn about duplicated conditions in an if-else-if chain. For instance, warn for the following code: @smallexample @@ -8289,49 +8289,49 @@ if (p->q != NULL) @{ @dots{} @} else if (p->q != NULL) @{ @dots{} @} @end smallexample -@item -Wframe-address @opindex Wno-frame-address @opindex Wframe-address +@item -Wframe-address Warn when the @samp{__builtin_frame_address} or @samp{__builtin_return_address} is called with an argument greater than 0. Such calls may return indeterminate values or crash the program. The warning is included in @option{-Wall}. -@item -Wno-discarded-qualifiers @r{(C and Objective-C only)} @opindex Wno-discarded-qualifiers @opindex Wdiscarded-qualifiers +@item -Wno-discarded-qualifiers @r{(C and Objective-C only)} Do not warn if type qualifiers on pointers are being discarded. Typically, the compiler warns if a @code{const char *} variable is passed to a function that takes a @code{char *} parameter. This option can be used to suppress such a warning. -@item -Wno-discarded-array-qualifiers @r{(C and Objective-C only)} @opindex Wno-discarded-array-qualifiers @opindex Wdiscarded-array-qualifiers +@item -Wno-discarded-array-qualifiers @r{(C and Objective-C only)} Do not warn if type qualifiers on arrays which are pointer targets are being discarded. Typically, the compiler warns if a @code{const int (*)[]} variable is passed to a function that takes a @code{int (*)[]} parameter. This option can be used to suppress such a warning. -@item -Wno-incompatible-pointer-types @r{(C and Objective-C only)} @opindex Wno-incompatible-pointer-types @opindex Wincompatible-pointer-types +@item -Wno-incompatible-pointer-types @r{(C and Objective-C only)} Do not warn when there is a conversion between pointers that have incompatible types. This warning is for cases not covered by @option{-Wno-pointer-sign}, which warns for pointer argument passing or assignment with different signedness. -@item -Wno-int-conversion @r{(C and Objective-C only)} @opindex Wno-int-conversion @opindex Wint-conversion +@item -Wno-int-conversion @r{(C and Objective-C only)} Do not warn about incompatible integer to pointer and pointer to integer conversions. This warning is about implicit conversions; for explicit conversions the warnings @option{-Wno-int-to-pointer-cast} and @option{-Wno-pointer-to-int-cast} may be used. -@item -Wzero-length-bounds @opindex Wzero-length-bounds @opindex Wzero-length-bounds +@item -Wzero-length-bounds Warn about accesses to elements of zero-length array members that might overlap other members of the same object. Declaring interior zero-length arrays is discouraged because accesses to them are undefined. See @@ -8356,16 +8356,16 @@ void bad (void) Option @option{-Wzero-length-bounds} is enabled by @option{-Warray-bounds}. -@item -Wno-div-by-zero @opindex Wno-div-by-zero @opindex Wdiv-by-zero +@item -Wno-div-by-zero Do not warn about compile-time integer division by zero. Floating-point division by zero is not warned about, as it can be a legitimate way of obtaining infinities and NaNs. -@item -Wsystem-headers @opindex Wsystem-headers @opindex Wno-system-headers +@item -Wsystem-headers @cindex warnings from system headers @cindex system headers, warnings from Print warning messages for constructs found in system header files. @@ -8377,9 +8377,9 @@ code. However, note that using @option{-Wall} in conjunction with this option does @emph{not} warn about unknown pragmas in system headers---for that, @option{-Wunknown-pragmas} must also be used. -@item -Wtautological-compare @opindex Wtautological-compare @opindex Wno-tautological-compare +@item -Wtautological-compare Warn if a self-comparison always evaluates to true or false. This warning detects various mistakes such as: @smallexample @@ -8397,9 +8397,9 @@ will always be false. This warning is enabled by @option{-Wall}. -@item -Wtrampolines @opindex Wtrampolines @opindex Wno-trampolines +@item -Wtrampolines Warn about trampolines generated for pointers to nested functions. A trampoline is a small piece of data or code that is created at run time on the stack when the address of a nested function is taken, and is @@ -8408,9 +8408,9 @@ made up of data only and thus requires no special treatment. But, for most targets, it is made up of code and thus requires the stack to be made executable in order for the program to work properly. -@item -Wfloat-equal @opindex Wfloat-equal @opindex Wno-float-equal +@item -Wfloat-equal Warn if floating-point values are used in equality comparisons. The idea behind this is that sometimes it is convenient (for the @@ -8424,9 +8424,9 @@ should check to see whether the two values have ranges that overlap; and this is done with the relational operators, so equality comparisons are probably mistaken. -@item -Wtraditional @r{(C and Objective-C only)} @opindex Wtraditional @opindex Wno-traditional +@item -Wtraditional @r{(C and Objective-C only)} Warn about certain constructs that behave differently in traditional and ISO C@. Also warn about ISO C constructs that have no traditional C equivalent, and/or problematic constructs that should be avoided. @@ -8513,25 +8513,25 @@ because that feature is already a GCC extension and thus not relevant to traditional C compatibility. @end itemize -@item -Wtraditional-conversion @r{(C and Objective-C only)} @opindex Wtraditional-conversion @opindex Wno-traditional-conversion +@item -Wtraditional-conversion @r{(C and Objective-C only)} Warn if a prototype causes a type conversion that is different from what would happen to the same argument in the absence of a prototype. This includes conversions of fixed point to floating and vice versa, and conversions changing the width or signedness of a fixed-point argument except when the same as the default promotion. -@item -Wdeclaration-after-statement @r{(C and Objective-C only)} @opindex Wdeclaration-after-statement @opindex Wno-declaration-after-statement +@item -Wdeclaration-after-statement @r{(C and Objective-C only)} Warn when a declaration is found after a statement in a block. This construct, known from C++, was introduced with ISO C99 and is by default allowed in GCC@. It is not supported by ISO C90. @xref{Mixed Labels and Declarations}. -@item -Wshadow @opindex Wshadow @opindex Wno-shadow +@item -Wshadow Warn whenever a local variable or type declaration shadows another variable, parameter, type, class member (in C++), or instance variable (in Objective-C) or whenever a built-in function is shadowed. Note @@ -8543,23 +8543,23 @@ and @option{-Wno-shadow=compatible-local} are ignored when @option{-Wshadow} is used. Same as @option{-Wshadow=global}. -@item -Wno-shadow-ivar @r{(Objective-C only)} @opindex Wno-shadow-ivar @opindex Wshadow-ivar +@item -Wno-shadow-ivar @r{(Objective-C only)} Do not warn whenever a local variable shadows an instance variable in an Objective-C method. -@item -Wshadow=global @opindex Wshadow=global +@item -Wshadow=global Warn for any shadowing. Same as @option{-Wshadow}. -@item -Wshadow=local @opindex Wshadow=local +@item -Wshadow=local Warn when a local variable shadows another local variable or parameter. -@item -Wshadow=compatible-local @opindex Wshadow=compatible-local +@item -Wshadow=compatible-local Warn when a local variable shadows another local variable or parameter whose type is compatible with that of the shadowing variable. In C++, type compatibility here means the type of the shadowing variable can be @@ -8592,9 +8592,9 @@ Note that this also means that shadowing @code{const char *i} by This warning is also enabled by @option{-Wshadow=local}. -@item -Wlarger-than=@var{byte-size} @opindex Wlarger-than= @opindex Wlarger-than-@var{byte-size} +@item -Wlarger-than=@var{byte-size} Warn whenever an object is defined whose size exceeds @var{byte-size}. @option{-Wlarger-than=}@samp{PTRDIFF_MAX} is enabled by default. Warnings controlled by the option can be disabled either by specifying @@ -8605,14 +8605,14 @@ Also warn for calls to bounded functions such as @code{memchr} or object, which is @samp{PTRDIFF_MAX} bytes by default. These warnings can only be disabled by @option{-Wno-larger-than}. -@item -Wno-larger-than @opindex Wno-larger-than +@item -Wno-larger-than Disable @option{-Wlarger-than=} warnings. The option is equivalent to @option{-Wlarger-than=}@samp{SIZE_MAX} or larger. -@item -Wframe-larger-than=@var{byte-size} @opindex Wframe-larger-than= @opindex Wno-frame-larger-than +@item -Wframe-larger-than=@var{byte-size} Warn if the size of a function frame exceeds @var{byte-size}. The computation done to determine the stack frame size is approximate and not conservative. @@ -8626,14 +8626,14 @@ Warnings controlled by the option can be disabled either by specifying @var{byte-size} of @samp{SIZE_MAX} or more or by @option{-Wno-frame-larger-than}. -@item -Wno-frame-larger-than @opindex Wno-frame-larger-than +@item -Wno-frame-larger-than Disable @option{-Wframe-larger-than=} warnings. The option is equivalent to @option{-Wframe-larger-than=}@samp{SIZE_MAX} or larger. -@item -Wfree-nonheap-object @opindex Wfree-nonheap-object @opindex Wno-free-nonheap-object +@item -Wfree-nonheap-object Warn when attempting to deallocate an object that was either not allocated on the heap, or by using a pointer that was not returned from a prior call to the corresponding allocation function. For example, because the call @@ -8652,9 +8652,9 @@ void f (char *p) @option{-Wfree-nonheap-object} is included in @option{-Wall}. -@item -Wstack-usage=@var{byte-size} @opindex Wstack-usage @opindex Wno-stack-usage +@item -Wstack-usage=@var{byte-size} Warn if the stack usage of a function might exceed @var{byte-size}. The computation done to determine the stack usage is conservative. Any space allocated via @code{alloca}, variable-length arrays, or related @@ -8689,40 +8689,40 @@ Warnings controlled by the option can be disabled either by specifying @var{byte-size} of @samp{SIZE_MAX} or more or by @option{-Wno-stack-usage}. -@item -Wno-stack-usage @opindex Wno-stack-usage +@item -Wno-stack-usage Disable @option{-Wstack-usage=} warnings. The option is equivalent to @option{-Wstack-usage=}@samp{SIZE_MAX} or larger. -@item -Wunsafe-loop-optimizations @opindex Wunsafe-loop-optimizations @opindex Wno-unsafe-loop-optimizations +@item -Wunsafe-loop-optimizations Warn if the loop cannot be optimized because the compiler cannot assume anything on the bounds of the loop indices. With @option{-funsafe-loop-optimizations} warn if the compiler makes such assumptions. -@item -Wno-pedantic-ms-format @r{(MinGW targets only)} @opindex Wno-pedantic-ms-format @opindex Wpedantic-ms-format +@item -Wno-pedantic-ms-format @r{(MinGW targets only)} When used in combination with @option{-Wformat} and @option{-pedantic} without GNU extensions, this option disables the warnings about non-ISO @code{printf} / @code{scanf} format width specifiers @code{I32}, @code{I64}, and @code{I} used on Windows targets, which depend on the MS runtime. -@item -Wpointer-arith @opindex Wpointer-arith @opindex Wno-pointer-arith +@item -Wpointer-arith Warn about anything that depends on the ``size of'' a function type or of @code{void}. GNU C assigns these types a size of 1, for convenience in calculations with @code{void *} pointers and pointers to functions. In C++, warn also when an arithmetic operation involves @code{NULL}. This warning is also enabled by @option{-Wpedantic}. -@item -Wno-pointer-compare @opindex Wpointer-compare @opindex Wno-pointer-compare +@item -Wno-pointer-compare Do not warn if a pointer is compared with a zero character constant. This usually means that the pointer was meant to be dereferenced. For example: @@ -8737,9 +8737,9 @@ Note that the code above is invalid in C++11. This warning is enabled by default. -@item -Wtsan @opindex Wtsan @opindex Wno-tsan +@item -Wtsan Warn about unsupported features in ThreadSanitizer. ThreadSanitizer does not support @code{std::atomic_thread_fence} and @@ -8747,18 +8747,18 @@ can report false positives. This warning is enabled by default. -@item -Wtype-limits @opindex Wtype-limits @opindex Wno-type-limits +@item -Wtype-limits Warn if a comparison is always true or always false due to the limited range of the data type, but do not warn for constant expressions. For example, warn if an unsigned variable is compared against zero with @code{<} or @code{>=}. This warning is also enabled by @option{-Wextra}. -@item -Wabsolute-value @r{(C and Objective-C only)} @opindex Wabsolute-value @opindex Wno-absolute-value +@item -Wabsolute-value @r{(C and Objective-C only)} Warn for calls to standard functions that compute the absolute value of an argument when a more appropriate standard function is available. For example, calling @code{abs(3.14)} triggers the warning because the @@ -8770,25 +8770,25 @@ enabled by @option{-Wextra}. @include cppwarnopts.texi -@item -Wbad-function-cast @r{(C and Objective-C only)} @opindex Wbad-function-cast @opindex Wno-bad-function-cast +@item -Wbad-function-cast @r{(C and Objective-C only)} Warn when a function call is cast to a non-matching type. For example, warn if a call to a function returning an integer type is cast to a pointer type. -@item -Wc90-c99-compat @r{(C and Objective-C only)} @opindex Wc90-c99-compat @opindex Wno-c90-c99-compat +@item -Wc90-c99-compat @r{(C and Objective-C only)} Warn about features not present in ISO C90, but present in ISO C99. For instance, warn about use of variable length arrays, @code{long long} type, @code{bool} type, compound literals, designated initializers, and so on. This option is independent of the standards mode. Warnings are disabled in the expression that follows @code{__extension__}. -@item -Wc99-c11-compat @r{(C and Objective-C only)} @opindex Wc99-c11-compat @opindex Wno-c99-c11-compat +@item -Wc99-c11-compat @r{(C and Objective-C only)} Warn about features not present in ISO C99, but present in ISO C11. For instance, warn about use of anonymous structures and unions, @code{_Atomic} type qualifier, @code{_Thread_local} storage-class specifier, @@ -8796,9 +8796,9 @@ For instance, warn about use of anonymous structures and unions, and so on. This option is independent of the standards mode. Warnings are disabled in the expression that follows @code{__extension__}. -@item -Wc11-c2x-compat @r{(C and Objective-C only)} @opindex Wc11-c2x-compat @opindex Wno-c11-c2x-compat +@item -Wc11-c2x-compat @r{(C and Objective-C only)} Warn about features not present in ISO C11, but present in ISO C2X. For instance, warn about omitting the string in @code{_Static_assert}, use of @samp{[[]]} syntax for attributes, use of decimal @@ -8806,77 +8806,77 @@ floating-point types, and so on. This option is independent of the standards mode. Warnings are disabled in the expression that follows @code{__extension__}. -@item -Wc++-compat @r{(C and Objective-C only)} @opindex Wc++-compat @opindex Wno-c++-compat +@item -Wc++-compat @r{(C and Objective-C only)} Warn about ISO C constructs that are outside of the common subset of ISO C and ISO C++, e.g.@: request for implicit conversion from @code{void *} to a pointer to non-@code{void} type. -@item -Wc++11-compat @r{(C++ and Objective-C++ only)} @opindex Wc++11-compat @opindex Wno-c++11-compat +@item -Wc++11-compat @r{(C++ and Objective-C++ only)} Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011, e.g., identifiers in ISO C++ 1998 that are keywords in ISO C++ 2011. This warning turns on @option{-Wnarrowing} and is enabled by @option{-Wall}. -@item -Wc++14-compat @r{(C++ and Objective-C++ only)} @opindex Wc++14-compat @opindex Wno-c++14-compat +@item -Wc++14-compat @r{(C++ and Objective-C++ only)} Warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014. This warning is enabled by @option{-Wall}. -@item -Wc++17-compat @r{(C++ and Objective-C++ only)} @opindex Wc++17-compat @opindex Wno-c++17-compat +@item -Wc++17-compat @r{(C++ and Objective-C++ only)} Warn about C++ constructs whose meaning differs between ISO C++ 2014 and ISO C++ 2017. This warning is enabled by @option{-Wall}. -@item -Wc++20-compat @r{(C++ and Objective-C++ only)} @opindex Wc++20-compat @opindex Wno-c++20-compat +@item -Wc++20-compat @r{(C++ and Objective-C++ only)} Warn about C++ constructs whose meaning differs between ISO C++ 2017 and ISO C++ 2020. This warning is enabled by @option{-Wall}. -@item -Wno-c++11-extensions @r{(C++ and Objective-C++ only)} @opindex Wc++11-extensions @opindex Wno-c++11-extensions +@item -Wno-c++11-extensions @r{(C++ and Objective-C++ only)} Do not warn about C++11 constructs in code being compiled using an older C++ standard. Even without this option, some C++11 constructs will only be diagnosed if @option{-Wpedantic} is used. -@item -Wno-c++14-extensions @r{(C++ and Objective-C++ only)} @opindex Wc++14-extensions @opindex Wno-c++14-extensions +@item -Wno-c++14-extensions @r{(C++ and Objective-C++ only)} Do not warn about C++14 constructs in code being compiled using an older C++ standard. Even without this option, some C++14 constructs will only be diagnosed if @option{-Wpedantic} is used. -@item -Wno-c++17-extensions @r{(C++ and Objective-C++ only)} @opindex Wc++17-extensions @opindex Wno-c++17-extensions +@item -Wno-c++17-extensions @r{(C++ and Objective-C++ only)} Do not warn about C++17 constructs in code being compiled using an older C++ standard. Even without this option, some C++17 constructs will only be diagnosed if @option{-Wpedantic} is used. -@item -Wno-c++20-extensions @r{(C++ and Objective-C++ only)} @opindex Wc++20-extensions @opindex Wno-c++20-extensions +@item -Wno-c++20-extensions @r{(C++ and Objective-C++ only)} Do not warn about C++20 constructs in code being compiled using an older C++ standard. Even without this option, some C++20 constructs will only be diagnosed if @option{-Wpedantic} is used. -@item -Wno-c++23-extensions @r{(C++ and Objective-C++ only)} @opindex Wc++23-extensions @opindex Wno-c++23-extensions +@item -Wno-c++23-extensions @r{(C++ and Objective-C++ only)} Do not warn about C++23 constructs in code being compiled using an older C++ standard. Even without this option, some C++23 constructs will only be diagnosed if @option{-Wpedantic} is used. -@item -Wcast-qual @opindex Wcast-qual @opindex Wno-cast-qual +@item -Wcast-qual Warn whenever a pointer is cast so as to remove a type qualifier from the target type. For example, warn if a @code{const char *} is cast to an ordinary @code{char *}. @@ -8894,23 +8894,23 @@ is unsafe, as in this example: **p = 'b'; @end smallexample -@item -Wcast-align @opindex Wcast-align @opindex Wno-cast-align +@item -Wcast-align Warn whenever a pointer is cast such that the required alignment of the target is increased. For example, warn if a @code{char *} is cast to an @code{int *} on machines where integers can only be accessed at two- or four-byte boundaries. -@item -Wcast-align=strict @opindex Wcast-align=strict +@item -Wcast-align=strict Warn whenever a pointer is cast such that the required alignment of the target is increased. For example, warn if a @code{char *} is cast to an @code{int *} regardless of the target machine. -@item -Wcast-function-type @opindex Wcast-function-type @opindex Wno-cast-function-type +@item -Wcast-function-type Warn when a function pointer is cast to an incompatible function pointer. In a cast involving function types with a variable argument list only the types of initial arguments that are provided are considered. @@ -8923,9 +8923,9 @@ In a cast involving pointer to member types this warning warns whenever the type cast is changing the pointer to member type. This warning is enabled by @option{-Wextra}. -@item -Wwrite-strings @opindex Wwrite-strings @opindex Wno-write-strings +@item -Wwrite-strings When compiling C, give string constants the type @code{const char[@var{length}]} so that copying the address of one into a non-@code{const} @code{char *} pointer produces a warning. These @@ -8987,9 +8987,9 @@ unsigned integers are disabled by default in C++ unless Warnings about conversion from arithmetic on a small type back to that type are only given with @option{-Warith-conversion}. -@item -Wdangling-else @opindex Wdangling-else @opindex Wno-dangling-else +@item -Wdangling-else Warn about constructions where there may be confusion to which @code{if} statement an @code{else} branch belongs. Here is an example of such a case: @@ -9032,10 +9032,10 @@ looks like this: This warning is enabled by @option{-Wparentheses}. -@item -Wdangling-pointer -@itemx -Wdangling-pointer=@var{n} @opindex Wdangling-pointer @opindex Wno-dangling-pointer +@item -Wdangling-pointer +@itemx -Wdangling-pointer=@var{n} Warn about uses of pointers (or C++ references) to objects with automatic storage duration after their lifetime has ended. This includes local variables declared in nested blocks, compound literals and other unnamed @@ -9088,42 +9088,42 @@ void f (char *s) @option{-Wdangling-pointer=2} is included in @option{-Wall}. -@item -Wdate-time @opindex Wdate-time @opindex Wno-date-time +@item -Wdate-time Warn when macros @code{__TIME__}, @code{__DATE__} or @code{__TIMESTAMP__} are encountered as they might prevent bit-wise-identical reproducible compilations. -@item -Wempty-body @opindex Wempty-body @opindex Wno-empty-body +@item -Wempty-body Warn if an empty body occurs in an @code{if}, @code{else} or @code{do while} statement. This warning is also enabled by @option{-Wextra}. -@item -Wno-endif-labels @opindex Wendif-labels @opindex Wno-endif-labels +@item -Wno-endif-labels Do not warn about stray tokens after @code{#else} and @code{#endif}. -@item -Wenum-compare @opindex Wenum-compare @opindex Wno-enum-compare +@item -Wenum-compare Warn about a comparison between values of different enumerated types. In C++ enumerated type mismatches in conditional expressions are also diagnosed and the warning is enabled by default. In C this warning is enabled by @option{-Wall}. -@item -Wenum-conversion @opindex Wenum-conversion @opindex Wno-enum-conversion +@item -Wenum-conversion Warn when a value of enumerated type is implicitly converted to a different enumerated type. This warning is enabled by @option{-Wextra} in C@. -@item -Wenum-int-mismatch @r{(C and Objective-C only)} @opindex Wenum-int-mismatch @opindex Wno-enum-int-mismatch +@item -Wenum-int-mismatch @r{(C and Objective-C only)} Warn about mismatches between an enumerated type and an integer type in declarations. For example: @@ -9140,9 +9140,9 @@ such mismatches may cause portability issues. In C++, such mismatches are an error. In C, this warning is enabled by @option{-Wall} and @option{-Wc++-compat}. -@item -Wjump-misses-init @r{(C, Objective-C only)} @opindex Wjump-misses-init @opindex Wno-jump-misses-init +@item -Wjump-misses-init @r{(C, Objective-C only)} Warn if a @code{goto} statement or a @code{switch} statement jumps forward across the initialization of a variable, or jumps backward to a label after the variable has been initialized. This only warns about @@ -9153,9 +9153,9 @@ error in any case. @option{-Wjump-misses-init} is included in @option{-Wc++-compat}. It can be disabled with the @option{-Wno-jump-misses-init} option. -@item -Wsign-compare @opindex Wsign-compare @opindex Wno-sign-compare +@item -Wsign-compare @cindex warning for comparison of signed and unsigned values @cindex comparison of signed and unsigned values, warning @cindex signed and unsigned values, comparison warning @@ -9164,30 +9164,30 @@ an incorrect result when the signed value is converted to unsigned. In C++, this warning is also enabled by @option{-Wall}. In C, it is also enabled by @option{-Wextra}. -@item -Wsign-conversion @opindex Wsign-conversion @opindex Wno-sign-conversion +@item -Wsign-conversion Warn for implicit conversions that may change the sign of an integer value, like assigning a signed integer expression to an unsigned integer variable. An explicit cast silences the warning. In C, this option is enabled also by @option{-Wconversion}. -@item -Wfloat-conversion @opindex Wfloat-conversion @opindex Wno-float-conversion +@item -Wfloat-conversion Warn for implicit conversions that reduce the precision of a real value. This includes conversions from real to integer, and from higher precision real to lower precision real values. This option is also enabled by @option{-Wconversion}. -@item -Wno-scalar-storage-order @opindex Wno-scalar-storage-order @opindex Wscalar-storage-order +@item -Wno-scalar-storage-order Do not warn on suspicious constructs involving reverse scalar storage order. -@item -Wsizeof-array-div @opindex Wsizeof-array-div @opindex Wno-sizeof-array-div +@item -Wsizeof-array-div Warn about divisions of two sizeof operators when the first one is applied to an array and the divisor does not equal the size of the array element. In such a case, the computation will not yield the number of elements in the @@ -9202,18 +9202,18 @@ int fn () This warning is enabled by @option{-Wall}. -@item -Wsizeof-pointer-div @opindex Wsizeof-pointer-div @opindex Wno-sizeof-pointer-div +@item -Wsizeof-pointer-div Warn for suspicious divisions of two sizeof expressions that divide the pointer size by the element size, which is the usual way to compute the array size but won't work out correctly with pointers. This warning warns e.g.@: about @code{sizeof (ptr) / sizeof (ptr[0])} if @code{ptr} is not an array, but a pointer. This warning is enabled by @option{-Wall}. -@item -Wsizeof-pointer-memaccess @opindex Wsizeof-pointer-memaccess @opindex Wno-sizeof-pointer-memaccess +@item -Wsizeof-pointer-memaccess Warn for suspicious length parameters to certain string and memory built-in functions if the argument uses @code{sizeof}. This warning triggers for example for @code{memset (ptr, 0, sizeof (ptr));} if @code{ptr} is not @@ -9236,25 +9236,25 @@ void make_file (const char *name) The @option{-Wsizeof-pointer-memaccess} option is enabled by @option{-Wall}. -@item -Wno-sizeof-array-argument @opindex Wsizeof-array-argument @opindex Wno-sizeof-array-argument +@item -Wno-sizeof-array-argument Do not warn when the @code{sizeof} operator is applied to a parameter that is declared as an array in a function definition. This warning is enabled by default for C and C++ programs. -@item -Wmemset-elt-size @opindex Wmemset-elt-size @opindex Wno-memset-elt-size +@item -Wmemset-elt-size Warn for suspicious calls to the @code{memset} built-in function, if the first argument references an array, and the third argument is a number equal to the number of elements, but not equal to the size of the array in memory. This indicates that the user has omitted a multiplication by the element size. This warning is enabled by @option{-Wall}. -@item -Wmemset-transposed-args @opindex Wmemset-transposed-args @opindex Wno-memset-transposed-args +@item -Wmemset-transposed-args Warn for suspicious calls to the @code{memset} built-in function where the second argument is not zero and the third argument is zero. For example, the call @code{memset (buf, sizeof buf, 0)} is diagnosed because @@ -9265,9 +9265,9 @@ type, it is far less likely that the arguments have been mistakenly transposed and no warning is emitted. This warning is enabled by @option{-Wall}. -@item -Waddress @opindex Waddress @opindex Wno-address +@item -Waddress Warn about suspicious uses of address expressions. These include comparing the address of a function or a declared object to the null pointer constant such as in @@ -9308,16 +9308,16 @@ The warning is suppressed if the suspicious expression is the result of macro expansion. @option{-Waddress} warning is enabled by @option{-Wall}. -@item -Wno-address-of-packed-member @opindex Waddress-of-packed-member @opindex Wno-address-of-packed-member +@item -Wno-address-of-packed-member Do not warn when the address of packed member of struct or union is taken, which usually results in an unaligned pointer value. This is enabled by default. -@item -Wlogical-op @opindex Wlogical-op @opindex Wno-logical-op +@item -Wlogical-op Warn about suspicious uses of logical operators in expressions. This includes using logical operators in contexts where a bit-wise operator is likely to be expected. Also warns when @@ -9327,9 +9327,9 @@ extern int a; if (a < 0 && a < 0) @{ @dots{} @} @end smallexample -@item -Wlogical-not-parentheses @opindex Wlogical-not-parentheses @opindex Wno-logical-not-parentheses +@item -Wlogical-not-parentheses Warn about logical not used on the left hand side operand of a comparison. This option does not warn if the right operand is considered to be a boolean expression. Its purpose is to detect suspicious code like the following: @@ -9347,22 +9347,22 @@ if ((!a) > 1) @{ @dots{} @} This warning is enabled by @option{-Wall}. -@item -Waggregate-return @opindex Waggregate-return @opindex Wno-aggregate-return +@item -Waggregate-return Warn if any functions that return structures or unions are defined or called. (In languages where you can return an array, this also elicits a warning.) -@item -Wno-aggressive-loop-optimizations @opindex Wno-aggressive-loop-optimizations @opindex Waggressive-loop-optimizations +@item -Wno-aggressive-loop-optimizations Warn if in a loop with constant number of iterations the compiler detects undefined behavior in some statement during one or more of the iterations. -@item -Wno-attributes @opindex Wno-attributes @opindex Wattributes +@item -Wno-attributes Do not warn if an unexpected @code{__attribute__} is used, such as unrecognized attributes, function attributes applied to variables, etc. This does not stop errors for incorrect use of supported @@ -9388,9 +9388,9 @@ of these declarations: Note that @option{-Wno-attributes=} does not imply @option{-Wno-attributes}. -@item -Wno-builtin-declaration-mismatch @opindex Wno-builtin-declaration-mismatch @opindex Wbuiltin-declaration-mismatch +@item -Wno-builtin-declaration-mismatch Warn if a built-in function is declared with an incompatible signature or as a non-function, or when a built-in function declared with a type that does not include a prototype is called with arguments whose promoted @@ -9412,41 +9412,41 @@ void f (void *d) @} @end smallexample -@item -Wno-builtin-macro-redefined @opindex Wno-builtin-macro-redefined @opindex Wbuiltin-macro-redefined +@item -Wno-builtin-macro-redefined Do not warn if certain built-in macros are redefined. This suppresses warnings for redefinition of @code{__TIMESTAMP__}, @code{__TIME__}, @code{__DATE__}, @code{__FILE__}, and @code{__BASE_FILE__}. -@item -Wstrict-prototypes @r{(C and Objective-C only)} @opindex Wstrict-prototypes @opindex Wno-strict-prototypes +@item -Wstrict-prototypes @r{(C and Objective-C only)} Warn if a function is declared or defined without specifying the argument types. (An old-style function definition is permitted without a warning if preceded by a declaration that specifies the argument types.) -@item -Wold-style-declaration @r{(C and Objective-C only)} @opindex Wold-style-declaration @opindex Wno-old-style-declaration +@item -Wold-style-declaration @r{(C and Objective-C only)} Warn for obsolescent usages, according to the C Standard, in a declaration. For example, warn if storage-class specifiers like @code{static} are not the first things in a declaration. This warning is also enabled by @option{-Wextra}. -@item -Wold-style-definition @r{(C and Objective-C only)} @opindex Wold-style-definition @opindex Wno-old-style-definition +@item -Wold-style-definition @r{(C and Objective-C only)} Warn if an old-style function definition is used. A warning is given even if there is a previous prototype. A definition using @samp{()} is not considered an old-style definition in C2X mode, because it is equivalent to @samp{(void)} in that case, but is considered an old-style definition for older standards. -@item -Wmissing-parameter-type @r{(C and Objective-C only)} @opindex Wmissing-parameter-type @opindex Wno-missing-parameter-type +@item -Wmissing-parameter-type @r{(C and Objective-C only)} A function parameter is declared without a type specifier in K&R-style functions: @@ -9456,9 +9456,9 @@ void foo(bar) @{ @} This warning is also enabled by @option{-Wextra}. -@item -Wmissing-prototypes @r{(C and Objective-C only)} @opindex Wmissing-prototypes @opindex Wno-missing-prototypes +@item -Wmissing-prototypes @r{(C and Objective-C only)} Warn if a global function is defined without a previous prototype declaration. This warning is issued even if the definition itself provides a prototype. Use this option to detect global functions @@ -9468,9 +9468,9 @@ provide prototypes and a non-matching declaration declares an overload rather than conflict with an earlier declaration. Use @option{-Wmissing-declarations} to detect missing declarations in C++. -@item -Wmissing-declarations @opindex Wmissing-declarations @opindex Wno-missing-declarations +@item -Wmissing-declarations Warn if a global function is defined without a previous declaration. Do so even if the definition itself provides a prototype. Use this option to detect global functions that are not declared in @@ -9479,12 +9479,12 @@ non-prototype declarations; use @option{-Wmissing-prototypes} to detect missing prototypes. In C++, no warnings are issued for function templates, or for inline functions, or for functions in anonymous namespaces. -@item -Wmissing-field-initializers @opindex Wmissing-field-initializers @opindex Wno-missing-field-initializers @opindex W @opindex Wextra @opindex Wno-extra +@item -Wmissing-field-initializers Warn if a structure's initializer has some fields missing. For example, the following code causes such a warning, because @code{x.h} is implicitly zero: @@ -9521,9 +9521,9 @@ s x = @{ @}; This warning is included in @option{-Wextra}. To get other @option{-Wextra} warnings without this one, use @option{-Wextra -Wno-missing-field-initializers}. -@item -Wno-missing-requires @opindex Wmissing-requires @opindex Wno-missing-requires +@item -Wno-missing-requires By default, the compiler warns about a concept-id appearing as a C++20 simple-requirement: @@ -9543,9 +9543,9 @@ type @samp{T}. This warning can be disabled with @option{-Wno-missing-requires}. -@item -Wno-missing-template-keyword @opindex Wmissing-template-keyword @opindex Wno-missing-template-keyword +@item -Wno-missing-template-keyword The member access tokens ., -> and :: must be followed by the @code{template} keyword if the parent object is dependent and the member being named is a @@ -9576,17 +9576,17 @@ void NotATemplate (my_class t) This warning can be disabled with @option{-Wno-missing-template-keyword}. -@item -Wno-multichar @opindex Wno-multichar @opindex Wmultichar +@item -Wno-multichar Do not warn if a multicharacter constant (@samp{'FOOF'}) is used. Usually they indicate a typo in the user's code, as they have implementation-defined values, and should not be used in portable code. -@item -Wnormalized=@r{[}none@r{|}id@r{|}nfc@r{|}nfkc@r{]} @opindex Wnormalized= @opindex Wnormalized @opindex Wno-normalized +@item -Wnormalized=@r{[}none@r{|}id@r{|}nfc@r{|}nfkc@r{]} @cindex NFC @cindex NFKC @cindex character set, input normalization @@ -9632,58 +9632,58 @@ confused with the digit 0, and so is not the default, but may be useful as a local coding convention if the programming environment cannot be fixed to display these characters distinctly. -@item -Wno-attribute-warning @opindex Wno-attribute-warning @opindex Wattribute-warning +@item -Wno-attribute-warning Do not warn about usage of functions (@pxref{Function Attributes}) declared with @code{warning} attribute. By default, this warning is enabled. @option{-Wno-attribute-warning} can be used to disable the warning or @option{-Wno-error=attribute-warning} can be used to disable the error when compiled with @option{-Werror} flag. -@item -Wno-deprecated @opindex Wno-deprecated @opindex Wdeprecated +@item -Wno-deprecated Do not warn about usage of deprecated features. @xref{Deprecated Features}. -@item -Wno-deprecated-declarations @opindex Wno-deprecated-declarations @opindex Wdeprecated-declarations +@item -Wno-deprecated-declarations Do not warn about uses of functions (@pxref{Function Attributes}), variables (@pxref{Variable Attributes}), and types (@pxref{Type Attributes}) marked as deprecated by using the @code{deprecated} attribute. -@item -Wno-overflow @opindex Wno-overflow @opindex Woverflow +@item -Wno-overflow Do not warn about compile-time overflow in constant expressions. -@item -Wno-odr @opindex Wno-odr @opindex Wodr +@item -Wno-odr Warn about One Definition Rule violations during link-time optimization. Enabled by default. -@item -Wopenacc-parallelism @opindex Wopenacc-parallelism @opindex Wno-openacc-parallelism +@item -Wopenacc-parallelism @cindex OpenACC accelerator programming Warn about potentially suboptimal choices related to OpenACC parallelism. -@item -Wopenmp-simd @opindex Wopenmp-simd @opindex Wno-openmp-simd +@item -Wopenmp-simd Warn if the vectorizer cost model overrides the OpenMP simd directive set by user. The @option{-fsimd-cost-model=unlimited} option can be used to relax the cost model. -@item -Woverride-init @r{(C and Objective-C only)} @opindex Woverride-init @opindex Wno-override-init @opindex W @opindex Wextra @opindex Wno-extra +@item -Woverride-init @r{(C and Objective-C only)} Warn if an initialized field without side effects is overridden when using designated initializers (@pxref{Designated Inits, , Designated Initializers}). @@ -9692,16 +9692,16 @@ This warning is included in @option{-Wextra}. To get other @option{-Wextra} warnings without this one, use @option{-Wextra -Wno-override-init}. -@item -Wno-override-init-side-effects @r{(C and Objective-C only)} @opindex Woverride-init-side-effects @opindex Wno-override-init-side-effects +@item -Wno-override-init-side-effects @r{(C and Objective-C only)} Do not warn if an initialized field with side effects is overridden when using designated initializers (@pxref{Designated Inits, , Designated Initializers}). This warning is enabled by default. -@item -Wpacked @opindex Wpacked @opindex Wno-packed +@item -Wpacked Warn if a structure is given the packed attribute, but the packed attribute has no effect on the layout or size of the structure. Such structures may be mis-aligned for little benefit. For @@ -9722,9 +9722,9 @@ struct bar @{ @end group @end smallexample -@item -Wnopacked-bitfield-compat @opindex Wpacked-bitfield-compat @opindex Wno-packed-bitfield-compat +@item -Wnopacked-bitfield-compat The 4.1, 4.2 and 4.3 series of GCC ignore the @code{packed} attribute on bit-fields of type @code{char}. This was fixed in GCC 4.4 but the change can lead to differences in the structure layout. GCC @@ -9743,9 +9743,9 @@ struct foo This warning is enabled by default. Use @option{-Wno-packed-bitfield-compat} to disable this warning. -@item -Wpacked-not-aligned @r{(C, C++, Objective-C and Objective-C++ only)} @opindex Wpacked-not-aligned @opindex Wno-packed-not-aligned +@item -Wpacked-not-aligned @r{(C, C++, Objective-C and Objective-C++ only)} Warn if a structure field with explicitly specified alignment in a packed struct or union is misaligned. For example, a warning will be issued on @code{struct S}, like, @code{warning: alignment 1 of @@ -9762,23 +9762,23 @@ struct __attribute__ ((packed)) S @{ This warning is enabled by @option{-Wall}. -@item -Wpadded @opindex Wpadded @opindex Wno-padded +@item -Wpadded Warn if padding is included in a structure, either to align an element of the structure or to align the whole structure. Sometimes when this happens it is possible to rearrange the fields of the structure to reduce the padding and so make the structure smaller. -@item -Wredundant-decls @opindex Wredundant-decls @opindex Wno-redundant-decls +@item -Wredundant-decls Warn if anything is declared more than once in the same scope, even in cases where multiple declaration is valid and changes nothing. -@item -Wrestrict @opindex Wrestrict @opindex Wno-restrict +@item -Wrestrict Warn when an object referenced by a @code{restrict}-qualified parameter (or, in C++, a @code{__restrict}-qualified parameter) is aliased by another argument, or when copies between such objects overlap. For example, @@ -9799,14 +9799,14 @@ The @option{-Wrestrict} option detects some instances of simple overlap even without optimization but works best at @option{-O2} and above. It is included in @option{-Wall}. -@item -Wnested-externs @r{(C and Objective-C only)} @opindex Wnested-externs @opindex Wno-nested-externs +@item -Wnested-externs @r{(C and Objective-C only)} Warn if an @code{extern} declaration is encountered within a function. -@item -Winline @opindex Winline @opindex Wno-inline +@item -Winline Warn if a function that is declared as inline cannot be inlined. Even with this option, the compiler does not warn about failures to inline functions declared in system headers. @@ -9818,8 +9818,8 @@ that has already been done in the current function. Therefore, seemingly insignificant changes in the source program can cause the warnings produced by @option{-Winline} to appear or disappear. -@item -Winterference-size @opindex Winterference-size +@item -Winterference-size Warn about use of C++17 @code{std::hardware_destructive_interference_size} without specifying its value with @option{--param destructive-interference-size}. Also warn about questionable values for that option. @@ -9855,9 +9855,9 @@ If you are confident that your use of the variable does not affect ABI outside a single build of your project, you can turn off the warning with @option{-Wno-interference-size}. -@item -Wint-in-bool-context @opindex Wint-in-bool-context @opindex Wno-int-in-bool-context +@item -Wint-in-bool-context Warn for suspicious use of integer values where boolean values are expected, such as conditional expressions (?:) using non-boolean integer constants in boolean context, like @code{if (a <= b ? 2 : 3)}. Or left shifting of signed @@ -9865,63 +9865,63 @@ integers in boolean context, like @code{for (a = 0; 1 << a; a++);}. Likewise for all kinds of multiplications regardless of the data type. This warning is enabled by @option{-Wall}. -@item -Wno-int-to-pointer-cast @opindex Wno-int-to-pointer-cast @opindex Wint-to-pointer-cast +@item -Wno-int-to-pointer-cast Suppress warnings from casts to pointer type of an integer of a different size. In C++, casting to a pointer type of smaller size is an error. @option{Wint-to-pointer-cast} is enabled by default. -@item -Wno-pointer-to-int-cast @r{(C and Objective-C only)} @opindex Wno-pointer-to-int-cast @opindex Wpointer-to-int-cast +@item -Wno-pointer-to-int-cast @r{(C and Objective-C only)} Suppress warnings from casts from a pointer to an integer type of a different size. -@item -Winvalid-pch @opindex Winvalid-pch @opindex Wno-invalid-pch +@item -Winvalid-pch Warn if a precompiled header (@pxref{Precompiled Headers}) is found in the search path but cannot be used. -@item -Winvalid-utf8 @opindex Winvalid-utf8 @opindex Wno-invalid-utf8 +@item -Winvalid-utf8 Warn if an invalid UTF-8 character is found. This warning is on by default for C++23 if @option{-finput-charset=UTF-8} is used and turned into error with @option{-pedantic-errors}. -@item -Wno-unicode @opindex Wunicode @opindex Wno-unicode +@item -Wno-unicode Don't diagnose invalid forms of delimited or named escape sequences which are treated as separate tokens. @option{Wunicode} is enabled by default. -@item -Wlong-long @opindex Wlong-long @opindex Wno-long-long +@item -Wlong-long Warn if @code{long long} type is used. This is enabled by either @option{-Wpedantic} or @option{-Wtraditional} in ISO C90 and C++98 modes. To inhibit the warning messages, use @option{-Wno-long-long}. -@item -Wvariadic-macros @opindex Wvariadic-macros @opindex Wno-variadic-macros +@item -Wvariadic-macros Warn if variadic macros are used in ISO C90 mode, or if the GNU alternate syntax is used in ISO C99 mode. This is enabled by either @option{-Wpedantic} or @option{-Wtraditional}. To inhibit the warning messages, use @option{-Wno-variadic-macros}. -@item -Wno-varargs @opindex Wvarargs @opindex Wno-varargs +@item -Wno-varargs Do not warn upon questionable usage of the macros used to handle variable arguments like @code{va_start}. These warnings are enabled by default. -@item -Wvector-operation-performance @opindex Wvector-operation-performance @opindex Wno-vector-operation-performance +@item -Wvector-operation-performance Warn if vector operation is not implemented via SIMD capabilities of the architecture. Mainly useful for the performance tuning. Vector operation can be implemented @code{piecewise}, which means that the @@ -9931,16 +9931,16 @@ using scalars of wider type, which normally is more performance efficient; and @code{as a single scalar}, which means that vector fits into a scalar type. -@item -Wvla @opindex Wvla @opindex Wno-vla +@item -Wvla Warn if a variable-length array is used in the code. @option{-Wno-vla} prevents the @option{-Wpedantic} warning of the variable-length array. -@item -Wvla-larger-than=@var{byte-size} @opindex Wvla-larger-than= @opindex Wno-vla-larger-than +@item -Wvla-larger-than=@var{byte-size} If this option is used, the compiler warns for declarations of variable-length arrays whose size is either unbounded, or bounded by an argument that allows the array size to exceed @var{byte-size} @@ -9957,13 +9957,13 @@ for @option{-O2} and above). See also @option{-Walloca-larger-than=@var{byte-size}}. -@item -Wno-vla-larger-than @opindex Wno-vla-larger-than +@item -Wno-vla-larger-than Disable @option{-Wvla-larger-than=} warnings. The option is equivalent to @option{-Wvla-larger-than=}@samp{SIZE_MAX} or larger. -@item -Wvla-parameter @opindex Wno-vla-parameter +@item -Wvla-parameter Warn about redeclarations of functions involving arguments of Variable Length Array types of inconsistent kinds or forms, and enable the detection of out-of-bounds accesses to such parameters by warnings such as @@ -10000,17 +10000,17 @@ void g (int n) @option{-Warray-parameter} option triggers warnings for similar problems involving ordinary array arguments. -@item -Wvolatile-register-var @opindex Wvolatile-register-var @opindex Wno-volatile-register-var +@item -Wvolatile-register-var Warn if a register variable is declared volatile. The volatile modifier does not inhibit all optimizations that may eliminate reads and/or writes to register variables. This warning is enabled by @option{-Wall}. -@item -Wxor-used-as-pow @r{(C, C++, Objective-C and Objective-C++ only)} @opindex Wxor-used-as-pow @opindex Wno-xor-used-as-pow +@item -Wxor-used-as-pow @r{(C, C++, Objective-C and Objective-C++ only)} Warn about uses of @code{^}, the exclusive or operator, where it appears the user meant exponentiation. Specifically, the warning occurs when the left-hand side is the decimal constant 2 or 10 and the right-hand side @@ -10022,9 +10022,9 @@ In C and C++, @code{^} means exclusive or, whereas in some other languages This warning is enabled by default. It can be silenced by converting one of the operands to hexadecimal. -@item -Wdisabled-optimization @opindex Wdisabled-optimization @opindex Wno-disabled-optimization +@item -Wdisabled-optimization Warn if a requested optimization pass is disabled. This warning does not generally indicate that there is anything wrong with your code; it merely indicates that GCC's optimizers are unable to handle the code @@ -10032,23 +10032,23 @@ effectively. Often, the problem is that your code is too big or too complex; GCC refuses to optimize programs when the optimization itself is likely to take inordinate amounts of time. -@item -Wpointer-sign @r{(C and Objective-C only)} @opindex Wpointer-sign @opindex Wno-pointer-sign +@item -Wpointer-sign @r{(C and Objective-C only)} Warn for pointer argument passing or assignment with different signedness. This option is only supported for C and Objective-C@. It is implied by @option{-Wall} and by @option{-Wpedantic}, which can be disabled with @option{-Wno-pointer-sign}. -@item -Wstack-protector @opindex Wstack-protector @opindex Wno-stack-protector +@item -Wstack-protector This option is only active when @option{-fstack-protector} is active. It warns about functions that are not protected against stack smashing. -@item -Woverlength-strings @opindex Woverlength-strings @opindex Wno-overlength-strings +@item -Woverlength-strings Warn about string constants that are longer than the ``minimum maximum'' length specified in the C standard. Modern compilers generally allow string constants that are much longer than the @@ -10063,9 +10063,9 @@ minimum maximum, so we do not diagnose overlength strings in C++@. This option is implied by @option{-Wpedantic}, and can be disabled with @option{-Wno-overlength-strings}. -@item -Wunsuffixed-float-constants @r{(C and Objective-C only)} @opindex Wunsuffixed-float-constants @opindex Wno-unsuffixed-float-constants +@item -Wunsuffixed-float-constants @r{(C and Objective-C only)} Issue a warning for any floating constant that does not have a suffix. When used together with @option{-Wsystem-headers} it @@ -10073,17 +10073,17 @@ warns about such constants in system header files. This can be useful when preparing code to use with the @code{FLOAT_CONST_DECIMAL64} pragma from the decimal floating-point extension to C99. -@item -Wno-lto-type-mismatch @opindex Wlto-type-mismatch @opindex Wno-lto-type-mismatch +@item -Wno-lto-type-mismatch During the link-time optimization, do not warn about type mismatches in global declarations from different compilation units. Requires @option{-flto} to be enabled. Enabled by default. -@item -Wno-designated-init @r{(C and Objective-C only)} @opindex Wdesignated-init @opindex Wno-designated-init +@item -Wno-designated-init @r{(C and Objective-C only)} Suppress warnings when a positional initializer is used to initialize a structure that has been marked with the @code{designated_init} attribute. @@ -10094,10 +10094,10 @@ attribute. @section Options That Control Static Analysis @table @gcctabopt -@item -fanalyzer @opindex analyzer @opindex fanalyzer @opindex fno-analyzer +@item -fanalyzer This option enables an static analysis of program flow which looks for ``interesting'' interprocedural paths through the code, and issues warnings for problems found on them. @@ -10165,9 +10165,9 @@ Enabling this option effectively enables the following warnings: This option is only available if GCC was configured with analyzer support enabled. -@item -Wanalyzer-too-complex @opindex Wanalyzer-too-complex @opindex Wno-analyzer-too-complex +@item -Wanalyzer-too-complex If @option{-fanalyzer} is enabled, the analyzer uses various heuristics to attempt to explore the control flow and data flow in the program, but these can be defeated by sufficiently complicated code. @@ -10176,9 +10176,9 @@ By default, the analysis silently stops if the code is too complicated for the analyzer to fully explore and it reaches an internal limit. The @option{-Wanalyzer-too-complex} option warns if this occurs. -@item -Wno-analyzer-allocation-size @opindex Wanalyzer-allocation-size @opindex Wno-analyzer-allocation-size +@item -Wno-analyzer-allocation-size This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-allocation-size} to disable it. @@ -10189,9 +10189,9 @@ multiple of @code{sizeof (*pointer)}. See @uref{https://cwe.mitre.org/data/definitions/131.html, CWE-131: Incorrect Calculation of Buffer Size}. -@item -Wno-analyzer-deref-before-check @opindex Wanalyzer-deref-before-check @opindex Wno-analyzer-deref-before-check +@item -Wno-analyzer-deref-before-check This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-deref-before-check} to disable it. @@ -10213,9 +10213,9 @@ checks for NULL as being redundant, and optimize them away before the analyzer "sees" them. Hence optimization should be disabled when attempting to trigger this diagnostic. -@item -Wno-analyzer-double-fclose @opindex Wanalyzer-double-fclose @opindex Wno-analyzer-double-fclose +@item -Wno-analyzer-double-fclose This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-double-fclose} to disable it. @@ -10224,9 +10224,9 @@ can have @code{fclose} called on it more than once. See @uref{https://cwe.mitre.org/data/definitions/1341.html, CWE-1341: Multiple Releases of Same Resource or Handle}. -@item -Wno-analyzer-double-free @opindex Wanalyzer-double-free @opindex Wno-analyzer-double-free +@item -Wno-analyzer-double-free This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-double-free} to disable it. @@ -10236,9 +10236,9 @@ or a deallocator referenced by attribute @code{malloc}. See @uref{https://cwe.mitre.org/data/definitions/415.html, CWE-415: Double Free}. -@item -Wno-analyzer-exposure-through-output-file @opindex Wanalyzer-exposure-through-output-file @opindex Wno-analyzer-exposure-through-output-file +@item -Wno-analyzer-exposure-through-output-file This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-exposure-through-output-file} to disable it. @@ -10249,9 +10249,9 @@ security-sensitive value is written to an output file See @uref{https://cwe.mitre.org/data/definitions/532.html, CWE-532: Information Exposure Through Log Files}. -@item -Wanalyzer-exposure-through-uninit-copy @opindex Wanalyzer-exposure-through-uninit-copy @opindex Wno-analyzer-exposure-through-uninit-copy +@item -Wanalyzer-exposure-through-uninit-copy This warning requires both @option{-fanalyzer} and the use of a plugin to specify a function that copies across a ``trust boundary''. Use @option{-Wno-analyzer-exposure-through-uninit-copy} to disable it. @@ -10263,9 +10263,9 @@ struct on the stack to user space). See @uref{https://cwe.mitre.org/data/definitions/200.html, CWE-200: Exposure of Sensitive Information to an Unauthorized Actor}. -@item -Wno-analyzer-fd-access-mode-mismatch @opindex Wanalyzer-fd-access-mode-mismatch @opindex Wno-analyzer-fd-access-mode-mismatch +@item -Wno-analyzer-fd-access-mode-mismatch This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-fd-access-mode-mismatch} to disable it. @@ -10279,9 +10279,9 @@ This diagnostic also warns for code paths in a which a function with attribute @code{fd_arg_write (N)} is called with a file descriptor opened with @code{O_RDONLY} at referenced argument @var{N}. -@item -Wno-analyzer-fd-double-close @opindex Wanalyzer-fd-double-close @opindex Wno-analyzer-fd-double-close +@item -Wno-analyzer-fd-double-close This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-fd-double-close} to disable it. @@ -10291,9 +10291,9 @@ file descriptor can be closed more than once. See @uref{https://cwe.mitre.org/data/definitions/1341.html, CWE-1341: Multiple Releases of Same Resource or Handle}. -@item -Wno-analyzer-fd-leak @opindex Wanalyzer-fd-leak @opindex Wno-analyzer-fd-leak +@item -Wno-analyzer-fd-leak This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-fd-leak} to disable it. @@ -10303,9 +10303,9 @@ open file descriptor is leaked. See @uref{https://cwe.mitre.org/data/definitions/775.html, CWE-775: Missing Release of File Descriptor or Handle after Effective Lifetime}. -@item -Wno-analyzer-fd-phase-mismatch @opindex Wanalyzer-fd-phase-mismatch @opindex Wno-analyzer-fd-phase-mismatch +@item -Wno-analyzer-fd-phase-mismatch This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-fd-phase-mismatch} to disable it. @@ -10317,9 +10317,9 @@ socket that has not yet had @code{listen} successfully called on it. See @uref{https://cwe.mitre.org/data/definitions/666.html, CWE-666: Operation on Resource in Wrong Phase of Lifetime}. -@item -Wno-analyzer-fd-type-mismatch @opindex Wanalyzer-fd-type-mismatch @opindex Wno-analyzer-fd-type-mismatch +@item -Wno-analyzer-fd-type-mismatch This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-fd-type-mismatch} to disable it. @@ -10330,9 +10330,9 @@ For example, it will warn on attempts to use socket operations on a file descriptor obtained via @code{open}, or when attempting to use a stream socket operation on a datagram socket. -@item -Wno-analyzer-fd-use-after-close @opindex Wanalyzer-fd-use-after-close @opindex Wno-analyzer-fd-use-after-close +@item -Wno-analyzer-fd-use-after-close This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-fd-use-after-close} to disable it. @@ -10345,9 +10345,9 @@ a function with attribute @code{fd_arg (N)} or @code{fd_arg_read (N)} or @code{fd_arg_write (N)} is called with a closed file descriptor at referenced argument @code{N}. -@item -Wno-analyzer-fd-use-without-check @opindex Wanalyzer-fd-use-without-check @opindex Wno-analyzer-fd-use-without-check +@item -Wno-analyzer-fd-use-without-check This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-fd-use-without-check} to disable it. @@ -10360,9 +10360,9 @@ a function with attribute @code{fd_arg (N)} or @code{fd_arg_read (N)} or @code{fd_arg_write (N)} is called with a file descriptor, at referenced argument @code{N}, without being checked for validity. -@item -Wno-analyzer-file-leak @opindex Wanalyzer-file-leak @opindex Wno-analyzer-file-leak +@item -Wno-analyzer-file-leak This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-file-leak} to disable it. @@ -10372,9 +10372,9 @@ This diagnostic warns for paths through the code in which a See @uref{https://cwe.mitre.org/data/definitions/775.html, CWE-775: Missing Release of File Descriptor or Handle after Effective Lifetime}. -@item -Wno-analyzer-free-of-non-heap @opindex Wanalyzer-free-of-non-heap @opindex Wno-analyzer-free-of-non-heap +@item -Wno-analyzer-free-of-non-heap This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-free-of-non-heap} to disable it. @@ -10384,9 +10384,9 @@ is called on a non-heap pointer (e.g. an on-stack buffer, or a global). See @uref{https://cwe.mitre.org/data/definitions/590.html, CWE-590: Free of Memory not on the Heap}. -@item -Wno-analyzer-imprecise-fp-arithmetic @opindex Wanalyzer-imprecise-fp-arithmetic @opindex Wno-analyzer-imprecise-fp-arithmetic +@item -Wno-analyzer-imprecise-fp-arithmetic This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-imprecise-fp-arithmetic} to disable it. @@ -10396,9 +10396,9 @@ arithmetic is used in locations where precise computation is needed. This diagnostic only warns on use of floating-point operands inside the calculation of an allocation size at the moment. -@item -Wno-analyzer-infinite-recursion @opindex Wanalyzer-infinite-recursion @opindex Wno-analyzer-infinite-recursion +@item -Wno-analyzer-infinite-recursion This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-infinite-recursion} to disable it. @@ -10420,9 +10420,9 @@ this diagnostic. Compare with @option{-Winfinite-recursion}, which provides a similar diagnostic, but is implemented in a different way. -@item -Wno-analyzer-jump-through-null @opindex Wanalyzer-jump-through-null @opindex Wno-analyzer-jump-through-null +@item -Wno-analyzer-jump-through-null This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-jump-through-null} to disable it. @@ -10430,9 +10430,9 @@ to disable it. This diagnostic warns for paths through the code in which a @code{NULL} function pointer is called. -@item -Wno-analyzer-malloc-leak @opindex Wanalyzer-malloc-leak @opindex Wno-analyzer-malloc-leak +@item -Wno-analyzer-malloc-leak This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-malloc-leak} to disable it. @@ -10443,9 +10443,9 @@ or a function marked with attribute @code{malloc}. See @uref{https://cwe.mitre.org/data/definitions/401.html, CWE-401: Missing Release of Memory after Effective Lifetime}. -@item -Wno-analyzer-mismatching-deallocation @opindex Wanalyzer-mismatching-deallocation @opindex Wno-analyzer-mismatching-deallocation +@item -Wno-analyzer-mismatching-deallocation This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-mismatching-deallocation} to disable it. @@ -10459,9 +10459,9 @@ pairs using attribute @code{malloc}. See @uref{https://cwe.mitre.org/data/definitions/762.html, CWE-762: Mismatched Memory Management Routines}. -@item -Wno-analyzer-out-of-bounds @opindex Wanalyzer-out-of-bounds @opindex Wno-analyzer-out-of-bounds +@item -Wno-analyzer-out-of-bounds This warning requires @option{-fanalyzer} to enable it; use @option{-Wno-analyzer-out-of-bounds} to disable it. @@ -10474,9 +10474,9 @@ offset as well as the capacity is symbolic. See @uref{https://cwe.mitre.org/data/definitions/119.html, CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer}. -@item -Wno-analyzer-possible-null-argument @opindex Wanalyzer-possible-null-argument @opindex Wno-analyzer-possible-null-argument +@item -Wno-analyzer-possible-null-argument This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-possible-null-argument} to disable it. @@ -10487,9 +10487,9 @@ value. See @uref{https://cwe.mitre.org/data/definitions/690.html, CWE-690: Unchecked Return Value to NULL Pointer Dereference}. -@item -Wno-analyzer-possible-null-dereference @opindex Wanalyzer-possible-null-dereference @opindex Wno-analyzer-possible-null-dereference +@item -Wno-analyzer-possible-null-dereference This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-possible-null-dereference} to disable it. @@ -10498,9 +10498,9 @@ possibly-NULL value is dereferenced. See @uref{https://cwe.mitre.org/data/definitions/690.html, CWE-690: Unchecked Return Value to NULL Pointer Dereference}. -@item -Wno-analyzer-null-argument @opindex Wanalyzer-null-argument @opindex Wno-analyzer-null-argument +@item -Wno-analyzer-null-argument This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-null-argument} to disable it. @@ -10511,9 +10511,9 @@ value. See @uref{https://cwe.mitre.org/data/definitions/476.html, CWE-476: NULL Pointer Dereference}. -@item -Wno-analyzer-null-dereference @opindex Wanalyzer-null-dereference @opindex Wno-analyzer-null-dereference +@item -Wno-analyzer-null-dereference This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-null-dereference} to disable it. @@ -10522,9 +10522,9 @@ value known to be NULL is dereferenced. See @uref{https://cwe.mitre.org/data/definitions/476.html, CWE-476: NULL Pointer Dereference}. -@item -Wno-analyzer-putenv-of-auto-var @opindex Wanalyzer-putenv-of-auto-var @opindex Wno-analyzer-putenv-of-auto-var +@item -Wno-analyzer-putenv-of-auto-var This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-putenv-of-auto-var} to disable it. @@ -10534,9 +10534,9 @@ or an on-stack buffer. See @uref{https://wiki.sei.cmu.edu/confluence/x/6NYxBQ, POS34-C. Do not call putenv() with a pointer to an automatic variable as the argument}. -@item -Wno-analyzer-shift-count-negative @opindex Wanalyzer-shift-count-negative @opindex Wno-analyzer-shift-count-negative +@item -Wno-analyzer-shift-count-negative This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-shift-count-negative} to disable it. @@ -10548,9 +10548,9 @@ interprocedural paths, rather than merely parsing the syntax tree. However, the analyzer does not prioritize detection of such paths, so false negatives are more likely relative to other warnings. -@item -Wno-analyzer-shift-count-overflow @opindex Wanalyzer-shift-count-overflow @opindex Wno-analyzer-shift-count-overflow +@item -Wno-analyzer-shift-count-overflow This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-shift-count-overflow} to disable it. @@ -10563,9 +10563,9 @@ interprocedural paths, rather than merely parsing the syntax tree. However, the analyzer does not prioritize detection of such paths, so false negatives are more likely relative to other warnings. -@item -Wno-analyzer-stale-setjmp-buffer @opindex Wanalyzer-stale-setjmp-buffer @opindex Wno-analyzer-stale-setjmp-buffer +@item -Wno-analyzer-stale-setjmp-buffer This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-stale-setjmp-buffer} to disable it. @@ -10579,9 +10579,9 @@ when the function containing the @code{setjmp} call returns. Attempting to rewind to it via @code{longjmp} would reference a stack frame that no longer exists, and likely lead to a crash (or worse). -@item -Wno-analyzer-tainted-allocation-size @opindex Wanalyzer-tainted-allocation-size @opindex Wno-analyzer-tainted-allocation-size +@item -Wno-analyzer-tainted-allocation-size This warning requires both @option{-fanalyzer} and @option{-fanalyzer-checker=taint} to enable it; use @option{-Wno-analyzer-tainted-allocation-size} to disable it. @@ -10594,9 +10594,9 @@ of service attack. See @uref{https://cwe.mitre.org/data/definitions/789.html, CWE-789: Memory Allocation with Excessive Size Value}. -@item -Wno-analyzer-tainted-assertion @opindex Wanalyzer-tainted-assertion @opindex Wno-analyzer-tainted-assertion +@item -Wno-analyzer-tainted-assertion This warning requires both @option{-fanalyzer} and @option{-fanalyzer-checker=taint} to enable it; @@ -10657,9 +10657,9 @@ default: despite the above not being an assertion failure, strictly speaking. -@item -Wno-analyzer-tainted-array-index @opindex Wanalyzer-tainted-array-index @opindex Wno-analyzer-tainted-array-index +@item -Wno-analyzer-tainted-array-index This warning requires both @option{-fanalyzer} and @option{-fanalyzer-checker=taint} to enable it; use @option{-Wno-analyzer-tainted-array-index} to disable it. @@ -10671,9 +10671,9 @@ could inject an out-of-bounds access. See @uref{https://cwe.mitre.org/data/definitions/129.html, CWE-129: Improper Validation of Array Index}. -@item -Wno-analyzer-tainted-divisor @opindex Wanalyzer-tainted-divisor @opindex Wno-analyzer-tainted-divisor +@item -Wno-analyzer-tainted-divisor This warning requires both @option{-fanalyzer} and @option{-fanalyzer-checker=taint} to enable it; use @option{-Wno-analyzer-tainted-divisor} to disable it. @@ -10685,9 +10685,9 @@ an attacker could inject a division-by-zero. See @uref{https://cwe.mitre.org/data/definitions/369.html, CWE-369: Divide By Zero}. -@item -Wno-analyzer-tainted-offset @opindex Wanalyzer-tainted-offset @opindex Wno-analyzer-tainted-offset +@item -Wno-analyzer-tainted-offset This warning requires both @option{-fanalyzer} and @option{-fanalyzer-checker=taint} to enable it; use @option{-Wno-analyzer-tainted-offset} to disable it. @@ -10699,9 +10699,9 @@ access. See @uref{https://cwe.mitre.org/data/definitions/823.html, CWE-823: Use of Out-of-range Pointer Offset}. -@item -Wno-analyzer-tainted-size @opindex Wanalyzer-tainted-size @opindex Wno-analyzer-tainted-size +@item -Wno-analyzer-tainted-size This warning requires both @option{-fanalyzer} and @option{-fanalyzer-checker=taint} to enable it; use @option{-Wno-analyzer-tainted-size} to disable it. @@ -10713,9 +10713,9 @@ attacker could inject an out-of-bounds access. See @uref{https://cwe.mitre.org/data/definitions/129.html, CWE-129: Improper Validation of Array Index}. -@item -Wno-analyzer-unsafe-call-within-signal-handler @opindex Wanalyzer-unsafe-call-within-signal-handler @opindex Wno-analyzer-unsafe-call-within-signal-handler +@item -Wno-analyzer-unsafe-call-within-signal-handler This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-unsafe-call-within-signal-handler} to disable it. @@ -10725,9 +10725,9 @@ called from a signal handler. See @uref{https://cwe.mitre.org/data/definitions/479.html, CWE-479: Signal Handler Use of a Non-reentrant Function}. -@item -Wno-analyzer-use-after-free @opindex Wanalyzer-use-after-free @opindex Wno-analyzer-use-after-free +@item -Wno-analyzer-use-after-free This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-use-after-free} to disable it. @@ -10737,9 +10737,9 @@ or a deallocator referenced by attribute @code{malloc}. See @uref{https://cwe.mitre.org/data/definitions/416.html, CWE-416: Use After Free}. -@item -Wno-analyzer-use-of-pointer-in-stale-stack-frame @opindex Wanalyzer-use-of-pointer-in-stale-stack-frame @opindex Wno-analyzer-use-of-pointer-in-stale-stack-frame +@item -Wno-analyzer-use-of-pointer-in-stale-stack-frame This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-use-of-pointer-in-stale-stack-frame} to disable it. @@ -10747,9 +10747,9 @@ to disable it. This diagnostic warns for paths through the code in which a pointer is dereferenced that points to a variable in a stale stack frame. -@item -Wno-analyzer-va-arg-type-mismatch @opindex Wanalyzer-va-arg-type-mismatch @opindex Wno-analyzer-va-arg-type-mismatch +@item -Wno-analyzer-va-arg-type-mismatch This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-va-arg-type-mismatch} to disable it. @@ -10761,9 +10761,9 @@ the expression passed to the call. See @uref{https://cwe.mitre.org/data/definitions/686.html, CWE-686: Function Call With Incorrect Argument Type}. -@item -Wno-analyzer-va-list-exhausted @opindex Wanalyzer-va-list-exhausted @opindex Wno-analyzer-va-list-exhausted +@item -Wno-analyzer-va-list-exhausted This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-va-list-exhausted} to disable it. @@ -10775,9 +10775,9 @@ value passed to a variadic call, but all of the values in the See @uref{https://cwe.mitre.org/data/definitions/685.html, CWE-685: Function Call With Incorrect Number of Arguments}. -@item -Wno-analyzer-va-list-leak @opindex Wanalyzer-va-list-leak @opindex Wno-analyzer-va-list-leak +@item -Wno-analyzer-va-list-leak This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-va-list-leak} to disable it. @@ -10786,9 +10786,9 @@ This diagnostic warns for interprocedural paths through the code for which the analyzer detects that @code{va_start} or @code{va_copy} has been called on a @code{va_list} without a corresponding call to @code{va_end}. -@item -Wno-analyzer-va-list-use-after-va-end @opindex Wanalyzer-va-list-use-after-va-end @opindex Wno-analyzer-va-list-use-after-va-end +@item -Wno-analyzer-va-list-use-after-va-end This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-va-list-use-after-va-end} to disable it. @@ -10798,9 +10798,9 @@ the analyzer detects an attempt to use a @code{va_list} after @code{va_end} has been called on it. @code{va_list}. -@item -Wno-analyzer-write-to-const @opindex Wanalyzer-write-to-const @opindex Wno-analyzer-write-to-const +@item -Wno-analyzer-write-to-const This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-write-to-const} to disable it. @@ -10810,9 +10810,9 @@ detects an attempt to write through a pointer to a @code{const} object. However, the analyzer does not prioritize detection of such paths, so false negatives are more likely relative to other warnings. -@item -Wno-analyzer-write-to-string-literal @opindex Wanalyzer-write-to-string-literal @opindex Wno-analyzer-write-to-string-literal +@item -Wno-analyzer-write-to-string-literal This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-write-to-string-literal} to disable it. @@ -10822,9 +10822,9 @@ detects an attempt to write through a pointer to a string literal. However, the analyzer does not prioritize detection of such paths, so false negatives are more likely relative to other warnings. -@item -Wno-analyzer-use-of-uninitialized-value @opindex Wanalyzer-use-of-uninitialized-value @opindex Wno-analyzer-use-of-uninitialized-value +@item -Wno-analyzer-use-of-uninitialized-value This warning requires @option{-fanalyzer}, which enables it; use @option{-Wno-analyzer-use-of-uninitialized-value} to disable it. @@ -10932,9 +10932,9 @@ The following options control the analyzer. @table @gcctabopt -@item -fanalyzer-call-summaries @opindex fanalyzer-call-summaries @opindex fno-analyzer-call-summaries +@item -fanalyzer-call-summaries Simplify interprocedural analysis by computing the effect of certain calls, rather than exploring all paths through the function from callsite to each possible return. @@ -10943,8 +10943,8 @@ If enabled, call summaries are only used for functions with more than one call site, and that are sufficiently complicated (as per @option{--param analyzer-min-snodes-for-call-summary=@var{value}}). -@item -fanalyzer-checker=@var{name} @opindex fanalyzer-checker +@item -fanalyzer-checker=@var{name} Restrict the analyzer to run just the named checker, and enable it. Some checkers are disabled by default (even with @option{-fanalyzer}), @@ -10979,9 +10979,9 @@ following warnings from @option{-fanalyzer}: -Wanalyzer-va-list-use-after-va-end @gol } -@item -fno-analyzer-feasibility @opindex fanalyzer-feasibility @opindex fno-analyzer-feasibility +@item -fno-analyzer-feasibility This option is intended for analyzer developers. By default the analyzer verifies that there is a feasible control flow path @@ -10990,9 +10990,9 @@ exclusive. Diagnostics for which no feasible path can be found are rejected. This filtering can be suppressed with @option{-fno-analyzer-feasibility}, for debugging issues in this code. -@item -fanalyzer-fine-grained @opindex fanalyzer-fine-grained @opindex fno-analyzer-fine-grained +@item -fanalyzer-fine-grained This option is intended for analyzer developers. Internally the analyzer builds an ``exploded graph'' that combines @@ -11002,17 +11002,17 @@ By default, an edge in this graph can contain the effects of a run of multiple statements within a basic block. With @option{-fanalyzer-fine-grained}, each statement gets its own edge. -@item -fanalyzer-show-duplicate-count @opindex fanalyzer-show-duplicate-count @opindex fno-analyzer-show-duplicate-count +@item -fanalyzer-show-duplicate-count This option is intended for analyzer developers: if multiple diagnostics have been detected as being duplicates of each other, it emits a note when reporting the best diagnostic, giving the number of additional diagnostics that were suppressed by the deduplication logic. -@item -fno-analyzer-state-merge @opindex fanalyzer-state-merge @opindex fno-analyzer-state-merge +@item -fno-analyzer-state-merge This option is intended for analyzer developers. By default the analyzer attempts to simplify analysis by merging @@ -11020,9 +11020,9 @@ sufficiently similar states at each program point as it builds its ``exploded graph''. With @option{-fno-analyzer-state-merge} this merging can be suppressed, for debugging state-handling issues. -@item -fno-analyzer-state-purge @opindex fanalyzer-state-purge @opindex fno-analyzer-state-purge +@item -fno-analyzer-state-purge This option is intended for analyzer developers. By default the analyzer attempts to simplify analysis by purging @@ -11057,14 +11057,14 @@ continue to explore such paths even after such diagnostics, which may be helpful for debugging issues in the analyzer, or for microbenchmarks for detecting undefined behavior. -@item -fanalyzer-transitivity @opindex fanalyzer-transitivity @opindex fno-analyzer-transitivity +@item -fanalyzer-transitivity This option enables transitivity of constraints within the analyzer. -@item -fno-analyzer-undo-inlining @opindex fanalyzer-undo-inlining @opindex fno-analyzer-undo-inlining +@item -fno-analyzer-undo-inlining This option is intended for analyzer developers. @option{-fanalyzer} runs relatively late compared to other code analysis @@ -11125,72 +11125,72 @@ other events intended for debugging the analyzer. @end table -@item -fdump-analyzer @opindex fdump-analyzer +@item -fdump-analyzer Dump internal details about what the analyzer is doing to @file{@var{file}.analyzer.txt}. This option is overridden by @option{-fdump-analyzer-stderr}. -@item -fdump-analyzer-stderr @opindex fdump-analyzer-stderr +@item -fdump-analyzer-stderr Dump internal details about what the analyzer is doing to stderr. This option overrides @option{-fdump-analyzer}. -@item -fdump-analyzer-callgraph @opindex fdump-analyzer-callgraph +@item -fdump-analyzer-callgraph Dump a representation of the call graph suitable for viewing with GraphViz to @file{@var{file}.callgraph.dot}. -@item -fdump-analyzer-exploded-graph @opindex fdump-analyzer-exploded-graph +@item -fdump-analyzer-exploded-graph Dump a representation of the ``exploded graph'' suitable for viewing with GraphViz to @file{@var{file}.eg.dot}. Nodes are color-coded based on state-machine states to emphasize state changes. -@item -fdump-analyzer-exploded-nodes @opindex dump-analyzer-exploded-nodes +@item -fdump-analyzer-exploded-nodes Emit diagnostics showing where nodes in the ``exploded graph'' are in relation to the program source. -@item -fdump-analyzer-exploded-nodes-2 @opindex dump-analyzer-exploded-nodes-2 +@item -fdump-analyzer-exploded-nodes-2 Dump a textual representation of the ``exploded graph'' to @file{@var{file}.eg.txt}. -@item -fdump-analyzer-exploded-nodes-3 @opindex dump-analyzer-exploded-nodes-3 +@item -fdump-analyzer-exploded-nodes-3 Dump a textual representation of the ``exploded graph'' to one dump file per node, to @file{@var{file}.eg-@var{id}.txt}. This is typically a large number of dump files. -@item -fdump-analyzer-exploded-paths @opindex fdump-analyzer-exploded-paths +@item -fdump-analyzer-exploded-paths Dump a textual representation of the ``exploded path'' for each diagnostic to @file{@var{file}.@var{idx}.@var{kind}.epath.txt}. -@item -fdump-analyzer-feasibility @opindex dump-analyzer-feasibility +@item -fdump-analyzer-feasibility Dump internal details about the analyzer's search for feasible paths. The details are written in a form suitable for viewing with GraphViz to filenames of the form @file{@var{file}.*.fg.dot}, @file{@var{file}.*.tg.dot}, and @file{@var{file}.*.fpath.txt}. -@item -fdump-analyzer-json @opindex fdump-analyzer-json +@item -fdump-analyzer-json Dump a compressed JSON representation of analyzer internals to @file{@var{file}.analyzer.json.gz}. The precise format is subject to change. -@item -fdump-analyzer-state-purge @opindex fdump-analyzer-state-purge +@item -fdump-analyzer-state-purge As per @option{-fdump-analyzer-supergraph}, dump a representation of the ``supergraph'' suitable for viewing with GraphViz, but annotate the graph with information on what state will be purged at each node. The graph is written to @file{@var{file}.state-purge.dot}. -@item -fdump-analyzer-supergraph @opindex fdump-analyzer-supergraph +@item -fdump-analyzer-supergraph Dump representations of the ``supergraph'' suitable for viewing with GraphViz to @file{@var{file}.supergraph.dot} and to @file{@var{file}.supergraph-eg.dot}. These show all of the @@ -11198,8 +11198,8 @@ control flow graphs in the program, with interprocedural edges for calls and returns. The second dump contains annotations showing nodes in the ``exploded graph'' and diagnostics associated with them. -@item -fdump-analyzer-untracked @opindex fdump-analyzer-untracked +@item -fdump-analyzer-untracked Emit custom warnings with internal details intended for analyzer developers. @end table @@ -11231,8 +11231,8 @@ information useful for debugging do not run at all, so that @option{-Og} may result in a better debugging experience. @table @gcctabopt -@item -g @opindex g +@item -g Produce debugging information in the operating system's native format (stabs, COFF, XCOFF, or DWARF)@. GDB can work with this debugging information. @@ -11243,16 +11243,16 @@ makes debugging work better in GDB but probably makes other debuggers crash or refuse to read the program. If you want to control for certain whether to generate the extra information, use @option{-gvms} (see below). -@item -ggdb @opindex ggdb +@item -ggdb Produce debugging information for use by GDB@. This means to use the most expressive format available (DWARF, stabs, or the native format if neither of those are supported), including GDB extensions if at all possible. +@opindex gdwarf @item -gdwarf @itemx -gdwarf-@var{version} -@opindex gdwarf Produce debugging information in DWARF format (if that is supported). The value of @var{version} may be either 2, 3, 4 or 5; the default version for most targets is 5 (with the exception of VxWorks, TPF and @@ -11271,16 +11271,16 @@ other DWARF-related options such as @option{-fno-dwarf2-cfi-asm}) retain a reference to DWARF Version 2 in their names, but apply to all currently-supported versions of DWARF. -@item -gbtf @opindex gbtf +@item -gbtf Request BTF debug information. BTF is the default debugging format for the eBPF target. On other targets, like x86, BTF debug information can be generated along with DWARF debug information when both of the debug formats are enabled explicitly via their respective command line options. +@opindex gctf @item -gctf @itemx -gctf@var{level} -@opindex gctf Request CTF debug information and use level to specify how much CTF debug information should be produced. If @option{-gctf} is specified without a value for level, the default level of CTF debug information is 2. @@ -11298,8 +11298,8 @@ information, but does not include type information. Level 2 produces type information for entities (functions, data objects etc.) at file-scope or global-scope only. -@item -gvms @opindex gvms +@item -gvms Produce debugging information in Alpha/VMS debug format (if that is supported). This is the format used by DEBUG on Alpha/VMS systems. @@ -11329,14 +11329,14 @@ confusion with @option{-gdwarf-@var{level}}. Instead use an additional @option{-g@var{level}} option to change the debug level for DWARF. -@item -fno-eliminate-unused-debug-symbols @opindex feliminate-unused-debug-symbols @opindex fno-eliminate-unused-debug-symbols +@item -fno-eliminate-unused-debug-symbols By default, no debug information is produced for symbols that are not actually used. Use this option if you want debug information for all symbols. -@item -femit-class-debug-always @opindex femit-class-debug-always +@item -femit-class-debug-always Instead of emitting debugging information for a C++ class in only one object file, emit it in all object files using the class. This option should be used only with debuggers that are unable to handle the way GCC @@ -11344,17 +11344,17 @@ normally emits debugging information for classes because using this option increases the size of debugging information by as much as a factor of two. -@item -fno-merge-debug-strings @opindex fmerge-debug-strings @opindex fno-merge-debug-strings +@item -fno-merge-debug-strings Direct the linker to not merge together strings in the debugging information that are identical in different object files. Merging is not supported by all assemblers or linkers. Merging decreases the size of the debug information in the output file at the cost of increasing link processing time. Merging is enabled by default. -@item -fdebug-prefix-map=@var{old}=@var{new} @opindex fdebug-prefix-map +@item -fdebug-prefix-map=@var{old}=@var{new} When compiling files residing in directory @file{@var{old}}, record debugging information describing them as if the files resided in directory @file{@var{new}} instead. This can be used to replace a @@ -11364,8 +11364,8 @@ also be used to change an absolute path to a relative path by using are location independent, but may require an extra command to tell GDB where to find the source files. See also @option{-ffile-prefix-map}. -@item -fvar-tracking @opindex fvar-tracking +@item -fvar-tracking Run variable tracking pass. It computes where variables are stored at each position in code. Better debugging information is then generated (if the debugging information format supports this information). @@ -11374,9 +11374,9 @@ It is enabled by default when compiling with optimization (@option{-Os}, @option{-O}, @option{-O2}, @dots{}), debugging information (@option{-g}) and the debug info format supports it. -@item -fvar-tracking-assignments @opindex fvar-tracking-assignments @opindex fno-var-tracking-assignments +@item -fvar-tracking-assignments Annotate assignments to user variables early in the compilation and attempt to carry the annotations over throughout the compilation all the way to the end, in an attempt to improve debug information while @@ -11387,18 +11387,18 @@ annotations are created and maintained, but discarded at the end. By default, this flag is enabled together with @option{-fvar-tracking}, except when selective scheduling is enabled. -@item -gsplit-dwarf @opindex gsplit-dwarf +@item -gsplit-dwarf If DWARF debugging information is enabled, separate as much debugging information as possible into a separate output file with the extension @file{.dwo}. This option allows the build system to avoid linking files with debug information. To be useful, this option requires a debugger capable of reading @file{.dwo} files. -@item -gdwarf32 -@itemx -gdwarf64 @opindex gdwarf32 @opindex gdwarf64 +@item -gdwarf32 +@itemx -gdwarf64 If DWARF debugging information is enabled, the @option{-gdwarf32} selects the 32-bit DWARF format and the @option{-gdwarf64} selects the 64-bit DWARF format. The default is target specific, on most targets it is @@ -11407,25 +11407,25 @@ can't support more than 2GiB of debug information in any of the DWARF debug information sections. The 64-bit DWARF format allows larger debug information and might not be well supported by all consumers yet. -@item -gdescribe-dies @opindex gdescribe-dies +@item -gdescribe-dies Add description attributes to some DWARF DIEs that have no name attribute, such as artificial variables, external references and call site parameter DIEs. -@item -gpubnames @opindex gpubnames +@item -gpubnames Generate DWARF @code{.debug_pubnames} and @code{.debug_pubtypes} sections. -@item -ggnu-pubnames @opindex ggnu-pubnames +@item -ggnu-pubnames Generate @code{.debug_pubnames} and @code{.debug_pubtypes} sections in a format suitable for conversion into a GDB@ index. This option is only useful with a linker that can produce GDB@ index version 7. -@item -fdebug-types-section @opindex fdebug-types-section @opindex fno-debug-types-section +@item -fdebug-types-section When using DWARF Version 4 or higher, type DIEs can be put into their own @code{.debug_types} section instead of making them part of the @code{.debug_info} section. It is more efficient to put them in a separate @@ -11434,10 +11434,10 @@ But not all DWARF consumers support @code{.debug_types} sections yet and on some objects @code{.debug_types} produces larger instead of smaller debugging information. -@item -grecord-gcc-switches -@itemx -gno-record-gcc-switches @opindex grecord-gcc-switches @opindex gno-record-gcc-switches +@item -grecord-gcc-switches +@itemx -gno-record-gcc-switches This switch causes the command-line options used to invoke the compiler that may affect code generation to be appended to the DW_AT_producer attribute in DWARF debugging information. The options @@ -11447,19 +11447,19 @@ It is enabled by default. See also @option{-frecord-gcc-switches} for another way of storing compiler options into the object file. -@item -gstrict-dwarf @opindex gstrict-dwarf +@item -gstrict-dwarf Disallow using extensions of later DWARF standard version than selected with @option{-gdwarf-@var{version}}. On most targets using non-conflicting DWARF extensions from later standard versions is allowed. -@item -gno-strict-dwarf @opindex gno-strict-dwarf +@item -gno-strict-dwarf Allow using extensions of later DWARF standard version than selected with @option{-gdwarf-@var{version}}. -@item -gas-loc-support @opindex gas-loc-support +@item -gas-loc-support Inform the compiler that the assembler supports @code{.loc} directives. It may then use them for the assembler to generate DWARF2+ line number tables. @@ -11471,13 +11471,13 @@ itself. This option will be enabled by default if, at GCC configure time, the assembler was found to support such directives. -@item -gno-as-loc-support @opindex gno-as-loc-support +@item -gno-as-loc-support Force GCC to generate DWARF2+ line number tables internally, if DWARF2+ line number tables are to be generated. -@item -gas-locview-support @opindex gas-locview-support +@item -gas-locview-support Inform the compiler that the assembler supports @code{view} assignment and reset assertion checking in @code{.loc} directives. @@ -11488,18 +11488,18 @@ assembler was found to support them. Force GCC to assign view numbers internally, if @option{-gvariable-location-views} are explicitly requested. -@item -gcolumn-info -@itemx -gno-column-info @opindex gcolumn-info @opindex gno-column-info +@item -gcolumn-info +@itemx -gno-column-info Emit location column information into DWARF debugging information, rather than just file and line. This option is enabled by default. -@item -gstatement-frontiers -@itemx -gno-statement-frontiers @opindex gstatement-frontiers @opindex gno-statement-frontiers +@item -gstatement-frontiers +@itemx -gno-statement-frontiers This option causes GCC to create markers in the internal representation at the beginning of statements, and to keep them roughly in place throughout compilation, using them to guide the output of @code{is_stmt} @@ -11507,12 +11507,12 @@ markers in the line number table. This is enabled by default when compiling with optimization (@option{-Os}, @option{-O1}, @option{-O2}, @dots{}), and outputting DWARF 2 debug information at the normal level. -@item -gvariable-location-views -@itemx -gvariable-location-views=incompat5 -@itemx -gno-variable-location-views @opindex gvariable-location-views @opindex gvariable-location-views=incompat5 @opindex gno-variable-location-views +@item -gvariable-location-views +@itemx -gvariable-location-views=incompat5 +@itemx -gno-variable-location-views Augment variable location lists with progressive view numbers implied from the line number table. This enables debug information consumers to inspect state at certain points of the program, even if no instructions @@ -11541,10 +11541,10 @@ implementation of the proposed representation. Debug information consumers are not expected to support this extended format, and they would be rendered unable to decode location lists using it. -@item -ginternal-reset-location-views -@itemx -gno-internal-reset-location-views @opindex ginternal-reset-location-views @opindex gno-internal-reset-location-views +@item -ginternal-reset-location-views +@itemx -gno-internal-reset-location-views Attempt to determine location views that can be omitted from location view lists. This requires the compiler to have very accurate insn length estimates, which isn't always the case, and it may cause @@ -11553,10 +11553,10 @@ that does not support location view lists. The GNU assembler will flag any such error as a @code{view number mismatch}. This is only enabled on ports that define a reliable estimation function. -@item -ginline-points -@itemx -gno-inline-points @opindex ginline-points @opindex gno-inline-points +@item -ginline-points +@itemx -gno-inline-points Generate extended debug information for inlined functions. Location view tracking markers are inserted at inlined entry points, so that address and view numbers can be computed and output in debug @@ -11565,8 +11565,8 @@ which case the view numbers won't be output, but it can only be enabled along with statement frontiers, and it is only enabled by default if location views are enabled. -@item -gz@r{[}=@var{type}@r{]} @opindex gz +@item -gz@r{[}=@var{type}@r{]} Produce compressed debug sections in DWARF format, if that is supported. If @var{type} is not given, the default type depends on the capabilities of the assembler and linker used. @var{type} may be one of @@ -11576,8 +11576,8 @@ compressed debug sections, the option is rejected. Otherwise, if the assembler does not support them, @option{-gz} is silently ignored when producing object files. -@item -femit-struct-debug-baseonly @opindex femit-struct-debug-baseonly +@item -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. @@ -11589,8 +11589,8 @@ See @option{-femit-struct-debug-detailed} for more detailed control. This option works only with DWARF debug output. -@item -femit-struct-debug-reduced @opindex femit-struct-debug-reduced +@item -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, @@ -11603,8 +11603,8 @@ See @option{-femit-struct-debug-detailed} for more detailed control. This option works only with DWARF debug output. -@item -femit-struct-debug-detailed@r{[}=@var{spec-list}@r{]} @opindex femit-struct-debug-detailed +@item -femit-struct-debug-detailed@r{[}=@var{spec-list}@r{]} Specify the struct-like types for which the compiler generates debug information. The intent is to reduce duplicate struct debug information @@ -11651,15 +11651,15 @@ The default is @option{-femit-struct-debug-detailed=all}. This option works only with DWARF debug output. -@item -fno-dwarf2-cfi-asm @opindex fdwarf2-cfi-asm @opindex fno-dwarf2-cfi-asm +@item -fno-dwarf2-cfi-asm Emit DWARF unwind info as compiler generated @code{.eh_frame} section instead of using GAS @code{.cfi_*} directives. -@item -fno-eliminate-unused-debug-types @opindex feliminate-unused-debug-types @opindex fno-eliminate-unused-debug-types +@item -fno-eliminate-unused-debug-types Normally, when producing DWARF output, GCC avoids producing debug symbol output for types that are nowhere used in the source file being compiled. Sometimes it is useful to have GCC emit debugging @@ -11710,10 +11710,10 @@ to find out the exact set of optimizations that are enabled at each level. @xref{Overall Options}, for examples. @table @gcctabopt -@item -O -@itemx -O1 @opindex O @opindex O1 +@item -O +@itemx -O1 Optimize. Optimizing compilation takes somewhat more time, and a lot more memory for a large function. @@ -11776,8 +11776,8 @@ compilation time. -ftree-ter @gol -funit-at-a-time} -@item -O2 @opindex O2 +@item -O2 Optimize even more. GCC performs nearly all supported optimizations that do not involve a space-speed tradeoff. As compared to @option{-O}, this option increases both compilation time @@ -11829,8 +11829,8 @@ also turns on the following optimization flags: Please note the warning under @option{-fgcse} about invoking @option{-O2} on programs that use computed gotos. -@item -O3 @opindex O3 +@item -O3 Optimize yet more. @option{-O3} turns on all optimizations specified by @option{-O2} and also turns on the following optimization flags: @@ -11849,13 +11849,13 @@ by @option{-O2} and also turns on the following optimization flags: -fvect-cost-model=dynamic @gol -fversion-loops-for-strides} -@item -O0 @opindex O0 +@item -O0 Reduce compilation time and make debugging produce the expected results. This is the default. -@item -Os @opindex Os +@item -Os Optimize for size. @option{-Os} enables all @option{-O2} optimizations except those that often increase code size: @@ -11867,8 +11867,8 @@ It also enables @option{-finline-functions}, causes the compiler to tune for code size rather than execution speed, and performs further optimizations designed to reduce code size. -@item -Ofast @opindex Ofast +@item -Ofast Disregard strict standards compliance. @option{-Ofast} enables all @option{-O3} optimizations. It also enables optimizations that are not valid for all standard-compliant programs. @@ -11877,8 +11877,8 @@ and the Fortran-specific @option{-fstack-arrays}, unless @option{-fmax-stack-var-size} is specified, and @option{-fno-protect-parens}. It turns off @option{-fsemantic-interposition}. -@item -Og @opindex Og +@item -Og Optimize debugging experience. @option{-Og} should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation @@ -11897,8 +11897,8 @@ optimization flags except for those that may interfere with debugging: -fmove-loop-invariants -fmove-loop-stores -fssa-phiopt @gol -ftree-bit-ccp -ftree-dse -ftree-pta -ftree-sra} -@item -Oz @opindex Oz +@item -Oz Optimize aggressively for size rather than speed. This may increase the number of instructions executed if those instructions require fewer bytes to encode. @option{-Oz} behaves similarly to @option{-Os} @@ -11922,17 +11922,17 @@ can use the following flags in the rare cases when ``fine-tuning'' of optimizations to be performed is desired. @table @gcctabopt -@item -fno-defer-pop @opindex fno-defer-pop @opindex fdefer-pop +@item -fno-defer-pop For machines that must pop arguments after a function call, always pop the arguments as soon as each function returns. At levels @option{-O1} and higher, @option{-fdefer-pop} is the default; this allows the compiler to let arguments accumulate on the stack for several function calls and pop them all at once. -@item -fforward-propagate @opindex fforward-propagate +@item -fforward-propagate Perform a forward propagation pass on RTL@. The pass tries to combine two instructions and checks if the result can be simplified. If loop unrolling is active, two passes are performed and the second is scheduled after @@ -11941,8 +11941,8 @@ loop unrolling. This option is enabled by default at optimization levels @option{-O1}, @option{-O2}, @option{-O3}, @option{-Os}. -@item -ffp-contract=@var{style} @opindex ffp-contract +@item -ffp-contract=@var{style} @option{-ffp-contract=off} disables floating-point expression contraction. @option{-ffp-contract=fast} enables floating-point expression contraction such as forming of fused multiply-add operations if the target has @@ -11953,8 +11953,8 @@ and treated equal to @option{-ffp-contract=off}. The default is @option{-ffp-contract=fast}. -@item -fomit-frame-pointer @opindex fomit-frame-pointer +@item -fomit-frame-pointer Omit the frame pointer in functions that don't need one. This avoids the instructions to save, set up and restore the frame pointer; on many targets it also makes an extra register available. @@ -11968,23 +11968,23 @@ leaf functions. Enabled by default at @option{-O1} and higher. -@item -foptimize-sibling-calls @opindex foptimize-sibling-calls +@item -foptimize-sibling-calls Optimize sibling and tail recursive calls. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -foptimize-strlen @opindex foptimize-strlen +@item -foptimize-strlen Optimize various standard C string functions (e.g.@: @code{strlen}, @code{strchr} or @code{strcpy}) and their @code{_FORTIFY_SOURCE} counterparts into faster alternatives. Enabled at levels @option{-O2}, @option{-O3}. -@item -fno-inline @opindex fno-inline @opindex finline +@item -fno-inline Do not expand any functions inline apart from those marked with the @code{always_inline} attribute. This is the default when not optimizing. @@ -11992,8 +11992,8 @@ optimizing. Single functions can be exempted from inlining by marking them with the @code{noinline} attribute. -@item -finline-small-functions @opindex finline-small-functions +@item -finline-small-functions Integrate functions into their callers when their body is smaller than expected function call code (so overall size of program gets smaller). The compiler heuristically decides which functions are simple enough to be worth integrating @@ -12002,8 +12002,8 @@ inline. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -findirect-inlining @opindex findirect-inlining +@item -findirect-inlining Inline also indirect calls that are discovered to be known at compile time thanks to previous inlining. This option has any effect only when inlining itself is turned on by the @option{-finline-functions} @@ -12011,8 +12011,8 @@ or @option{-finline-small-functions} options. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -finline-functions @opindex finline-functions +@item -finline-functions Consider all functions for inlining, even if they are not declared inline. The compiler heuristically decides which functions are worth integrating in this way. @@ -12024,8 +12024,8 @@ assembler code in its own right. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. Also enabled by @option{-fprofile-use} and @option{-fauto-profile}. -@item -finline-functions-called-once @opindex finline-functions-called-once +@item -finline-functions-called-once Consider all @code{static} functions called once for inlining into their caller even if they are not marked @code{inline}. If a call to a given function is integrated, then the function is not output as assembler code @@ -12034,8 +12034,8 @@ in its own right. Enabled at levels @option{-O1}, @option{-O2}, @option{-O3} and @option{-Os}, but not @option{-Og}. -@item -fearly-inlining @opindex fearly-inlining +@item -fearly-inlining Inline functions marked by @code{always_inline} and functions whose body seems smaller than the function call overhead early before doing @option{-fprofile-generate} instrumentation and real inlining pass. Doing so @@ -12044,16 +12044,16 @@ having large chains of nested wrapper functions. Enabled by default. -@item -fipa-sra @opindex fipa-sra +@item -fipa-sra Perform interprocedural scalar replacement of aggregates, removal of unused parameters and replacement of parameters passed by reference by parameters passed by value. Enabled at levels @option{-O2}, @option{-O3} and @option{-Os}. -@item -finline-limit=@var{n} @opindex finline-limit +@item -finline-limit=@var{n} By default, GCC limits the size of functions that can be inlined. This flag allows coarse control of this limit. @var{n} is the size of functions that can be inlined in number of pseudo instructions. @@ -12081,29 +12081,29 @@ abstract measurement of function's size. In no way does it represent a count of assembly instructions and as such its exact meaning might change from one release to an another. -@item -fno-keep-inline-dllexport @opindex fno-keep-inline-dllexport @opindex fkeep-inline-dllexport +@item -fno-keep-inline-dllexport This is a more fine-grained version of @option{-fkeep-inline-functions}, which applies only to functions that are declared using the @code{dllexport} attribute or declspec. @xref{Function Attributes,,Declaring Attributes of Functions}. -@item -fkeep-inline-functions @opindex fkeep-inline-functions +@item -fkeep-inline-functions In C, emit @code{static} functions that are declared @code{inline} into the object file, even if the function has been inlined into all of its callers. This switch does not affect functions using the @code{extern inline} extension in GNU C90@. In C++, emit any and all inline functions into the object file. -@item -fkeep-static-functions @opindex fkeep-static-functions +@item -fkeep-static-functions Emit @code{static} functions into the object file, even if the function is never used. -@item -fkeep-static-consts @opindex fkeep-static-consts +@item -fkeep-static-consts Emit variables declared @code{static const} when optimization isn't turned on, even if the variables aren't referenced. @@ -12111,8 +12111,8 @@ GCC enables this option by default. If you want to force the compiler to check if a variable is referenced, regardless of whether or not optimization is turned on, use the @option{-fno-keep-static-consts} option. -@item -fmerge-constants @opindex fmerge-constants +@item -fmerge-constants Attempt to merge identical constants (string constants and floating-point constants) across compilation units. @@ -12122,8 +12122,8 @@ behavior. Enabled at levels @option{-O1}, @option{-O2}, @option{-O3}, @option{-Os}. -@item -fmerge-all-constants @opindex fmerge-all-constants +@item -fmerge-all-constants Attempt to merge identical constants and identical variables. This option implies @option{-fmerge-constants}. In addition to @@ -12134,23 +12134,23 @@ instances of the same variable in recursive calls, to have distinct locations, so using this option results in non-conforming behavior. -@item -fmodulo-sched @opindex fmodulo-sched +@item -fmodulo-sched Perform swing modulo scheduling immediately before the first scheduling pass. This pass looks at innermost loops and reorders their instructions by overlapping different iterations. -@item -fmodulo-sched-allow-regmoves @opindex fmodulo-sched-allow-regmoves +@item -fmodulo-sched-allow-regmoves Perform more aggressive SMS-based modulo scheduling with register moves allowed. By setting this flag certain anti-dependences edges are deleted, which triggers the generation of reg-moves based on the life-range analysis. This option is effective only with @option{-fmodulo-sched} enabled. -@item -fno-branch-count-reg @opindex fno-branch-count-reg @opindex fbranch-count-reg +@item -fno-branch-count-reg Disable the optimization pass that scans for opportunities to use ``decrement and branch'' instructions on a count register instead of instruction sequences that decrement a register, compare it against zero, and @@ -12163,9 +12163,9 @@ instruction stream introduced by other optimization passes. The default is @option{-fbranch-count-reg} at @option{-O1} and higher, except for @option{-Og}. -@item -fno-function-cse @opindex fno-function-cse @opindex ffunction-cse +@item -fno-function-cse Do not put function addresses in registers; make each instruction that calls a constant function contain the function's address explicitly. @@ -12175,9 +12175,9 @@ performed when this option is not used. The default is @option{-ffunction-cse} -@item -fno-zero-initialized-in-bss @opindex fno-zero-initialized-in-bss @opindex fzero-initialized-in-bss +@item -fno-zero-initialized-in-bss If the target supports a BSS section, GCC by default puts variables that are initialized to zero into BSS@. This can save space in the resulting code. @@ -12189,8 +12189,8 @@ assumptions based on that. The default is @option{-fzero-initialized-in-bss}. -@item -fthread-jumps @opindex fthread-jumps +@item -fthread-jumps Perform optimizations that check to see if a jump branches to a location where another comparison subsumed by the first is found. If so, the first branch is redirected to either the destination of the @@ -12199,8 +12199,8 @@ the condition is known to be true or false. Enabled at levels @option{-O1}, @option{-O2}, @option{-O3}, @option{-Os}. -@item -fsplit-wide-types @opindex fsplit-wide-types +@item -fsplit-wide-types When using a type that occupies multiple registers, such as @code{long long} on a 32-bit system, split the registers apart and allocate them independently. This normally generates better code for those types, @@ -12209,15 +12209,15 @@ but may make debugging more difficult. Enabled at levels @option{-O1}, @option{-O2}, @option{-O3}, @option{-Os}. -@item -fsplit-wide-types-early @opindex fsplit-wide-types-early +@item -fsplit-wide-types-early Fully split wide types early, instead of very late. This option has no effect unless @option{-fsplit-wide-types} is turned on. This is the default on some targets. -@item -fcse-follow-jumps @opindex fcse-follow-jumps +@item -fcse-follow-jumps In common subexpression elimination (CSE), scan through jump instructions when the target of the jump is not reached by any other path. For example, when CSE encounters an @code{if} statement with an @@ -12226,8 +12226,8 @@ tested is false. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -fcse-skip-blocks @opindex fcse-skip-blocks +@item -fcse-skip-blocks This is similar to @option{-fcse-follow-jumps}, but causes CSE to follow jumps that conditionally skip over blocks. When CSE encounters a simple @code{if} statement with no else clause, @@ -12236,15 +12236,15 @@ body of the @code{if}. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -frerun-cse-after-loop @opindex frerun-cse-after-loop +@item -frerun-cse-after-loop Re-run common subexpression elimination after loop optimizations are performed. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -fgcse @opindex fgcse +@item -fgcse Perform a global common subexpression elimination pass. This pass also performs global constant and copy propagation. @@ -12255,8 +12255,8 @@ the global common subexpression elimination pass by adding Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -fgcse-lm @opindex fgcse-lm +@item -fgcse-lm When @option{-fgcse-lm} is enabled, global common subexpression elimination attempts to move loads that are only killed by stores into themselves. This allows a loop containing a load/store sequence to be changed to a load outside @@ -12264,8 +12264,8 @@ the loop, and a copy/store within the loop. Enabled by default when @option{-fgcse} is enabled. -@item -fgcse-sm @opindex fgcse-sm +@item -fgcse-sm When @option{-fgcse-sm} is enabled, a store motion pass is run after global common subexpression elimination. This pass attempts to move stores out of loops. When used in conjunction with @option{-fgcse-lm}, @@ -12274,24 +12274,24 @@ the loop and a store after the loop. Not enabled at any optimization level. -@item -fgcse-las @opindex fgcse-las +@item -fgcse-las When @option{-fgcse-las} is enabled, the global common subexpression elimination pass eliminates redundant loads that come after stores to the same memory location (both partial and full redundancies). Not enabled at any optimization level. -@item -fgcse-after-reload @opindex fgcse-after-reload +@item -fgcse-after-reload When @option{-fgcse-after-reload} is enabled, a redundant load elimination pass is performed after reload. The purpose of this pass is to clean up redundant spilling. Enabled by @option{-O3}, @option{-fprofile-use} and @option{-fauto-profile}. -@item -faggressive-loop-optimizations @opindex faggressive-loop-optimizations +@item -faggressive-loop-optimizations This option tells the loop optimizer to use language constraints to derive bounds for the number of iterations of a loop. This assumes that loop code does not invoke undefined behavior by for example causing signed @@ -12300,39 +12300,39 @@ number of iterations of a loop are used to guide loop unrolling and peeling and loop exit test optimizations. This option is enabled by default. -@item -funconstrained-commons @opindex funconstrained-commons +@item -funconstrained-commons This option tells the compiler that variables declared in common blocks (e.g.@: Fortran) may later be overridden with longer trailing arrays. This prevents certain optimizations that depend on knowing the array bounds. -@item -fcrossjumping @opindex fcrossjumping +@item -fcrossjumping Perform cross-jumping transformation. This transformation unifies equivalent code and saves code size. The resulting code may or may not perform better than without cross-jumping. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -fauto-inc-dec @opindex fauto-inc-dec +@item -fauto-inc-dec Combine increments or decrements of addresses with memory accesses. This pass is always skipped on architectures that do not have instructions to support this. Enabled by default at @option{-O1} and higher on architectures that support this. -@item -fdce @opindex fdce +@item -fdce Perform dead code elimination (DCE) on RTL@. Enabled by default at @option{-O1} and higher. -@item -fdse @opindex fdse +@item -fdse Perform dead store elimination (DSE) on RTL@. Enabled by default at @option{-O1} and higher. -@item -fif-conversion @opindex fif-conversion +@item -fif-conversion Attempt to transform conditional jumps into branch-less equivalents. This includes use of conditional moves, min, max, set flags and abs instructions, and some tricks doable by standard arithmetics. The use of conditional execution @@ -12341,16 +12341,16 @@ on chips where it is available is controlled by @option{-fif-conversion2}. Enabled at levels @option{-O1}, @option{-O2}, @option{-O3}, @option{-Os}, but not with @option{-Og}. -@item -fif-conversion2 @opindex fif-conversion2 +@item -fif-conversion2 Use conditional execution (where available) to transform conditional jumps into branch-less equivalents. Enabled at levels @option{-O1}, @option{-O2}, @option{-O3}, @option{-Os}, but not with @option{-Og}. -@item -fdeclone-ctor-dtor @opindex fdeclone-ctor-dtor +@item -fdeclone-ctor-dtor The C++ ABI requires multiple entry points for constructors and destructors: one for a base subobject, one for a complete object, and one for a virtual destructor that calls operator delete afterwards. @@ -12361,8 +12361,8 @@ implementation. Enabled by @option{-Os}. -@item -fdelete-null-pointer-checks @opindex fdelete-null-pointer-checks +@item -fdelete-null-pointer-checks Assume that programs cannot safely dereference null pointers, and that no code or data element resides at address zero. This option enables simple constant @@ -12383,16 +12383,16 @@ defaults to off. On AVR and MSP430, this option is completely disabled. Passes that use the dataflow information are enabled independently at different optimization levels. -@item -fdevirtualize @opindex fdevirtualize +@item -fdevirtualize Attempt to convert calls to virtual functions to direct calls. This is done both within a procedure and interprocedurally as part of indirect inlining (@option{-findirect-inlining}) and interprocedural constant propagation (@option{-fipa-cp}). Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -fdevirtualize-speculatively @opindex fdevirtualize-speculatively +@item -fdevirtualize-speculatively Attempt to convert calls to virtual functions to speculative direct calls. Based on the analysis of the type inheritance graph, determine for a given call the set of likely targets. If the set is small, preferably of size 1, change @@ -12400,22 +12400,22 @@ the call into a conditional deciding between direct and indirect calls. The speculative calls enable more optimizations, such as inlining. When they seem useless after further optimization, they are converted back into original form. -@item -fdevirtualize-at-ltrans @opindex fdevirtualize-at-ltrans +@item -fdevirtualize-at-ltrans Stream extra information needed for aggressive devirtualization when running the link-time optimizer in local transformation mode. This option enables more devirtualization but significantly increases the size of streamed data. For this reason it is disabled by default. -@item -fexpensive-optimizations @opindex fexpensive-optimizations +@item -fexpensive-optimizations Perform a number of minor optimizations that are relatively expensive. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -free @opindex free +@item -free Attempt to remove redundant extension instructions. This is especially helpful for the x86-64 architecture, which implicitly zero-extends in 64-bit registers after writing to their lower 32-bit half. @@ -12423,9 +12423,9 @@ registers after writing to their lower 32-bit half. Enabled for Alpha, AArch64 and x86 at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -fno-lifetime-dse @opindex fno-lifetime-dse @opindex flifetime-dse +@item -fno-lifetime-dse In C++ the value of an object is only affected by changes within its lifetime: when the constructor begins, the object has an indeterminate value, and any changes during the lifetime of the object are dead when @@ -12439,14 +12439,14 @@ can use @option{-flifetime-dse=1}. The default behavior can be explicitly selected with @option{-flifetime-dse=2}. @option{-flifetime-dse=0} is equivalent to @option{-fno-lifetime-dse}. -@item -flive-range-shrinkage @opindex flive-range-shrinkage +@item -flive-range-shrinkage Attempt to decrease register pressure through register live range shrinkage. This is helpful for fast processors with small or moderate size register sets. -@item -fira-algorithm=@var{algorithm} @opindex fira-algorithm +@item -fira-algorithm=@var{algorithm} Use the specified coloring algorithm for the integrated register allocator. The @var{algorithm} argument can be @samp{priority}, which specifies Chow's priority coloring, or @samp{CB}, which specifies @@ -12454,8 +12454,8 @@ Chaitin-Briggs coloring. Chaitin-Briggs coloring is not implemented for all architectures, but for those targets that do support it, it is the default because it generates better code. -@item -fira-region=@var{region} @opindex fira-region +@item -fira-region=@var{region} Use specified regions for the integrated register allocator. The @var{region} argument should be one of the following: @@ -12480,16 +12480,16 @@ This typically results in the smallest code size, and is enabled by default for @end table -@item -fira-hoist-pressure @opindex fira-hoist-pressure +@item -fira-hoist-pressure Use IRA to evaluate register pressure in the code hoisting pass for decisions to hoist expressions. This option usually results in smaller code, but it can slow the compiler down. This option is enabled at level @option{-Os} for all targets. -@item -fira-loop-pressure @opindex fira-loop-pressure +@item -fira-loop-pressure Use IRA to evaluate register pressure in loops for decisions to move loop invariants. This option usually results in generation of faster and smaller code on machines with large register files (>= 32 @@ -12497,31 +12497,31 @@ registers), but it can slow the compiler down. This option is enabled at level @option{-O3} for some targets. -@item -fno-ira-share-save-slots @opindex fno-ira-share-save-slots @opindex fira-share-save-slots +@item -fno-ira-share-save-slots Disable sharing of stack slots used for saving call-used hard registers living through a call. Each hard register gets a separate stack slot, and as a result function stack frames are larger. -@item -fno-ira-share-spill-slots @opindex fno-ira-share-spill-slots @opindex fira-share-spill-slots +@item -fno-ira-share-spill-slots Disable sharing of stack slots allocated for pseudo-registers. Each pseudo-register that does not get a hard register gets a separate stack slot, and as a result function stack frames are larger. -@item -flra-remat @opindex flra-remat +@item -flra-remat Enable CFG-sensitive rematerialization in LRA. Instead of loading values of spilled pseudos, LRA tries to rematerialize (recalculate) values if it is profitable. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -fdelayed-branch @opindex fdelayed-branch +@item -fdelayed-branch If supported for the target machine, attempt to reorder instructions to exploit instruction slots available after delayed branch instructions. @@ -12529,8 +12529,8 @@ instructions. Enabled at levels @option{-O1}, @option{-O2}, @option{-O3}, @option{-Os}, but not at @option{-Og}. -@item -fschedule-insns @opindex fschedule-insns +@item -fschedule-insns If supported for the target machine, attempt to reorder instructions to eliminate execution stalls due to required data being unavailable. This helps machines that have slow floating point or memory load instructions @@ -12539,8 +12539,8 @@ or floating-point instruction is required. Enabled at levels @option{-O2}, @option{-O3}. -@item -fschedule-insns2 @opindex fschedule-insns2 +@item -fschedule-insns2 Similar to @option{-fschedule-insns}, but requests an additional pass of instruction scheduling after register allocation has been done. This is especially useful on machines with a relatively small number of @@ -12548,22 +12548,22 @@ registers and where memory load instructions take more than one cycle. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -fno-sched-interblock @opindex fno-sched-interblock @opindex fsched-interblock +@item -fno-sched-interblock Disable instruction scheduling across basic blocks, which is normally enabled when scheduling before register allocation, i.e.@: with @option{-fschedule-insns} or at @option{-O2} or higher. -@item -fno-sched-spec @opindex fno-sched-spec @opindex fsched-spec +@item -fno-sched-spec Disable speculative motion of non-load instructions, which is normally enabled when scheduling before register allocation, i.e.@: with @option{-fschedule-insns} or at @option{-O2} or higher. -@item -fsched-pressure @opindex fsched-pressure +@item -fsched-pressure Enable register pressure sensitive insn scheduling before register allocation. This only makes sense when scheduling before register allocation is enabled, i.e.@: with @option{-fschedule-insns} or at @@ -12572,21 +12572,21 @@ generated code and decrease its size by preventing register pressure increase above the number of available hard registers and subsequent spills in register allocation. -@item -fsched-spec-load @opindex fsched-spec-load +@item -fsched-spec-load Allow speculative motion of some load instructions. This only makes sense when scheduling before register allocation, i.e.@: with @option{-fschedule-insns} or at @option{-O2} or higher. -@item -fsched-spec-load-dangerous @opindex fsched-spec-load-dangerous +@item -fsched-spec-load-dangerous Allow speculative motion of more load instructions. This only makes sense when scheduling before register allocation, i.e.@: with @option{-fschedule-insns} or at @option{-O2} or higher. +@opindex fsched-stalled-insns @item -fsched-stalled-insns @itemx -fsched-stalled-insns=@var{n} -@opindex fsched-stalled-insns Define how many insns (if any) can be moved prematurely from the queue of stalled insns into the ready list during the second scheduling pass. @option{-fno-sched-stalled-insns} means that no insns are moved @@ -12595,9 +12595,9 @@ on how many queued insns can be moved prematurely. @option{-fsched-stalled-insns} without a value is equivalent to @option{-fsched-stalled-insns=1}. +@opindex fsched-stalled-insns-dep @item -fsched-stalled-insns-dep @itemx -fsched-stalled-insns-dep=@var{n} -@opindex fsched-stalled-insns-dep Define how many insn groups (cycles) are examined for a dependency on a stalled insn that is a candidate for premature removal from the queue of stalled insns. This has an effect only during the second scheduling pass, @@ -12607,8 +12607,8 @@ and only if @option{-fsched-stalled-insns} is used. @option{-fsched-stalled-insns-dep} without a value is equivalent to @option{-fsched-stalled-insns-dep=1}. -@item -fsched2-use-superblocks @opindex fsched2-use-superblocks +@item -fsched2-use-superblocks When scheduling after register allocation, use superblock scheduling. This allows motion across basic block boundaries, resulting in faster schedules. This option is experimental, as not all machine @@ -12618,81 +12618,81 @@ results from the algorithm. This only makes sense when scheduling after register allocation, i.e.@: with @option{-fschedule-insns2} or at @option{-O2} or higher. -@item -fsched-group-heuristic @opindex fsched-group-heuristic +@item -fsched-group-heuristic Enable the group heuristic in the scheduler. This heuristic favors the instruction that belongs to a schedule group. This is enabled by default when scheduling is enabled, i.e.@: with @option{-fschedule-insns} or @option{-fschedule-insns2} or at @option{-O2} or higher. -@item -fsched-critical-path-heuristic @opindex fsched-critical-path-heuristic +@item -fsched-critical-path-heuristic Enable the critical-path heuristic in the scheduler. This heuristic favors instructions on the critical path. This is enabled by default when scheduling is enabled, i.e.@: with @option{-fschedule-insns} or @option{-fschedule-insns2} or at @option{-O2} or higher. -@item -fsched-spec-insn-heuristic @opindex fsched-spec-insn-heuristic +@item -fsched-spec-insn-heuristic Enable the speculative instruction heuristic in the scheduler. This heuristic favors speculative instructions with greater dependency weakness. This is enabled by default when scheduling is enabled, i.e.@: with @option{-fschedule-insns} or @option{-fschedule-insns2} or at @option{-O2} or higher. -@item -fsched-rank-heuristic @opindex fsched-rank-heuristic +@item -fsched-rank-heuristic Enable the rank heuristic in the scheduler. This heuristic favors the instruction belonging to a basic block with greater size or frequency. This is enabled by default when scheduling is enabled, i.e.@: with @option{-fschedule-insns} or @option{-fschedule-insns2} or at @option{-O2} or higher. -@item -fsched-last-insn-heuristic @opindex fsched-last-insn-heuristic +@item -fsched-last-insn-heuristic Enable the last-instruction heuristic in the scheduler. This heuristic favors the instruction that is less dependent on the last instruction scheduled. This is enabled by default when scheduling is enabled, i.e.@: with @option{-fschedule-insns} or @option{-fschedule-insns2} or at @option{-O2} or higher. -@item -fsched-dep-count-heuristic @opindex fsched-dep-count-heuristic +@item -fsched-dep-count-heuristic Enable the dependent-count heuristic in the scheduler. This heuristic favors the instruction that has more instructions depending on it. This is enabled by default when scheduling is enabled, i.e.@: with @option{-fschedule-insns} or @option{-fschedule-insns2} or at @option{-O2} or higher. -@item -freschedule-modulo-scheduled-loops @opindex freschedule-modulo-scheduled-loops +@item -freschedule-modulo-scheduled-loops Modulo scheduling is performed before traditional scheduling. If a loop is modulo scheduled, later scheduling passes may change its schedule. Use this option to control that behavior. -@item -fselective-scheduling @opindex fselective-scheduling +@item -fselective-scheduling Schedule instructions using selective scheduling algorithm. Selective scheduling runs instead of the first scheduler pass. -@item -fselective-scheduling2 @opindex fselective-scheduling2 +@item -fselective-scheduling2 Schedule instructions using selective scheduling algorithm. Selective scheduling runs instead of the second scheduler pass. -@item -fsel-sched-pipelining @opindex fsel-sched-pipelining +@item -fsel-sched-pipelining Enable software pipelining of innermost loops during selective scheduling. This option has no effect unless one of @option{-fselective-scheduling} or @option{-fselective-scheduling2} is turned on. -@item -fsel-sched-pipelining-outer-loops @opindex fsel-sched-pipelining-outer-loops +@item -fsel-sched-pipelining-outer-loops When pipelining loops during selective scheduling, also pipeline outer loops. This option has no effect unless @option{-fsel-sched-pipelining} is turned on. -@item -fsemantic-interposition @opindex fsemantic-interposition +@item -fsemantic-interposition Some object formats, like ELF, allow interposing of symbols by the dynamic linker. This means that for symbols exported from the DSO, the compiler cannot perform @@ -12709,21 +12709,21 @@ has no effect for functions explicitly declared inline (where it is never allowed for interposition to change semantics) and for symbols explicitly declared weak. -@item -fshrink-wrap @opindex fshrink-wrap +@item -fshrink-wrap Emit function prologues only before parts of the function that need it, rather than at the top of the function. This flag is enabled by default at @option{-O} and higher. -@item -fshrink-wrap-separate @opindex fshrink-wrap-separate +@item -fshrink-wrap-separate Shrink-wrap separate parts of the prologue and epilogue separately, so that those parts are only executed when needed. This option is on by default, but has no effect unless @option{-fshrink-wrap} is also turned on and the target supports this. -@item -fcaller-saves @opindex fcaller-saves +@item -fcaller-saves Enable allocation of values to registers that are clobbered by function calls, by emitting extra instructions to save and restore the registers around such calls. Such allocation is done only when it @@ -12734,15 +12734,15 @@ those which have no call-preserved registers to use instead. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -fcombine-stack-adjustments @opindex fcombine-stack-adjustments +@item -fcombine-stack-adjustments Tracks stack adjustments (pushes and pops) and stack memory references and then tries to find ways to combine them. Enabled by default at @option{-O1} and higher. -@item -fipa-ra @opindex fipa-ra +@item -fipa-ra Use caller save registers for allocation if those registers are not used by any called function. In that case it is not necessary to save and restore them around calls. This is only possible if called functions are part of @@ -12754,97 +12754,97 @@ is disabled if generated code will be instrumented for profiling exactly (this happens on targets that do not expose prologues and epilogues in RTL). -@item -fconserve-stack @opindex fconserve-stack +@item -fconserve-stack Attempt to minimize stack usage. The compiler attempts to use less stack space, even if that makes the program slower. This option implies setting the @option{large-stack-frame} parameter to 100 and the @option{large-stack-frame-growth} parameter to 400. -@item -ftree-reassoc @opindex ftree-reassoc +@item -ftree-reassoc Perform reassociation on trees. This flag is enabled by default at @option{-O1} and higher. -@item -fcode-hoisting @opindex fcode-hoisting +@item -fcode-hoisting Perform code hoisting. Code hoisting tries to move the evaluation of expressions executed on all paths to the function exit as early as possible. This is especially useful as a code size optimization, but it often helps for code speed as well. This flag is enabled by default at @option{-O2} and higher. -@item -ftree-pre @opindex ftree-pre +@item -ftree-pre Perform partial redundancy elimination (PRE) on trees. This flag is enabled by default at @option{-O2} and @option{-O3}. -@item -ftree-partial-pre @opindex ftree-partial-pre +@item -ftree-partial-pre Make partial redundancy elimination (PRE) more aggressive. This flag is enabled by default at @option{-O3}. -@item -ftree-forwprop @opindex ftree-forwprop +@item -ftree-forwprop Perform forward propagation on trees. This flag is enabled by default at @option{-O1} and higher. -@item -ftree-fre @opindex ftree-fre +@item -ftree-fre Perform full redundancy elimination (FRE) on trees. The difference between FRE and PRE is that FRE only considers expressions that are computed on all paths leading to the redundant computation. This analysis is faster than PRE, though it exposes fewer redundancies. This flag is enabled by default at @option{-O1} and higher. -@item -ftree-phiprop @opindex ftree-phiprop +@item -ftree-phiprop Perform hoisting of loads from conditional pointers on trees. This pass is enabled by default at @option{-O1} and higher. -@item -fhoist-adjacent-loads @opindex fhoist-adjacent-loads +@item -fhoist-adjacent-loads Speculatively hoist loads from both branches of an if-then-else if the loads are from adjacent locations in the same structure and the target architecture has a conditional move instruction. This flag is enabled by default at @option{-O2} and higher. -@item -ftree-copy-prop @opindex ftree-copy-prop +@item -ftree-copy-prop Perform copy propagation on trees. This pass eliminates unnecessary copy operations. This flag is enabled by default at @option{-O1} and higher. -@item -fipa-pure-const @opindex fipa-pure-const +@item -fipa-pure-const Discover which functions are pure or constant. Enabled by default at @option{-O1} and higher. -@item -fipa-reference @opindex fipa-reference +@item -fipa-reference Discover which static variables do not escape the compilation unit. Enabled by default at @option{-O1} and higher. -@item -fipa-reference-addressable @opindex fipa-reference-addressable +@item -fipa-reference-addressable Discover read-only, write-only and non-addressable static variables. Enabled by default at @option{-O1} and higher. -@item -fipa-stack-alignment @opindex fipa-stack-alignment +@item -fipa-stack-alignment Reduce stack alignment on call sites if possible. Enabled by default. -@item -fipa-pta @opindex fipa-pta +@item -fipa-pta Perform interprocedural pointer analysis and interprocedural modification and reference analysis. This option can cause excessive memory and compile-time usage on large compilation units. It is not enabled by default at any optimization level. -@item -fipa-profile @opindex fipa-profile +@item -fipa-profile Perform interprocedural profile propagation. The functions called only from cold functions are marked as cold. Also functions executed once (such as @code{cold}, @code{noreturn}, static constructors or destructors) are @@ -12852,15 +12852,15 @@ identified. Cold functions and loop less parts of functions executed once are then optimized for size. Enabled by default at @option{-O1} and higher. -@item -fipa-modref @opindex fipa-modref +@item -fipa-modref Perform interprocedural mod/ref analysis. This optimization analyzes the side effects of functions (memory locations that are modified or referenced) and enables better optimization across the function call boundary. This flag is enabled by default at @option{-O1} and higher. -@item -fipa-cp @opindex fipa-cp +@item -fipa-cp Perform interprocedural constant propagation. This optimization analyzes the program to determine when values passed to functions are constants and then optimizes accordingly. @@ -12869,8 +12869,8 @@ if the application has constants passed to functions. This flag is enabled by default at @option{-O2}, @option{-Os} and @option{-O3}. It is also enabled by @option{-fprofile-use} and @option{-fauto-profile}. -@item -fipa-cp-clone @opindex fipa-cp-clone +@item -fipa-cp-clone Perform function cloning to make interprocedural constant propagation stronger. When enabled, interprocedural constant propagation performs function cloning when externally visible function can be called with constant arguments. @@ -12880,21 +12880,21 @@ it may significantly increase code size This flag is enabled by default at @option{-O3}. It is also enabled by @option{-fprofile-use} and @option{-fauto-profile}. -@item -fipa-bit-cp @opindex fipa-bit-cp +@item -fipa-bit-cp When enabled, perform interprocedural bitwise constant propagation. This flag is enabled by default at @option{-O2} and by @option{-fprofile-use} and @option{-fauto-profile}. It requires that @option{-fipa-cp} is enabled. -@item -fipa-vrp @opindex fipa-vrp +@item -fipa-vrp When enabled, perform interprocedural propagation of value ranges. This flag is enabled by default at @option{-O2}. It requires that @option{-fipa-cp} is enabled. -@item -fipa-icf @opindex fipa-icf +@item -fipa-icf Perform Identical Code Folding for functions and read-only variables. The optimization reduces code size and may disturb unwind stacks by replacing a function by equivalent one with a different name. The optimization works @@ -12906,8 +12906,8 @@ equivalences that are found only by GCC and equivalences found only by Gold. This flag is enabled by default at @option{-O2} and @option{-Os}. -@item -flive-patching=@var{level} @opindex flive-patching +@item -flive-patching=@var{level} Control GCC's optimizations to produce output suitable for live-patching. If the compiler's optimization uses a function's body or information extracted @@ -12966,62 +12966,62 @@ This flag is disabled by default. Note that @option{-flive-patching} is not supported with link-time optimization (@option{-flto}). -@item -fisolate-erroneous-paths-dereference @opindex fisolate-erroneous-paths-dereference +@item -fisolate-erroneous-paths-dereference Detect paths that trigger erroneous or undefined behavior due to dereferencing a null pointer. Isolate those paths from the main control flow and turn the statement with erroneous or undefined behavior into a trap. This flag is enabled by default at @option{-O2} and higher and depends on @option{-fdelete-null-pointer-checks} also being enabled. -@item -fisolate-erroneous-paths-attribute @opindex fisolate-erroneous-paths-attribute +@item -fisolate-erroneous-paths-attribute Detect paths that trigger erroneous or undefined behavior due to a null value being used in a way forbidden by a @code{returns_nonnull} or @code{nonnull} attribute. Isolate those paths from the main control flow and turn the statement with erroneous or undefined behavior into a trap. This is not currently enabled, but may be enabled by @option{-O2} in the future. -@item -ftree-sink @opindex ftree-sink +@item -ftree-sink Perform forward store motion on trees. This flag is enabled by default at @option{-O1} and higher. -@item -ftree-bit-ccp @opindex ftree-bit-ccp +@item -ftree-bit-ccp Perform sparse conditional bit constant propagation on trees and propagate pointer alignment information. This pass only operates on local scalar variables and is enabled by default at @option{-O1} and higher, except for @option{-Og}. It requires that @option{-ftree-ccp} is enabled. -@item -ftree-ccp @opindex ftree-ccp +@item -ftree-ccp Perform sparse conditional constant propagation (CCP) on trees. This pass only operates on local scalar variables and is enabled by default at @option{-O1} and higher. -@item -fssa-backprop @opindex fssa-backprop +@item -fssa-backprop Propagate information about uses of a value up the definition chain in order to simplify the definitions. For example, this pass strips sign operations if the sign of a value never matters. The flag is enabled by default at @option{-O1} and higher. -@item -fssa-phiopt @opindex fssa-phiopt +@item -fssa-phiopt Perform pattern matching on SSA PHI nodes to optimize conditional code. This pass is enabled by default at @option{-O1} and higher, except for @option{-Og}. -@item -ftree-switch-conversion @opindex ftree-switch-conversion +@item -ftree-switch-conversion Perform conversion of simple initializations in a switch to initializations from a scalar array. This flag is enabled by default at @option{-O2} and higher. -@item -ftree-tail-merge @opindex ftree-tail-merge +@item -ftree-tail-merge Look for identical code sequences. When found, replace one with a jump to the other. This optimization is known as tail merging or cross jumping. This flag is enabled by default at @option{-O2} and higher. The compilation time @@ -13029,21 +13029,21 @@ in this pass can be limited using @option{max-tail-merge-comparisons} parameter and @option{max-tail-merge-iterations} parameter. -@item -ftree-dce @opindex ftree-dce +@item -ftree-dce Perform dead code elimination (DCE) on trees. This flag is enabled by default at @option{-O1} and higher. -@item -ftree-builtin-call-dce @opindex ftree-builtin-call-dce +@item -ftree-builtin-call-dce Perform conditional dead code elimination (DCE) for calls to built-in functions that may set @code{errno} but are otherwise free of side effects. This flag is enabled by default at @option{-O2} and higher if @option{-Os} is not also specified. -@item -ffinite-loops @opindex ffinite-loops @opindex fno-finite-loops +@item -ffinite-loops Assume that a loop with an exit will eventually take the exit and not loop indefinitely. This allows the compiler to remove loops that otherwise have no side-effects, not considering eventual endless looping as such. @@ -13051,46 +13051,46 @@ no side-effects, not considering eventual endless looping as such. This option is enabled by default at @option{-O2} for C++ with -std=c++11 or higher. -@item -ftree-dominator-opts @opindex ftree-dominator-opts +@item -ftree-dominator-opts Perform a variety of simple scalar cleanups (constant/copy propagation, redundancy elimination, range propagation and expression simplification) based on a dominator tree traversal. This also performs jump threading (to reduce jumps to jumps). This flag is enabled by default at @option{-O1} and higher. -@item -ftree-dse @opindex ftree-dse +@item -ftree-dse Perform dead store elimination (DSE) on trees. A dead store is a store into a memory location that is later overwritten by another store without any intervening loads. In this case the earlier store can be deleted. This flag is enabled by default at @option{-O1} and higher. -@item -ftree-ch @opindex ftree-ch +@item -ftree-ch Perform loop header copying on trees. This is beneficial since it increases effectiveness of code motion optimizations. It also saves one jump. This flag is enabled by default at @option{-O1} and higher. It is not enabled for @option{-Os}, since it usually increases code size. -@item -ftree-loop-optimize @opindex ftree-loop-optimize +@item -ftree-loop-optimize Perform loop optimizations on trees. This flag is enabled by default at @option{-O1} and higher. -@item -ftree-loop-linear -@itemx -floop-strip-mine -@itemx -floop-block @opindex ftree-loop-linear @opindex floop-strip-mine @opindex floop-block +@item -ftree-loop-linear +@itemx -floop-strip-mine +@itemx -floop-block Perform loop nest optimizations. Same as @option{-floop-nest-optimize}. To use this code transformation, GCC has to be configured with @option{--with-isl} to enable the Graphite loop transformation infrastructure. -@item -fgraphite-identity @opindex fgraphite-identity +@item -fgraphite-identity Enable the identity transformation for graphite. For every SCoP we generate the polyhedral representation and transform it back to gimple. Using @option{-fgraphite-identity} we can check the costs or benefits of the @@ -13098,22 +13098,22 @@ GIMPLE -> GRAPHITE -> GIMPLE transformation. Some minimal optimizations are also performed by the code generator isl, like index splitting and dead code elimination in loops. -@item -floop-nest-optimize @opindex floop-nest-optimize +@item -floop-nest-optimize Enable the isl based loop nest optimizer. This is a generic loop nest optimizer based on the Pluto optimization algorithms. It calculates a loop structure optimized for data-locality and parallelism. This option is experimental. -@item -floop-parallelize-all @opindex floop-parallelize-all +@item -floop-parallelize-all Use the Graphite data dependence analysis to identify loops that can be parallelized. Parallelize all the loops that can be analyzed to not contain loop carried dependences without checking that it is profitable to parallelize the loops. -@item -ftree-coalesce-vars @opindex ftree-coalesce-vars +@item -ftree-coalesce-vars While transforming the program out of the SSA representation, attempt to reduce copying by coalescing versions of different user-defined variables, instead of just compiler temporaries. This may severely @@ -13122,16 +13122,16 @@ limit the ability to debug an optimized program compiled with prevents SSA coalescing of user variables. This option is enabled by default if optimization is enabled, and it does very little otherwise. -@item -ftree-loop-if-convert @opindex ftree-loop-if-convert +@item -ftree-loop-if-convert Attempt to transform conditional jumps in the innermost loops to branch-less equivalents. The intent is to remove control-flow from the innermost loops in order to improve the ability of the vectorization pass to handle these loops. This is enabled by default if vectorization is enabled. -@item -ftree-loop-distribution @opindex ftree-loop-distribution +@item -ftree-loop-distribution Perform loop distribution. This flag can improve cache performance on big loop bodies and allow further loop optimizations, like parallelization or vectorization, to take place. For example, the loop @@ -13153,8 +13153,8 @@ ENDDO This flag is enabled by default at @option{-O3}. It is also enabled by @option{-fprofile-use} and @option{-fauto-profile}. -@item -ftree-loop-distribute-patterns @opindex ftree-loop-distribute-patterns +@item -ftree-loop-distribute-patterns Perform loop distribution of patterns that can be code generated with calls to a library. This flag is enabled by default at @option{-O2} and higher, and by @option{-fprofile-use} and @option{-fauto-profile}. @@ -13180,8 +13180,8 @@ and the initialization loop is transformed into a call to memset zero. This flag is enabled by default at @option{-O3}. It is also enabled by @option{-fprofile-use} and @option{-fauto-profile}. -@item -floop-interchange @opindex floop-interchange +@item -floop-interchange Perform loop interchange outside of graphite. This flag can improve cache performance on loop nest and allow further loop optimizations, like vectorization, to take place. For example, the loop @@ -13201,15 +13201,15 @@ for (int i = 0; i < N; i++) This flag is enabled by default at @option{-O3}. It is also enabled by @option{-fprofile-use} and @option{-fauto-profile}. -@item -floop-unroll-and-jam @opindex floop-unroll-and-jam +@item -floop-unroll-and-jam Apply unroll and jam transformations on feasible loops. In a loop nest this unrolls the outer loop by some factor and fuses the resulting multiple inner loops. This flag is enabled by default at @option{-O3}. It is also enabled by @option{-fprofile-use} and @option{-fauto-profile}. -@item -ftree-loop-im @opindex ftree-loop-im +@item -ftree-loop-im Perform loop invariant motion on trees. This pass moves only invariants that are hard to handle at RTL level (function calls, operations that expand to nontrivial sequences of insns). With @option{-funswitch-loops} it also moves @@ -13217,15 +13217,15 @@ operands of conditions that are invariant out of the loop, so that we can use just trivial invariantness analysis in loop unswitching. The pass also includes store motion. -@item -ftree-loop-ivcanon @opindex ftree-loop-ivcanon +@item -ftree-loop-ivcanon Create a canonical counter for number of iterations in loops for which determining number of iterations requires complicated analysis. Later optimizations then may determine the number easily. Useful especially in connection with unrolling. -@item -ftree-scev-cprop @opindex ftree-scev-cprop +@item -ftree-scev-cprop Perform final value replacement. If a variable is modified in a loop in such a way that its value when exiting the loop can be determined using only its initial value and the number of loop iterations, replace uses of @@ -13233,13 +13233,13 @@ the final value by such a computation, provided it is sufficiently cheap. This reduces data dependencies and may allow further simplifications. Enabled by default at @option{-O1} and higher. -@item -fivopts @opindex fivopts +@item -fivopts Perform induction variable optimizations (strength reduction, induction variable merging and induction variable elimination) on trees. -@item -ftree-parallelize-loops=n @opindex ftree-parallelize-loops +@item -ftree-parallelize-loops=n Parallelize loops, i.e., split their iteration space to run in n threads. This is only possible for loops whose iterations are independent and can be arbitrarily reordered. The optimization is only @@ -13248,59 +13248,59 @@ rather than constrained e.g.@: by memory bandwidth. This option implies @option{-pthread}, and thus is only supported on targets that have support for @option{-pthread}. -@item -ftree-pta @opindex ftree-pta +@item -ftree-pta Perform function-local points-to analysis on trees. This flag is enabled by default at @option{-O1} and higher, except for @option{-Og}. -@item -ftree-sra @opindex ftree-sra +@item -ftree-sra Perform scalar replacement of aggregates. This pass replaces structure references with scalars to prevent committing structures to memory too early. This flag is enabled by default at @option{-O1} and higher, except for @option{-Og}. -@item -fstore-merging @opindex fstore-merging +@item -fstore-merging Perform merging of narrow stores to consecutive memory addresses. This pass merges contiguous stores of immediate values narrower than a word into fewer wider stores to reduce the number of instructions. This is enabled by default at @option{-O2} and higher as well as @option{-Os}. -@item -ftree-ter @opindex ftree-ter +@item -ftree-ter Perform temporary expression replacement during the SSA->normal phase. Single use/single def temporaries are replaced at their use location with their defining expression. This results in non-GIMPLE code, but gives the expanders much more complex trees to work on resulting in better RTL generation. This is enabled by default at @option{-O1} and higher. -@item -ftree-slsr @opindex ftree-slsr +@item -ftree-slsr Perform straight-line strength reduction on trees. This recognizes related expressions involving multiplications and replaces them by less expensive calculations when possible. This is enabled by default at @option{-O1} and higher. -@item -ftree-vectorize @opindex ftree-vectorize +@item -ftree-vectorize Perform vectorization on trees. This flag enables @option{-ftree-loop-vectorize} and @option{-ftree-slp-vectorize} if not explicitly specified. -@item -ftree-loop-vectorize @opindex ftree-loop-vectorize +@item -ftree-loop-vectorize Perform loop vectorization on trees. This flag is enabled by default at @option{-O2} and by @option{-ftree-vectorize}, @option{-fprofile-use}, and @option{-fauto-profile}. -@item -ftree-slp-vectorize @opindex ftree-slp-vectorize +@item -ftree-slp-vectorize Perform basic block vectorization on trees. This flag is enabled by default at @option{-O2} and by @option{-ftree-vectorize}, @option{-fprofile-use}, and @option{-fauto-profile}. -@item -ftrivial-auto-var-init=@var{choice} @opindex ftrivial-auto-var-init +@item -ftrivial-auto-var-init=@var{choice} Initialize automatic variables with either a pattern or with zeroes to increase the security and predictability of a program by preventing uninitialized memory disclosure and use. @@ -13340,8 +13340,8 @@ The default is @samp{uninitialized}. You can control this behavior for a specific variable by using the variable attribute @code{uninitialized} (@pxref{Variable Attributes}). -@item -fvect-cost-model=@var{model} @opindex fvect-cost-model +@item -fvect-cost-model=@var{model} Alter the cost model used for vectorization. The @var{model} argument should be one of @samp{unlimited}, @samp{dynamic}, @samp{cheap} or @samp{very-cheap}. @@ -13363,16 +13363,16 @@ of four. The default cost model depends on other optimization flags and is either @samp{dynamic} or @samp{cheap}. -@item -fsimd-cost-model=@var{model} @opindex fsimd-cost-model +@item -fsimd-cost-model=@var{model} Alter the cost model used for vectorization of loops marked with the OpenMP simd directive. The @var{model} argument should be one of @samp{unlimited}, @samp{dynamic}, @samp{cheap}. All values of @var{model} have the same meaning as described in @option{-fvect-cost-model} and by default a cost model defined with @option{-fvect-cost-model} is used. -@item -ftree-vrp @opindex ftree-vrp +@item -ftree-vrp Perform Value Range Propagation on trees. This is similar to the constant propagation pass, but instead of values, ranges of values are propagated. This allows the optimizers to remove unnecessary range @@ -13381,14 +13381,14 @@ enabled by default at @option{-O2} and higher. Null pointer check elimination is only done if @option{-fdelete-null-pointer-checks} is enabled. -@item -fsplit-paths @opindex fsplit-paths +@item -fsplit-paths Split paths leading to loop backedges. This can improve dead code elimination and common subexpression elimination. This is enabled by default at @option{-O3} and above. -@item -fsplit-ivs-in-unroller @opindex fsplit-ivs-in-unroller +@item -fsplit-ivs-in-unroller Enables expression of values of induction variables in later iterations of the unrolled loop using the value in the first iteration. This breaks long dependency chains, thus improving efficiency of the scheduling passes. @@ -13400,24 +13400,24 @@ on some architectures due to restrictions in the CSE pass. This optimization is enabled by default. -@item -fvariable-expansion-in-unroller @opindex fvariable-expansion-in-unroller +@item -fvariable-expansion-in-unroller With this option, the compiler creates multiple copies of some local variables when unrolling a loop, which can result in superior code. This optimization is enabled by default for PowerPC targets, but disabled by default otherwise. -@item -fpartial-inlining @opindex fpartial-inlining +@item -fpartial-inlining Inline parts of functions. This option has any effect only when inlining itself is turned on by the @option{-finline-functions} or @option{-finline-small-functions} options. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -fpredictive-commoning @opindex fpredictive-commoning +@item -fpredictive-commoning Perform predictive commoning optimization, i.e., reusing computations (especially memory loads and stores) performed in previous iterations of loops. @@ -13425,8 +13425,8 @@ iterations of loops. This option is enabled at level @option{-O3}. It is also enabled by @option{-fprofile-use} and @option{-fauto-profile}. -@item -fprefetch-loop-arrays @opindex fprefetch-loop-arrays +@item -fprefetch-loop-arrays If supported by the target machine, generate instructions to prefetch memory to improve the performance of loops that access large arrays. @@ -13435,9 +13435,9 @@ dependent on the structure of loops within the source code. Disabled at level @option{-Os}. -@item -fno-printf-return-value @opindex fno-printf-return-value @opindex fprintf-return-value +@item -fno-printf-return-value Do not substitute constants for known return value of formatted output functions such as @code{sprintf}, @code{snprintf}, @code{vsprintf}, and @code{vsnprintf} (but not @code{printf} of @code{fprintf}). This @@ -13461,12 +13461,12 @@ and yields best results with @option{-O2} and above. It works in tandem with the @option{-Wformat-overflow} and @option{-Wformat-truncation} options. The @option{-fprintf-return-value} option is enabled by default. -@item -fno-peephole -@itemx -fno-peephole2 @opindex fno-peephole @opindex fpeephole @opindex fno-peephole2 @opindex fpeephole2 +@item -fno-peephole +@itemx -fno-peephole2 Disable any machine-specific peephole optimizations. The difference between @option{-fno-peephole} and @option{-fno-peephole2} is in how they are implemented in the compiler; some targets use one, some use the @@ -13475,9 +13475,9 @@ other, a few use both. @option{-fpeephole} is enabled by default. @option{-fpeephole2} enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -fno-guess-branch-probability @opindex fno-guess-branch-probability @opindex fguess-branch-probability +@item -fno-guess-branch-probability Do not guess branch probabilities using heuristics. GCC uses heuristics to guess branch probabilities if they are @@ -13496,15 +13496,15 @@ with @code{__builtin_expect_with_probability} built-in function. The default is @option{-fguess-branch-probability} at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}. -@item -freorder-blocks @opindex freorder-blocks +@item -freorder-blocks Reorder basic blocks in the compiled function in order to reduce number of taken branches and improve code locality. Enabled at levels @option{-O1}, @option{-O2}, @option{-O3}, @option{-Os}. -@item -freorder-blocks-algorithm=@var{algorithm} @opindex freorder-blocks-algorithm +@item -freorder-blocks-algorithm=@var{algorithm} Use the specified algorithm for basic block reordering. The @var{algorithm} argument can be @samp{simple}, which does not increase code size (except sometimes due to secondary effects like alignment), @@ -13515,8 +13515,8 @@ executed by making extra copies of code. The default is @samp{simple} at levels @option{-O1}, @option{-Os}, and @samp{stc} at levels @option{-O2}, @option{-O3}. -@item -freorder-blocks-and-partition @opindex freorder-blocks-and-partition +@item -freorder-blocks-and-partition In addition to reordering basic blocks in the compiled function, in order to reduce number of taken branches, partitions hot and cold basic blocks into separate sections of the assembly and @file{.o} files, to improve @@ -13531,8 +13531,8 @@ explicitly (if using a working linker). Enabled for x86 at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -freorder-functions @opindex freorder-functions +@item -freorder-functions Reorder functions in the object file in order to improve code locality. This is implemented by using special subsections @code{.text.hot} for most frequently executed functions and @@ -13546,8 +13546,8 @@ This option isn't effective unless you either provide profile feedback Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -fstrict-aliasing @opindex fstrict-aliasing +@item -fstrict-aliasing Allow the compiler to assume the strictest aliasing rules applicable to the language being compiled. For C (and C++), this activates optimizations based on the type of expressions. In particular, an @@ -13599,8 +13599,8 @@ int f() @{ The @option{-fstrict-aliasing} option is enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -fipa-strict-aliasing @opindex fipa-strict-aliasing +@item -fipa-strict-aliasing Controls whether rules of @option{-fstrict-aliasing} are applied across function boundaries. Note that if multiple functions gets inlined into a single function the memory accesses are no longer considered to be crossing a @@ -13609,12 +13609,12 @@ function boundary. The @option{-fipa-strict-aliasing} option is enabled by default and is effective only in combination with @option{-fstrict-aliasing}. +@opindex falign-functions @item -falign-functions @itemx -falign-functions=@var{n} @itemx -falign-functions=@var{n}:@var{m} @itemx -falign-functions=@var{n}:@var{m}:@var{n2} @itemx -falign-functions=@var{n}:@var{m}:@var{n2}:@var{m2} -@opindex falign-functions Align the start of functions to the next power-of-two greater than or equal to @var{n}, skipping up to @var{m}-1 bytes. This ensures that at least the first @var{m} bytes of the function can be fetched by the CPU @@ -13652,12 +13652,12 @@ overaligning functions. It attempts to instruct the assembler to align by the amount specified by @option{-falign-functions}, but not to skip more bytes than the size of the function. +@opindex falign-labels @item -falign-labels @itemx -falign-labels=@var{n} @itemx -falign-labels=@var{n}:@var{m} @itemx -falign-labels=@var{n}:@var{m}:@var{n2} @itemx -falign-labels=@var{n}:@var{m}:@var{n2}:@var{m2} -@opindex falign-labels Align all branch targets to a power-of-two boundary. Parameters of this option are analogous to the @option{-falign-functions} option. @@ -13673,12 +13673,12 @@ The maximum allowed @var{n} option value is 65536. Enabled at levels @option{-O2}, @option{-O3}. +@opindex falign-loops @item -falign-loops @itemx -falign-loops=@var{n} @itemx -falign-loops=@var{n}:@var{m} @itemx -falign-loops=@var{n}:@var{m}:@var{n2} @itemx -falign-loops=@var{n}:@var{m}:@var{n2}:@var{m2} -@opindex falign-loops Align loops to a power-of-two boundary. If the loops are executed many times, this makes up for any execution of the dummy padding instructions. @@ -13695,12 +13695,12 @@ If @var{n} is not specified or is zero, use a machine-dependent default. Enabled at levels @option{-O2}, @option{-O3}. +@opindex falign-jumps @item -falign-jumps @itemx -falign-jumps=@var{n} @itemx -falign-jumps=@var{n}:@var{m} @itemx -falign-jumps=@var{n}:@var{m}:@var{n2} @itemx -falign-jumps=@var{n}:@var{m}:@var{n2}:@var{m2} -@opindex falign-jumps Align branch targets to a power-of-two boundary, for branch targets where the targets can only be reached by jumping. In this case, no dummy operations need be executed. @@ -13717,12 +13717,12 @@ The maximum allowed @var{n} option value is 65536. Enabled at levels @option{-O2}, @option{-O3}. -@item -fno-allocation-dce @opindex fno-allocation-dce +@item -fno-allocation-dce Do not remove unused C++ allocations in dead code elimination. -@item -fallow-store-data-races @opindex fallow-store-data-races +@item -fallow-store-data-races Allow the compiler to perform optimizations that may introduce new data races on stores, without proving that the variable cannot be concurrently accessed by other threads. Does not affect optimization of local data. It is safe to @@ -13738,17 +13738,17 @@ vectorization. Enabled at level @option{-Ofast}. -@item -funit-at-a-time @opindex funit-at-a-time +@item -funit-at-a-time This option is left for compatibility reasons. @option{-funit-at-a-time} has no effect, while @option{-fno-unit-at-a-time} implies @option{-fno-toplevel-reorder} and @option{-fno-section-anchors}. Enabled by default. -@item -fno-toplevel-reorder @opindex fno-toplevel-reorder @opindex ftoplevel-reorder +@item -fno-toplevel-reorder Do not reorder top-level functions, variables, and @code{asm} statements. Output them in the same order that they appear in the input file. When this option is used, unreferenced static variables @@ -13761,8 +13761,8 @@ also at @option{-O0} if @option{-fsection-anchors} is explicitly requested. Additionally @option{-fno-toplevel-reorder} implies @option{-fno-section-anchors}. -@item -funreachable-traps @opindex funreachable-traps +@item -funreachable-traps With this option, the compiler turns calls to @code{__builtin_unreachable} into traps, instead of using them for optimization. This also affects any such calls implicitly generated @@ -13775,8 +13775,8 @@ takes priority over this one. This option is enabled by default at @option{-O0} and @option{-Og}. -@item -fweb @opindex fweb +@item -fweb Constructs webs as commonly used for register allocation purposes and assign each web individual pseudo register. This allows the register allocation pass to operate on pseudos directly, but also strengthens several other optimization @@ -13786,8 +13786,8 @@ however, make debugging impossible, since variables no longer stay in a Enabled by default with @option{-funroll-loops}. -@item -fwhole-program @opindex fwhole-program +@item -fwhole-program Assume that the current compilation unit represents the whole program being compiled. All public functions and variables with the exception of @code{main} and those merged by attribute @code{externally_visible} become static functions @@ -13800,8 +13800,8 @@ still useful if no linker plugin is used or during incremental link step when final code is produced (with @option{-flto} @option{-flinker-output=nolto-rel}). -@item -flto[=@var{n}] @opindex flto +@item -flto[=@var{n}] This option runs the standard link-time optimizer. When invoked with source code, it generates GIMPLE (one of GCC's internal representations) and writes it to special ELF sections in the object @@ -14030,8 +14030,8 @@ Use @option{-flto=auto} to use GNU make's job server, if available, or otherwise fall back to autodetection of the number of CPU threads present in your system. -@item -flto-partition=@var{alg} @opindex flto-partition +@item -flto-partition=@var{alg} Specify the partitioning algorithm used by the link-time optimizer. The value is either @samp{1to1} to specify a partitioning mirroring the original source files or @samp{balanced} to specify partitioning @@ -14045,8 +14045,8 @@ The value @samp{one} specifies that exactly one partition should be used while the value @samp{none} bypasses partitioning and executes the link-time optimization step directly from the WPA phase. -@item -flto-compression-level=@var{n} @opindex flto-compression-level +@item -flto-compression-level=@var{n} This option specifies the level of compression used for intermediate language written to LTO object files, and is only meaningful in conjunction with LTO mode (@option{-flto}). GCC currently supports two @@ -14056,8 +14056,8 @@ Values outside this range are clamped to either minimum or maximum of the supported values. If the option is not given, a default balanced compression setting is used. -@item -fuse-linker-plugin @opindex fuse-linker-plugin +@item -fuse-linker-plugin Enables the use of a linker plugin during link-time optimization. This option relies on plugin support in the linker, which is available in gold or in GNU ld 2.21 or newer. @@ -14075,8 +14075,8 @@ This option is enabled by default when LTO support in GCC is enabled and GCC was configured for use with a linker supporting plugins (GNU ld 2.21 or newer or gold). -@item -ffat-lto-objects @opindex ffat-lto-objects +@item -ffat-lto-objects Fat LTO objects are object files that contain both the intermediate language and the object code. This makes them usable for both LTO linking and normal linking. This option is effective only when compiling with @option{-flto} @@ -14099,8 +14099,8 @@ effect as usage of the command wrappers (@command{gcc-ar}, @command{gcc-nm} and The default is @option{-fno-fat-lto-objects} on targets with linker plugin support. -@item -fcompare-elim @opindex fcompare-elim +@item -fcompare-elim After register allocation and post-register allocation instruction splitting, identify arithmetic instructions that compute processor flags similar to a comparison operation based on that arithmetic. If possible, eliminate the @@ -14111,16 +14111,16 @@ the comparison operation before register allocation is complete. Enabled at levels @option{-O1}, @option{-O2}, @option{-O3}, @option{-Os}. -@item -fcprop-registers @opindex fcprop-registers +@item -fcprop-registers After register allocation and post-register allocation instruction splitting, perform a copy-propagation pass to try to reduce scheduling dependencies and occasionally eliminate the copy. Enabled at levels @option{-O1}, @option{-O2}, @option{-O3}, @option{-Os}. -@item -fprofile-correction @opindex fprofile-correction +@item -fprofile-correction Profiles collected using an instrumented binary for multi-threaded programs may be inconsistent due to missed counter updates. When this option is specified, GCC uses heuristics to correct or smooth out such inconsistencies. By @@ -14128,8 +14128,8 @@ default, GCC emits an error message when an inconsistent profile is detected. This option is enabled by @option{-fauto-profile}. -@item -fprofile-partial-training @opindex fprofile-partial-training +@item -fprofile-partial-training With @code{-fprofile-use} all portions of programs not executed during train run are optimized agressively for size rather than speed. In some cases it is not practical to train all possible hot paths in the program. (For @@ -14141,9 +14141,9 @@ they were compiled without profile feedback. This leads to better performance when train run is not representative but also leads to significantly bigger code. +@opindex fprofile-use @item -fprofile-use @itemx -fprofile-use=@var{path} -@opindex fprofile-use Enable profile feedback-directed optimizations, and the following optimizations, many of which are generally profitable only with profile feedback available: @@ -14169,9 +14169,9 @@ the feedback profiles do not exist (see @option{-Wmissing-profile}). If @var{path} is specified, GCC looks at the @var{path} to find the profile feedback data files. See @option{-fprofile-dir}. +@opindex fauto-profile @item -fauto-profile @itemx -fauto-profile=@var{path} -@opindex fauto-profile Enable sampling-based feedback-directed optimizations, and the following optimizations, many of which are generally profitable only with profile feedback available: @@ -14214,8 +14214,8 @@ arithmetic. These options trade off between speed and correctness. All must be specifically enabled. @table @gcctabopt -@item -ffloat-store @opindex ffloat-store +@item -ffloat-store Do not store floating-point variables in registers, and inhibit other options that might change whether a floating-point value is taken from a register or memory. @@ -14229,8 +14229,8 @@ good, but a few programs rely on the precise definition of IEEE floating point. Use @option{-ffloat-store} for such programs, after modifying them to store all pertinent intermediate computations into variables. -@item -fexcess-precision=@var{style} @opindex fexcess-precision +@item -fexcess-precision=@var{style} This option allows further control over excess precision on machines where floating-point operations occur in a format with more precision or range than the IEEE standard and interchange floating-point types. By @@ -14254,8 +14254,8 @@ or @option{-mfpmath=sse+387} is specified; in the former case, IEEE semantics apply without excess precision, and in the latter, rounding is unpredictable. -@item -ffast-math @opindex ffast-math +@item -ffast-math Sets the options @option{-fno-math-errno}, @option{-funsafe-math-optimizations}, @option{-ffinite-math-only}, @option{-fno-rounding-math}, @option{-fno-signaling-nans}, @option{-fcx-limited-range} and @@ -14269,9 +14269,9 @@ that depend on an exact implementation of IEEE or ISO rules/specifications for math functions. It may, however, yield faster code for programs that do not require the guarantees of these specifications. -@item -fno-math-errno @opindex fno-math-errno @opindex fmath-errno +@item -fno-math-errno Do not set @code{errno} after calling math functions that are executed with a single instruction, e.g., @code{sqrt}. A program that relies on IEEE exceptions for math error handling may want to use this flag @@ -14289,8 +14289,8 @@ On Darwin systems, the math library never sets @code{errno}. There is therefore no reason for the compiler to consider the possibility that it might, and @option{-fno-math-errno} is the default. -@item -funsafe-math-optimizations @opindex funsafe-math-optimizations +@item -funsafe-math-optimizations Allow optimizations for floating-point arithmetic that (a) assume that arguments and results are valid and (b) may violate IEEE or @@ -14308,8 +14308,8 @@ Enables @option{-fno-signed-zeros}, @option{-fno-trapping-math}, The default is @option{-fno-unsafe-math-optimizations}. -@item -fassociative-math @opindex fassociative-math +@item -fassociative-math Allow re-association of operands in series of floating-point operations. This violates the ISO C and C++ language standard by possibly changing @@ -14326,8 +14326,8 @@ is automatically enabled when both @option{-fno-signed-zeros} and The default is @option{-fno-associative-math}. -@item -freciprocal-math @opindex freciprocal-math +@item -freciprocal-math Allow the reciprocal of a value to be used instead of dividing by the value if this enables optimizations. For example @code{x / y} @@ -14337,8 +14337,8 @@ precision and increases the number of flops operating on the value. The default is @option{-fno-reciprocal-math}. -@item -ffinite-math-only @opindex ffinite-math-only +@item -ffinite-math-only Allow optimizations for floating-point arithmetic that assume that arguments and results are not NaNs or +-Infs. @@ -14350,9 +14350,9 @@ that do not require the guarantees of these specifications. The default is @option{-fno-finite-math-only}. -@item -fno-signed-zeros @opindex fno-signed-zeros @opindex fsigned-zeros +@item -fno-signed-zeros Allow optimizations for floating-point arithmetic that ignore the signedness of zero. IEEE arithmetic specifies the behavior of distinct +0.0 and @minus{}0.0 values, which then prohibits simplification @@ -14361,9 +14361,9 @@ This option implies that the sign of a zero result isn't significant. The default is @option{-fsigned-zeros}. -@item -fno-trapping-math @opindex fno-trapping-math @opindex ftrapping-math +@item -fno-trapping-math Compile code assuming that floating-point operations cannot generate user-visible traps. These traps include division by zero, overflow, underflow, inexact result and invalid operation. This option requires @@ -14382,8 +14382,8 @@ using C99's @code{FENV_ACCESS} pragma. This command-line option will be used along with @option{-frounding-math} to specify the default state for @code{FENV_ACCESS}. -@item -frounding-math @opindex frounding-math +@item -frounding-math Disable transformations and optimizations that assume default floating-point rounding behavior. This is round-to-zero for all floating point to integer conversions, and round-to-nearest for all other arithmetic @@ -14403,8 +14403,8 @@ using C99's @code{FENV_ACCESS} pragma. This command-line option will be used along with @option{-ftrapping-math} to specify the default state for @code{FENV_ACCESS}. -@item -fsignaling-nans @opindex fsignaling-nans +@item -fsignaling-nans Compile code assuming that IEEE signaling NaNs may generate user-visible traps during floating-point operations. Setting this option disables optimizations that may change the number of exceptions visible with @@ -14418,9 +14418,9 @@ The default is @option{-fno-signaling-nans}. This option is experimental and does not currently guarantee to disable all GCC optimizations that affect signaling NaN behavior. -@item -fno-fp-int-builtin-inexact @opindex fno-fp-int-builtin-inexact @opindex ffp-int-builtin-inexact +@item -fno-fp-int-builtin-inexact Do not allow the built-in functions @code{ceil}, @code{floor}, @code{round} and @code{trunc}, and their @code{float} and @code{long double} variants, to generate code that raises the ``inexact'' @@ -14437,13 +14437,13 @@ Even if @option{-fno-fp-int-builtin-inexact} is used, if the functions generate a call to a library function then the ``inexact'' exception may be raised if the library implementation does not follow TS 18661. -@item -fsingle-precision-constant @opindex fsingle-precision-constant +@item -fsingle-precision-constant Treat floating-point constants as single precision instead of implicitly converting them to double-precision constants. -@item -fcx-limited-range @opindex fcx-limited-range +@item -fcx-limited-range When enabled, this option states that a range reduction step is not needed when performing complex division. Also, there is no checking whether the result of a complex multiplication or division is @code{NaN @@ -14455,8 +14455,8 @@ This option controls the default setting of the ISO C99 @code{CX_LIMITED_RANGE} pragma. Nevertheless, the option applies to all languages. -@item -fcx-fortran-rules @opindex fcx-fortran-rules +@item -fcx-fortran-rules Complex multiplication and division follow Fortran rules. Range reduction is done as part of complex division, but there is no checking whether the result of a complex multiplication or division is @code{NaN @@ -14471,8 +14471,8 @@ performance, but are not enabled by any @option{-O} options. This section includes experimental options that may produce broken code. @table @gcctabopt -@item -fbranch-probabilities @opindex fbranch-probabilities +@item -fbranch-probabilities After running a program compiled with @option{-fprofile-arcs} (@pxref{Instrumentation Options}), you can compile it a second time using @@ -14494,8 +14494,8 @@ exactly determine which path is taken more often. Enabled by @option{-fprofile-use} and @option{-fauto-profile}. -@item -fprofile-values @opindex fprofile-values +@item -fprofile-values If combined with @option{-fprofile-arcs}, it adds code so that some data about values of expressions in the program is gathered. @@ -14505,16 +14505,16 @@ from profiling values of expressions for usage in optimizations. Enabled by @option{-fprofile-generate}, @option{-fprofile-use}, and @option{-fauto-profile}. -@item -fprofile-reorder-functions @opindex fprofile-reorder-functions +@item -fprofile-reorder-functions Function reordering based on profile instrumentation collects first time of execution of a function and orders these functions in ascending order. Enabled with @option{-fprofile-use}. -@item -fvpt @opindex fvpt +@item -fvpt If combined with @option{-fprofile-arcs}, this option instructs the compiler to add code to gather information about values of expressions. @@ -14525,8 +14525,8 @@ using the knowledge about the value of the denominator. Enabled with @option{-fprofile-use} and @option{-fauto-profile}. -@item -frename-registers @opindex frename-registers +@item -frename-registers Attempt to avoid false dependencies in scheduled code by making use of registers left over after register allocation. This optimization most benefits processors with lots of registers. Depending on the @@ -14536,24 +14536,24 @@ a ``home register''. Enabled by default with @option{-funroll-loops}. -@item -fschedule-fusion @opindex fschedule-fusion +@item -fschedule-fusion Performs a target dependent pass over the instruction stream to schedule instructions of same type together because target machine can execute them more efficiently if they are adjacent to each other in the instruction flow. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -@item -ftracer @opindex ftracer +@item -ftracer Perform tail duplication to enlarge superblock size. This transformation simplifies the control flow of the function allowing other optimizations to do a better job. Enabled by @option{-fprofile-use} and @option{-fauto-profile}. -@item -funroll-loops @opindex funroll-loops +@item -funroll-loops Unroll loops whose number of iterations can be determined at compile time or upon entry to the loop. @option{-funroll-loops} implies @option{-frerun-cse-after-loop}, @option{-fweb} and @option{-frename-registers}. @@ -14563,15 +14563,15 @@ or may not make it run faster. Enabled by @option{-fprofile-use} and @option{-fauto-profile}. -@item -funroll-all-loops @opindex funroll-all-loops +@item -funroll-all-loops Unroll all loops, even if their number of iterations is uncertain when the loop is entered. This usually makes programs run more slowly. @option{-funroll-all-loops} implies the same options as @option{-funroll-loops}. -@item -fpeel-loops @opindex fpeel-loops +@item -fpeel-loops Peels loops for which there is enough information that they do not roll much (from profile feedback or static analysis). It also turns on complete loop peeling (i.e.@: complete removal of loops with small constant @@ -14579,13 +14579,13 @@ number of iterations). Enabled by @option{-O3}, @option{-fprofile-use}, and @option{-fauto-profile}. -@item -fmove-loop-invariants @opindex fmove-loop-invariants +@item -fmove-loop-invariants Enables the loop invariant motion pass in the RTL loop optimizer. Enabled at level @option{-O1} and higher, except for @option{-Og}. -@item -fmove-loop-stores @opindex fmove-loop-stores +@item -fmove-loop-stores Enables the loop store motion pass in the GIMPLE loop optimizer. This moves invariant stores to after the end of the loop in exchange for carrying the stored value in a register across the iteration. @@ -14593,22 +14593,22 @@ Note for this option to have an effect @option{-ftree-loop-im} has to be enabled as well. Enabled at level @option{-O1} and higher, except for @option{-Og}. -@item -fsplit-loops @opindex fsplit-loops +@item -fsplit-loops Split a loop into two if it contains a condition that's always true for one side of the iteration space and false for the other. Enabled by @option{-fprofile-use} and @option{-fauto-profile}. -@item -funswitch-loops @opindex funswitch-loops +@item -funswitch-loops Move branches with loop invariant conditions out of the loop, with duplicates of the loop on both branches (modified according to result of the condition). Enabled by @option{-fprofile-use} and @option{-fauto-profile}. -@item -fversion-loops-for-strides @opindex fversion-loops-for-strides +@item -fversion-loops-for-strides If a loop iterates over an array with a variable stride, create another version of the loop that assumes the stride is always one. For example: @@ -14633,10 +14633,10 @@ This is particularly useful for assumed-shape arrays in Fortran where This flag is enabled by default at @option{-O3}. It is also enabled by @option{-fprofile-use} and @option{-fauto-profile}. -@item -ffunction-sections -@itemx -fdata-sections @opindex ffunction-sections @opindex fdata-sections +@item -ffunction-sections +@itemx -fdata-sections Place each function or data item into its own section in the output file if the target supports arbitrary sections. The name of the function or the name of the data item determines the section's name @@ -14663,13 +14663,13 @@ locations inside a translation unit since the locations are unknown until link time. An example of such an optimization is relaxing calls to short call instructions. -@item -fstdarg-opt @opindex fstdarg-opt +@item -fstdarg-opt Optimize the prologue of variadic argument functions with respect to usage of those arguments. -@item -fsection-anchors @opindex fsection-anchors +@item -fsection-anchors Try to reduce the number of symbolic address calculations by using shared ``anchor'' symbols to address nearby objects. This transformation can help to reduce the number of GOT entries and GOT accesses on some @@ -14698,8 +14698,8 @@ int foo (void) Not all targets support this option. -@item -fzero-call-used-regs=@var{choice} @opindex fzero-call-used-regs +@item -fzero-call-used-regs=@var{choice} Zero call-used registers at function return to increase program security by either mitigating Return-Oriented Programming (ROP) attacks or preventing information leakage through registers. @@ -14711,8 +14711,8 @@ The default is @samp{skip}. You can control this behavior for a specific function by using the function attribute @code{zero_call_used_regs} (@pxref{Function Attributes}). -@item --param @var{name}=@var{value} @opindex param +@item --param @var{name}=@var{value} In some places, GCC uses various constants to control the amount of optimization that is done. For example, GCC does not inline functions that contain more than a certain number of instructions. You can @@ -16259,10 +16259,10 @@ program analysis purposes. @table @gcctabopt @cindex @command{prof} @cindex @command{gprof} -@item -p -@itemx -pg @opindex p @opindex pg +@item -p +@itemx -pg Generate extra code to write profile information suitable for the analysis program @command{prof} (for @option{-p}) or @command{gprof} (for @option{-pg}). You must use this option when compiling @@ -16273,8 +16273,8 @@ You can use the function attribute @code{no_instrument_function} to suppress profiling of individual functions when compiling with these options. @xref{Common Function Attributes}. -@item -fprofile-arcs @opindex fprofile-arcs +@item -fprofile-arcs Add code so that program flow @dfn{arcs} are instrumented. During execution the program records how many times each branch and call is executed and how many times it is taken or returns. On targets that support @@ -16301,8 +16301,8 @@ E.g. @code{gcc a.c b.c -o binary} would generate @file{binary-a.gcda} and @xref{Cross-profiling}. @cindex @command{gcov} -@item --coverage @opindex coverage +@item --coverage This option is used to compile and link code instrumented for coverage analysis. The option is a synonym for @option{-fprofile-arcs} @@ -16361,8 +16361,8 @@ instrumentation code can be added to the block; otherwise, a new basic block must be created to hold the instrumentation code. @need 2000 -@item -ftest-coverage @opindex ftest-coverage +@item -ftest-coverage Produce a notes file that the @command{gcov} code-coverage utility (@pxref{Gcov,, @command{gcov}---a Test Coverage Program}) can use to show program coverage. Each source file's note file is called @@ -16371,15 +16371,15 @@ above for a description of @var{auxname} and instructions on how to generate test coverage data. Coverage data matches the source files more closely if you do not optimize. -@item -fprofile-abs-path @opindex fprofile-abs-path +@item -fprofile-abs-path Automatically convert relative source file names to absolute path names in the @file{.gcno} files. This allows @command{gcov} to find the correct sources in projects where compilations occur with different working directories. -@item -fprofile-dir=@var{path} @opindex fprofile-dir +@item -fprofile-dir=@var{path} Set the directory to search for the profile data files in to @var{path}. This option affects only the profile data generated by @@ -16408,9 +16408,9 @@ value of environment variable @var{VAR} @end table +@opindex fprofile-generate @item -fprofile-generate @itemx -fprofile-generate=@var{path} -@opindex fprofile-generate Enable options usually used for instrumenting application to produce profile useful for later recompilation with profile feedback based @@ -16427,9 +16427,9 @@ the profile feedback data files. See @option{-fprofile-dir}. To optimize the program based on the collected profile information, use @option{-fprofile-use}. @xref{Optimize Options}, for more information. +@opindex fprofile-info-section @item -fprofile-info-section @itemx -fprofile-info-section=@var{name} -@opindex fprofile-info-section Register the profile information in the specified section instead of using a constructor/destructor. The section name is @var{name} if it is specified, @@ -16518,15 +16518,15 @@ deserialize the data stream generated by the @code{__gcov_filename_to_gcfn} and @code{__gcov_info_to_gcda} functions and merge the profile information into @file{.gcda} files on the host filesystem. -@item -fprofile-note=@var{path} @opindex fprofile-note +@item -fprofile-note=@var{path} If @var{path} is specified, GCC saves @file{.gcno} file into @var{path} location. If you combine the option with multiple source files, the @file{.gcno} file will be overwritten. -@item -fprofile-prefix-path=@var{path} @opindex fprofile-prefix-path +@item -fprofile-prefix-path=@var{path} This option can be used in combination with @option{profile-generate=}@var{profile_dir} and @@ -16540,16 +16540,16 @@ In such setups @option{-fprofile-prefix-path=}@var{path} with @var{path} pointing to the base directory of the build can be used to strip the irrelevant part of the path and keep all file names relative to the main build directory. -@item -fprofile-prefix-map=@var{old}=@var{new} @opindex fprofile-prefix-map +@item -fprofile-prefix-map=@var{old}=@var{new} When compiling files residing in directory @file{@var{old}}, record profiling information (with @option{--coverage}) describing them as if the files resided in directory @file{@var{new}} instead. See also @option{-ffile-prefix-map}. -@item -fprofile-update=@var{method} @opindex fprofile-update +@item -fprofile-update=@var{method} Alter the update method for an application instrumented for profile feedback based optimization. The @var{method} argument should be one of @@ -16565,8 +16565,8 @@ when supported by a target, or to @samp{single} otherwise. The GCC driver automatically selects @samp{prefer-atomic} when @option{-pthread} is present in the command line. -@item -fprofile-filter-files=@var{regex} @opindex fprofile-filter-files +@item -fprofile-filter-files=@var{regex} Instrument only functions from files whose name matches any of the regular expressions (separated by semi-colons). @@ -16574,8 +16574,8 @@ any of the regular expressions (separated by semi-colons). For example, @option{-fprofile-filter-files=main\.c;module.*\.c} will instrument only @file{main.c} and all C files starting with 'module'. -@item -fprofile-exclude-files=@var{regex} @opindex fprofile-exclude-files +@item -fprofile-exclude-files=@var{regex} Instrument only functions from files whose name does not match any of the regular expressions (separated by semi-colons). @@ -16583,8 +16583,8 @@ any of the regular expressions (separated by semi-colons). For example, @option{-fprofile-exclude-files=/usr/.*} will prevent instrumentation of all files that are located in the @file{/usr/} folder. -@item -fprofile-reproducible=@r{[}multithreaded@r{|}parallel-runs@r{|}serial@r{]} @opindex fprofile-reproducible +@item -fprofile-reproducible=@r{[}multithreaded@r{|}parallel-runs@r{|}serial@r{]} Control level of reproducibility of profile gathered by @code{-fprofile-generate}. This makes it possible to rebuild program with same outcome which is useful, for example, for distribution @@ -16612,8 +16612,8 @@ instrumented program in parallel (such as with @code{make -j}). This reduces quality of gathered data, in particular of indirect call profiling. -@item -fsanitize=address @opindex fsanitize=address +@item -fsanitize=address Enable AddressSanitizer, a fast memory error detector. Memory access instructions are instrumented to detect out-of-bounds and use-after-free bugs. @@ -16659,8 +16659,8 @@ the available options are shown at startup of the instrumented program. The option cannot be combined with @option{-fsanitize=thread} or @option{-fsanitize=address}, and is currently only available on AArch64. -@item -fsanitize=kernel-hwaddress @opindex fsanitize=kernel-hwaddress +@item -fsanitize=kernel-hwaddress Enable Hardware-assisted AddressSanitizer for compilation of the Linux kernel. Similar to @option{-fsanitize=kernel-address} but using an alternate instrumentation method, and similar to @option{-fsanitize=hwaddress} but with @@ -16675,8 +16675,8 @@ possible by specifying the command-line options @option{--param hwasan-instrument-allocas=1} respectively. Using a random frame tag is not implemented for kernel instrumentation. -@item -fsanitize=pointer-compare @opindex fsanitize=pointer-compare +@item -fsanitize=pointer-compare Instrument comparison operation (<, <=, >, >=) with pointer operands. The option must be combined with either @option{-fsanitize=kernel-address} or @option{-fsanitize=address} @@ -16686,8 +16686,8 @@ add @code{detect_invalid_pointer_pairs=2} to the environment variable @env{ASAN_OPTIONS}. Using @code{detect_invalid_pointer_pairs=1} detects invalid operation only when both pointers are non-null. -@item -fsanitize=pointer-subtract @opindex fsanitize=pointer-subtract +@item -fsanitize=pointer-subtract Instrument subtraction with pointer operands. The option must be combined with either @option{-fsanitize=kernel-address} or @option{-fsanitize=address} @@ -16697,8 +16697,8 @@ add @code{detect_invalid_pointer_pairs=2} to the environment variable @env{ASAN_OPTIONS}. Using @code{detect_invalid_pointer_pairs=1} detects invalid operation only when both pointers are non-null. -@item -fsanitize=shadow-call-stack @opindex fsanitize=shadow-call-stack +@item -fsanitize=shadow-call-stack Enable ShadowCallStack, a security enhancement mechanism used to protect programs against return address overwrites (e.g. stack buffer overflows.) It works by saving a function's return address to a separately allocated @@ -16727,8 +16727,8 @@ to turn off exceptions. See @uref{https://clang.llvm.org/docs/ShadowCallStack.html} for more details. -@item -fsanitize=thread @opindex fsanitize=thread +@item -fsanitize=thread Enable ThreadSanitizer, a fast data race detector. Memory access instructions are instrumented to detect data race bugs. See @uref{https://github.com/google/sanitizers/wiki#threadsanitizer} for more @@ -16743,8 +16743,8 @@ Note that sanitized atomic builtins cannot throw exceptions when operating on invalid memory addresses with non-call exceptions (@option{-fnon-call-exceptions}). -@item -fsanitize=leak @opindex fsanitize=leak +@item -fsanitize=leak Enable LeakSanitizer, a memory leak detector. This option only matters for linking of executables and the executable is linked against a library that overrides @code{malloc} @@ -16754,8 +16754,8 @@ details. The run-time behavior can be influenced using the @env{LSAN_OPTIONS} environment variable. The option cannot be combined with @option{-fsanitize=thread}. -@item -fsanitize=undefined @opindex fsanitize=undefined +@item -fsanitize=undefined Enable UndefinedBehaviorSanitizer, a fast undefined behavior detector. Various computations are instrumented to detect undefined behavior at runtime. See @uref{https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html} for more details. The run-time behavior can be influenced using the @@ -16763,59 +16763,59 @@ at runtime. See @uref{https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.ht @table @gcctabopt -@item -fsanitize=shift @opindex fsanitize=shift +@item -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. This option has two suboptions, @option{-fsanitize=shift-base} and @option{-fsanitize=shift-exponent}. -@item -fsanitize=shift-exponent @opindex fsanitize=shift-exponent +@item -fsanitize=shift-exponent This option enables checking that the second argument of a shift operation is not negative and is smaller than the precision of the promoted first argument. -@item -fsanitize=shift-base @opindex fsanitize=shift-base +@item -fsanitize=shift-base If the second argument of a shift operation is within range, check 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 -fsanitize=integer-divide-by-zero @opindex fsanitize=integer-divide-by-zero +@item -fsanitize=integer-divide-by-zero Detect integer division by zero. -@item -fsanitize=unreachable @opindex fsanitize=unreachable +@item -fsanitize=unreachable With this option, the compiler turns the @code{__builtin_unreachable} call into a diagnostics message call instead. When reaching the @code{__builtin_unreachable} call, the behavior is undefined. -@item -fsanitize=vla-bound @opindex fsanitize=vla-bound +@item -fsanitize=vla-bound This option instructs the compiler to check that the size of a variable length array is positive. -@item -fsanitize=null @opindex fsanitize=null +@item -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, or if a method is invoked on an object pointed by a NULL pointer. -@item -fsanitize=return @opindex fsanitize=return +@item -fsanitize=return This option enables return statement checking. Programs built with this option turned on will issue an error message when the end of a non-void function is reached without actually returning a value. This option works in C++ only. -@item -fsanitize=signed-integer-overflow @opindex fsanitize=signed-integer-overflow +@item -fsanitize=signed-integer-overflow This option enables signed integer overflow checking. We check that the result of @code{+}, @code{*}, and both unary and binary @code{-} does not overflow in the signed arithmetics. This also detects @@ -16827,89 +16827,89 @@ signed char a = SCHAR_MAX; a++; @end smallexample -@item -fsanitize=bounds @opindex fsanitize=bounds +@item -fsanitize=bounds This option enables instrumentation of array bounds. Various out of bounds accesses are detected. Flexible array members, flexible array member-like arrays, and initializers of variables with static storage are not instrumented. -@item -fsanitize=bounds-strict @opindex fsanitize=bounds-strict +@item -fsanitize=bounds-strict This option enables strict instrumentation of array bounds. Most out of bounds accesses are detected, including flexible array members and flexible array member-like arrays. Initializers of variables with static storage are not instrumented. -@item -fsanitize=alignment @opindex fsanitize=alignment +@item -fsanitize=alignment This option enables checking of alignment of pointers when they are dereferenced, or when a reference is bound to insufficiently aligned target, or when a method or constructor is invoked on insufficiently aligned object. -@item -fsanitize=object-size @opindex fsanitize=object-size +@item -fsanitize=object-size This option enables instrumentation of memory references using the @code{__builtin_dynamic_object_size} function. Various out of bounds pointer accesses are detected. -@item -fsanitize=float-divide-by-zero @opindex fsanitize=float-divide-by-zero +@item -fsanitize=float-divide-by-zero Detect floating-point division by zero. Unlike other similar options, @option{-fsanitize=float-divide-by-zero} is not enabled by @option{-fsanitize=undefined}, since floating-point division by zero can be a legitimate way of obtaining infinities and NaNs. -@item -fsanitize=float-cast-overflow @opindex fsanitize=float-cast-overflow +@item -fsanitize=float-cast-overflow This option enables floating-point type to integer conversion checking. We check that the result of the conversion does not overflow. Unlike other similar options, @option{-fsanitize=float-cast-overflow} is not enabled by @option{-fsanitize=undefined}. This option does not work well with @code{FE_INVALID} exceptions enabled. -@item -fsanitize=nonnull-attribute @opindex fsanitize=nonnull-attribute +@item -fsanitize=nonnull-attribute This option enables instrumentation of calls, checking whether null values are not passed to arguments marked as requiring a non-null value by the @code{nonnull} function attribute. -@item -fsanitize=returns-nonnull-attribute @opindex fsanitize=returns-nonnull-attribute +@item -fsanitize=returns-nonnull-attribute This option enables instrumentation of return statements in functions marked with @code{returns_nonnull} function attribute, to detect returning of null values from such functions. -@item -fsanitize=bool @opindex fsanitize=bool +@item -fsanitize=bool This option enables instrumentation of loads from bool. If a value other than 0/1 is loaded, a run-time error is issued. -@item -fsanitize=enum @opindex fsanitize=enum +@item -fsanitize=enum This option enables instrumentation of loads from an enum type. If a value outside the range of values for the enum type is loaded, a run-time error is issued. -@item -fsanitize=vptr @opindex fsanitize=vptr +@item -fsanitize=vptr This option enables instrumentation of C++ member function calls, member accesses and some conversions between pointers to base and derived classes, to verify the referenced object has the correct dynamic type. -@item -fsanitize=pointer-overflow @opindex fsanitize=pointer-overflow +@item -fsanitize=pointer-overflow This option enables instrumentation of pointer arithmetics. If the pointer arithmetics overflows, a run-time error is issued. -@item -fsanitize=builtin @opindex fsanitize=builtin +@item -fsanitize=builtin This option enables instrumentation of arguments to selected builtin functions. If an invalid value is passed to such arguments, a run-time @@ -16928,27 +16928,27 @@ While @option{-ftrapv} causes traps for signed overflows to be emitted, @option{-fsanitize=undefined} gives a diagnostic message. This currently works only for the C family of languages. -@item -fno-sanitize=all @opindex fno-sanitize=all +@item -fno-sanitize=all This option disables all previously enabled sanitizers. @option{-fsanitize=all} is not allowed, as some sanitizers cannot be used together. -@item -fasan-shadow-offset=@var{number} @opindex fasan-shadow-offset +@item -fasan-shadow-offset=@var{number} This option forces GCC to use custom shadow offset in AddressSanitizer checks. It is useful for experimenting with different shadow memory layouts in Kernel AddressSanitizer. -@item -fsanitize-sections=@var{s1},@var{s2},... @opindex fsanitize-sections +@item -fsanitize-sections=@var{s1},@var{s2},... Sanitize global variables in selected user-defined sections. @var{si} may contain wildcards. -@item -fsanitize-recover@r{[}=@var{opts}@r{]} @opindex fsanitize-recover @opindex fno-sanitize-recover +@item -fsanitize-recover@r{[}=@var{opts}@r{]} @option{-fsanitize-recover=} controls error recovery mode for sanitizers mentioned in comma-separated list of @var{opts}. Enabling this option for a sanitizer component causes it to attempt to continue @@ -16985,14 +16985,14 @@ equivalent to specifying an @var{opts} list of: undefined,float-cast-overflow,float-divide-by-zero,bounds-strict @end smallexample -@item -fsanitize-address-use-after-scope @opindex fsanitize-address-use-after-scope +@item -fsanitize-address-use-after-scope Enable sanitization of local variables to detect use-after-scope bugs. The option sets @option{-fstack-reuse} to @samp{none}. -@item -fsanitize-trap@r{[}=@var{opts}@r{]} @opindex fsanitize-trap @opindex fno-sanitize-trap +@item -fsanitize-trap@r{[}=@var{opts}@r{]} The @option{-fsanitize-trap=} option instructs the compiler to report for sanitizers mentioned in comma-separated list of @var{opts} undefined behavior using @code{__builtin_trap} rather than a @code{libubsan} @@ -17017,18 +17017,18 @@ and @code{-fsanitize=vptr} is enabled on the command line, the instrumentation is silently ignored as the instrumentation always needs @code{libubsan} support, @option{-fsanitize-trap=vptr} is not allowed. -@item -fsanitize-undefined-trap-on-error @opindex fsanitize-undefined-trap-on-error +@item -fsanitize-undefined-trap-on-error The @option{-fsanitize-undefined-trap-on-error} option is deprecated equivalent of @option{-fsanitize-trap=all}. -@item -fsanitize-coverage=trace-pc @opindex fsanitize-coverage=trace-pc +@item -fsanitize-coverage=trace-pc Enable coverage-guided fuzzing code instrumentation. Inserts a call to @code{__sanitizer_cov_trace_pc} into every basic block. -@item -fsanitize-coverage=trace-cmp @opindex fsanitize-coverage=trace-cmp +@item -fsanitize-coverage=trace-cmp Enable dataflow guided fuzzing code instrumentation. Inserts a call to @code{__sanitizer_cov_trace_cmp1}, @code{__sanitizer_cov_trace_cmp2}, @code{__sanitizer_cov_trace_cmp4} or @@ -17041,8 +17041,8 @@ operand constant, @code{__sanitizer_cov_trace_cmpf} or @code{__sanitizer_cov_trace_cmpd} for float or double comparisons and @code{__sanitizer_cov_trace_switch} for switch statements. -@item -fcf-protection=@r{[}full@r{|}branch@r{|}return@r{|}none@r{|}check@r{]} @opindex fcf-protection +@item -fcf-protection=@r{[}full@r{|}branch@r{|}return@r{|}none@r{|}check@r{]} Enable code instrumentation of control-flow transfers to increase program security by checking that target addresses of control-flow transfer instructions (such as indirect function call, function return, @@ -17077,8 +17077,8 @@ Currently the x86 GNU/Linux target provides an implementation based on Intel Control-flow Enforcement Technology (CET) which works for i686 processor or newer. -@item -fharden-compares @opindex fharden-compares +@item -fharden-compares For every logical test that survives gimple optimizations and is @emph{not} the condition in a conditional branch (for example, conditions tested for conditional moves, or to store in boolean @@ -17087,16 +17087,16 @@ condition, and to call @code{__builtin_trap} if the results do not match. Use with @samp{-fharden-conditional-branches} to cover all conditionals. -@item -fharden-conditional-branches @opindex fharden-conditional-branches +@item -fharden-conditional-branches For every non-vectorized conditional branch that survives gimple optimizations, emit extra code to compute and verify the reversed condition, and to call @code{__builtin_trap} if the result is unexpected. Use with @samp{-fharden-compares} to cover all conditionals. -@item -fstack-protector @opindex fstack-protector +@item -fstack-protector Emit extra code to check for buffer overflows, such as stack smashing attacks. This is done by adding a guard variable to functions with vulnerable objects. This includes functions that call @code{alloca}, and @@ -17107,25 +17107,25 @@ exits. Only variables that are actually allocated on the stack are considered, optimized away variables or variables allocated in registers don't count. -@item -fstack-protector-all @opindex fstack-protector-all +@item -fstack-protector-all Like @option{-fstack-protector} except that all functions are protected. -@item -fstack-protector-strong @opindex fstack-protector-strong +@item -fstack-protector-strong Like @option{-fstack-protector} but includes additional functions to be protected --- those that have local array definitions, or have references to local frame addresses. Only variables that are actually allocated on the stack are considered, optimized away variables or variables allocated in registers don't count. -@item -fstack-protector-explicit @opindex fstack-protector-explicit +@item -fstack-protector-explicit Like @option{-fstack-protector} but only protects those functions which have the @code{stack_protect} attribute. -@item -fstack-check @opindex fstack-check +@item -fstack-check Generate code to verify that you do not go beyond the boundary of the stack. You should specify this flag if you are running in an environment with multiple threads, but you only rarely need to specify it in @@ -17168,8 +17168,8 @@ and stack overflows. @samp{specific} is an excellent choice when compiling Ada code. It is not generally sufficient to protect against stack-clash attacks. To protect against those you want @samp{-fstack-clash-protection}. -@item -fstack-clash-protection @opindex fstack-clash-protection +@item -fstack-clash-protection Generate code to prevent stack clash style attacks. When this option is enabled, the compiler will only allocate one page of stack space at a time and each page is accessed immediately after allocation. Thus, it prevents @@ -17182,12 +17182,12 @@ allocations. @option{-fstack-clash-protection} may also provide limited protection for static stack allocations if the target supports @option{-fstack-check=specific}. -@item -fstack-limit-register=@var{reg} -@itemx -fstack-limit-symbol=@var{sym} -@itemx -fno-stack-limit @opindex fstack-limit-register @opindex fstack-limit-symbol @opindex fno-stack-limit +@item -fstack-limit-register=@var{reg} +@itemx -fstack-limit-symbol=@var{sym} +@itemx -fno-stack-limit Generate code to ensure that the stack does not grow beyond a certain value, either the value of a register or the address of a symbol. If a larger stack is required, a signal is raised at run time. For most targets, @@ -17203,8 +17203,8 @@ of 128KB@. Note that this may only work with the GNU linker. You can locally override stack limit checking by using the @code{no_stack_limit} function attribute (@pxref{Function Attributes}). -@item -fsplit-stack @opindex fsplit-stack +@item -fsplit-stack Generate code to automatically split the stack before it overflows. The resulting program has a discontiguous stack which can only overflow if the program is unable to allocate any more memory. This @@ -17222,8 +17222,8 @@ without @option{-fsplit-stack} always has a large stack. Support for this is implemented in the gold linker in GNU binutils release 2.21 and later. -@item -fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @opindex fvtable-verify +@item -fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} This option is only available when compiling C++ code. It turns on (or off, if using @option{-fvtable-verify=none}) the security feature that verifies at run time, for every virtual call, that @@ -17246,8 +17246,8 @@ If this option appears multiple times in the command line with different values specified, @samp{none} takes highest priority over both @samp{std} and @samp{preinit}; @samp{preinit} takes priority over @samp{std}. -@item -fvtv-debug @opindex fvtv-debug +@item -fvtv-debug When used in conjunction with @option{-fvtable-verify=std} or @option{-fvtable-verify=preinit}, causes debug versions of the runtime functions for the vtable verification feature to be called. @@ -17260,8 +17260,8 @@ if that is defined or the current working directory otherwise. Note: This feature @emph{appends} data to the log file. If you want a fresh log file, be sure to delete any existing one. -@item -fvtv-counts @opindex fvtv-counts +@item -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 @@ -17278,8 +17278,8 @@ in the same directory. Note: This feature @emph{appends} data to the log files. To get fresh log files, be sure to delete any existing ones. -@item -finstrument-functions @opindex finstrument-functions +@item -finstrument-functions Generate instrumentation calls for entry and exit to functions. Just after function entry and just before function exit, the following profiling functions are called with the address of the current @@ -17317,8 +17317,8 @@ cannot safely be called (perhaps signal handlers, if the profiling routines generate output or allocate memory). @xref{Common Function Attributes}. -@item -finstrument-functions-once @opindex finstrument-functions-once +@item -finstrument-functions-once This is similar to @option{-finstrument-functions}, but the profiling functions are called only once per instrumented function, i.e. the first profiling function is called after the first entry into the instrumented @@ -17333,8 +17333,8 @@ once per thread, but the calls are always paired, that is to say, if a thread calls the first function, then it will call the second function, unless it never reaches the exit of the instrumented function. -@item -finstrument-functions-exclude-file-list=@var{file},@var{file},@dots{} @opindex finstrument-functions-exclude-file-list +@item -finstrument-functions-exclude-file-list=@var{file},@var{file},@dots{} Set the list of functions that are excluded from instrumentation (see the description of @option{-finstrument-functions}). If the file that @@ -17358,8 +17358,8 @@ If, for some reason, you want to include letter @samp{,} in one of @option{-finstrument-functions-exclude-file-list='\,\,tmp'} (note the single quote surrounding the option). -@item -finstrument-functions-exclude-function-list=@var{sym},@var{sym},@dots{} @opindex finstrument-functions-exclude-function-list +@item -finstrument-functions-exclude-function-list=@var{sym},@var{sym},@dots{} This is similar to @option{-finstrument-functions-exclude-file-list}, but this option sets the list of function names to be excluded from @@ -17371,8 +17371,8 @@ of the function name, it is considered to be a match. For C99 and C++ extended identifiers, the function name must be given in UTF-8, not using universal character names. -@item -fpatchable-function-entry=@var{N}[,@var{M}] @opindex fpatchable-function-entry +@item -fpatchable-function-entry=@var{N}[,@var{M}] Generate @var{N} NOPs right at the beginning of each function, with the function entry point before the @var{M}th NOP. If @var{M} is omitted, it defaults to @code{0} so the @@ -17429,8 +17429,8 @@ Options to control preprocessor diagnostics are listed in @table @gcctabopt @include cppopts.texi -@item -Wp,@var{option} @opindex Wp +@item -Wp,@var{option} You can use @option{-Wp,@var{option}} to bypass the compiler driver and pass @var{option} directly through to the preprocessor. If @var{option} contains commas, it is split into multiple options at the @@ -17441,8 +17441,8 @@ interface is undocumented and subject to change, so whenever possible you should avoid using @option{-Wp} and let the driver handle the options instead. -@item -Xpreprocessor @var{option} @opindex Xpreprocessor +@item -Xpreprocessor @var{option} Pass @var{option} as an option to the preprocessor. You can use this to supply system-specific preprocessor options that GCC does not recognize. @@ -17450,8 +17450,8 @@ recognize. If you want to pass an option that takes an argument, you must use @option{-Xpreprocessor} twice, once for the option and once for the argument. -@item -no-integrated-cpp @opindex no-integrated-cpp +@item -no-integrated-cpp Perform preprocessing as a separate pass before compilation. By default, GCC performs preprocessing as an integrated part of input tokenization and parsing. @@ -17465,8 +17465,8 @@ This option may be useful in conjunction with the @option{-B} or perform additional processing of the program source between normal preprocessing and compilation. -@item -flarge-source-files @opindex flarge-source-files +@item -flarge-source-files Adjust GCC to expect large source files, at the expense of slower compilation and higher memory usage. @@ -17489,13 +17489,13 @@ of source lines that GCC can process before it stops tracking columns. You can pass options to the assembler. @table @gcctabopt -@item -Wa,@var{option} @opindex Wa +@item -Wa,@var{option} Pass @var{option} as an option to the assembler. If @var{option} contains commas, it is split into multiple options at the commas. -@item -Xassembler @var{option} @opindex Xassembler +@item -Xassembler @var{option} Pass @var{option} as an option to the assembler. You can use this to supply system-specific assembler options that GCC does not recognize. @@ -17523,18 +17523,18 @@ distinguished from libraries by the linker according to the file contents.) If linking is done, these object files are used as input to the linker. -@item -c -@itemx -S -@itemx -E @opindex c @opindex S @opindex E +@item -c +@itemx -S +@itemx -E If any of these options is used, then the linker is not run, and object file names should not be used as arguments. @xref{Overall Options}. -@item -flinker-output=@var{type} @opindex flinker-output +@item -flinker-output=@var{type} This option controls code generation of the link-time optimizer. By default the linker output is automatically determined by the linker plugin. For debugging the compiler and if incremental linking with a @@ -17581,26 +17581,26 @@ uses @samp{nolto-rel}. To maintain whole program optimization, it is recommended to link such objects into static library instead. Alternatively it is possible to use H.J. Lu's binutils with support for mixed objects. -@item -fuse-ld=bfd @opindex fuse-ld=bfd +@item -fuse-ld=bfd Use the @command{bfd} linker instead of the default linker. -@item -fuse-ld=gold @opindex fuse-ld=gold +@item -fuse-ld=gold Use the @command{gold} linker instead of the default linker. -@item -fuse-ld=lld @opindex fuse-ld=lld +@item -fuse-ld=lld Use the LLVM @command{lld} linker instead of the default linker. -@item -fuse-ld=mold @opindex fuse-ld=mold +@item -fuse-ld=mold Use the Modern Linker (@command{mold}) instead of the default linker. @cindex Libraries +@opindex l @item -l@var{library} @itemx -l @var{library} -@opindex l Search the library named @var{library} when linking. (The second alternative with the library as a separate argument is only for POSIX compliance and is not recommended.) @@ -17626,19 +17626,19 @@ are specified. Thus, @samp{foo.o -lz bar.o} searches library @samp{z} after file @file{foo.o} but before @file{bar.o}. If @file{bar.o} refers to functions in @samp{z}, those functions may not be loaded. -@item -lobjc @opindex lobjc +@item -lobjc You need this special case of the @option{-l} option in order to link an Objective-C or Objective-C++ program. -@item -nostartfiles @opindex nostartfiles +@item -nostartfiles Do not use the standard system startup files when linking. The standard system libraries are used normally, unless @option{-nostdlib}, @option{-nolibc}, or @option{-nodefaultlibs} is used. -@item -nodefaultlibs @opindex nodefaultlibs +@item -nodefaultlibs Do not use the standard system libraries when linking. Only the libraries you specify are passed to the linker, and options specifying linkage of the system libraries, such as @option{-static-libgcc} @@ -17652,8 +17652,8 @@ These entries are usually resolved by entries in libc. These entry points should be supplied through some other mechanism when this option is specified. -@item -nolibc @opindex nolibc +@item -nolibc Do not use the C library or system libraries tightly coupled with it when linking. Still link with the startup files, @file{libgcc} or toolchain provided language support libraries such as @file{libgnat}, @file{libgfortran} @@ -17664,8 +17664,8 @@ absence of a C library is assumed, for example @option{-lpthread} or @option{-lm} in some configurations. This is intended for bare-board targets when there is indeed no C library available. -@item -nostdlib @opindex nostdlib +@item -nostdlib Do not use the standard system startup files or libraries when linking. No startup files and only the libraries you specify are passed to the linker, and options specifying linkage of the system libraries, such as @@ -17699,32 +17699,32 @@ library subroutines. constructors are called; @pxref{Collect2,,@code{collect2}, gccint, GNU Compiler Collection (GCC) Internals}.) -@item -nostdlib++ @opindex nostdlib++ +@item -nostdlib++ Do not implicitly link with standard C++ libraries. -@item -e @var{entry} -@itemx --entry=@var{entry} @opindex e @opindex entry +@item -e @var{entry} +@itemx --entry=@var{entry} Specify that the program entry point is @var{entry}. The argument is interpreted by the linker; the GNU linker accepts either a symbol name or an address. -@item -pie @opindex pie +@item -pie Produce a dynamically linked position independent executable on targets that support it. For predictable results, you must also specify the same set of options used for compilation (@option{-fpie}, @option{-fPIE}, or model suboptions) when you specify this linker option. -@item -no-pie @opindex no-pie +@item -no-pie Don't produce a dynamically linked position independent executable. -@item -static-pie @opindex static-pie +@item -static-pie Produce a static position independent executable on targets that support it. A static position independent executable is similar to a static executable, but can be loaded at any address without a dynamic linker. @@ -17732,39 +17732,39 @@ For predictable results, you must also specify the same set of options used for compilation (@option{-fpie}, @option{-fPIE}, or model suboptions) when you specify this linker option. -@item -pthread @opindex pthread +@item -pthread Link with the POSIX threads library. This option is supported on GNU/Linux targets, most other Unix derivatives, and also on x86 Cygwin and MinGW targets. On some targets this option also sets flags for the preprocessor, so it should be used consistently for both compilation and linking. -@item -r @opindex r +@item -r Produce a relocatable object as output. This is also known as partial linking. -@item -rdynamic @opindex rdynamic +@item -rdynamic Pass the flag @option{-export-dynamic} to the ELF linker, on targets that support it. This instructs the linker to add all symbols, not only used ones, to the dynamic symbol table. This option is needed for some uses of @code{dlopen} or to allow obtaining backtraces from within a program. -@item -s @opindex s +@item -s Remove all symbol table and relocation information from the executable. -@item -static @opindex static +@item -static On systems that support dynamic linking, this overrides @option{-pie} and prevents linking with the shared libraries. On other systems, this option has no effect. -@item -shared @opindex shared +@item -shared Produce a shared object which can then be linked with other objects to form an executable. Not all systems support this option. For predictable results, you must also specify the same set of options used for compilation @@ -17778,10 +17778,10 @@ is innocuous. @option{-shared} suppresses the addition of startup code to alter the floating-point environment as done with @option{-ffast-math}, @option{-Ofast} or @option{-funsafe-math-optimizations} on some targets.} -@item -shared-libgcc -@itemx -static-libgcc @opindex shared-libgcc @opindex static-libgcc +@item -shared-libgcc +@itemx -static-libgcc On systems that provide @file{libgcc} as a shared library, these options force the use of either the shared or static version, respectively. If no shared version of @file{libgcc} was built when the compiler was @@ -17813,8 +17813,8 @@ exceptions, you must link it using the G++ driver, or using the option @option{-shared-libgcc}, such that it is linked with the shared @file{libgcc}. -@item -static-libasan @opindex static-libasan +@item -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} @@ -17823,8 +17823,8 @@ option is not used, then this links against the shared version of driver to link @file{libasan} statically, without necessarily linking other libraries statically. -@item -static-libtsan @opindex static-libtsan +@item -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} @@ -17833,8 +17833,8 @@ option is not used, then this links against the shared version of driver to link @file{libtsan} statically, without necessarily linking other libraries statically. -@item -static-liblsan @opindex static-liblsan +@item -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} @@ -17843,8 +17843,8 @@ option is not used, then this links against the shared version of driver to link @file{liblsan} statically, without necessarily linking other libraries statically. -@item -static-libubsan @opindex static-libubsan +@item -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} @@ -17853,8 +17853,8 @@ option is not used, then this links against the shared version of driver to link @file{libubsan} statically, without necessarily linking other libraries statically. -@item -static-libstdc++ @opindex static-libstdc++ +@item -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 @@ -17866,23 +17866,23 @@ the program without going all the way to a fully static link. The link @file{libstdc++} statically, without necessarily linking other libraries statically. -@item -symbolic @opindex symbolic +@item -symbolic Bind references to global symbols when building a shared object. Warn about any unresolved references (unless overridden by the link editor option @option{-Xlinker -z -Xlinker defs}). Only a few systems support this option. -@item -T @var{script} @opindex T +@item -T @var{script} @cindex linker script Use @var{script} as the linker script. This option is supported by most systems using the GNU linker. On some targets, such as bare-board targets without an operating system, the @option{-T} option may be required when linking to avoid references to undefined symbols. -@item -Xlinker @var{option} @opindex Xlinker +@item -Xlinker @var{option} Pass @var{option} as an option to the linker. You can use this to supply system-specific linker options that GCC does not recognize. @@ -17900,8 +17900,8 @@ syntax than as separate arguments. For example, you can specify @option{-Xlinker -Map -Xlinker output.map}. Other linkers may not support this syntax for command-line options. -@item -Wl,@var{option} @opindex Wl +@item -Wl,@var{option} Pass @var{option} as an option to the linker. If @var{option} contains commas, it is split into multiple options at the commas. You can use this syntax to pass an argument to the option. @@ -17909,14 +17909,14 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the linker. When using the GNU linker, you can also get the same effect with @option{-Wl,-Map=output.map}. -@item -u @var{symbol} @opindex u +@item -u @var{symbol} Pretend the symbol @var{symbol} is undefined, to force linking of library modules to define it. You can use @option{-u} multiple times with different symbols to force loading of additional library modules. -@item -z @var{keyword} @opindex z +@item -z @var{keyword} @option{-z} is passed directly on to the linker along with the keyword @var{keyword}. See the section in the documentation of your linker for permitted values and their meanings. @@ -17934,20 +17934,20 @@ libraries and for parts of the compiler: @table @gcctabopt @include cppdiropts.texi -@item -iplugindir=@var{dir} @opindex iplugindir= +@item -iplugindir=@var{dir} 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 to be used by the user, but only passed by the driver. -@item -L@var{dir} @opindex L +@item -L@var{dir} Add directory @var{dir} to the list of directories to be searched for @option{-l}. -@item -B@var{prefix} @opindex B +@item -B@var{prefix} This option specifies where to find the executables, libraries, include files, and data files of the compiler itself. @@ -17990,14 +17990,14 @@ As a special kludge, if the path provided by @option{-B} is 9, then it is replaced by @file{[dir/]include}. This is to help with boot-strapping the compiler. -@item -no-canonical-prefixes @opindex no-canonical-prefixes +@item -no-canonical-prefixes Do not expand any symbolic links, resolve references to @samp{/../} or @samp{/./}, or make the path absolute when generating a relative prefix. -@item --sysroot=@var{dir} @opindex sysroot +@item --sysroot=@var{dir} Use @var{dir} as the logical root directory for headers and libraries. For example, if the compiler normally searches for headers in @file{/usr/include} and libraries in @file{/usr/lib}, it instead @@ -18012,8 +18012,8 @@ for this option. If your linker does not support this option, the header file aspect of @option{--sysroot} still works, but the library aspect does not. -@item --no-sysroot-suffix @opindex no-sysroot-suffix +@item --no-sysroot-suffix For some targets, a suffix is added to the root directory specified with @option{--sysroot}, depending on the other options used, so that headers may for example be found in @@ -18039,8 +18039,8 @@ can figure out the other form by either removing @samp{no-} or adding it. @table @gcctabopt -@item -fstack-reuse=@var{reuse-level} @opindex fstack_reuse +@item -fstack-reuse=@var{reuse-level} This option controls stack space reuse for user declared local/auto variables and compiler generated temporaries. @var{reuse_level} can be @samp{all}, @samp{named_vars}, or @samp{none}. @samp{all} enables stack reuse for all @@ -18117,8 +18117,8 @@ the behavior of older compilers in which temporaries' stack space is not reused, the aggressive stack reuse can lead to runtime errors. This option is used to control the temporary stack reuse optimization. -@item -ftrapv @opindex ftrapv +@item -ftrapv This option generates traps for signed overflow on addition, subtraction, multiplication operations. The options @option{-ftrapv} and @option{-fwrapv} override each other, so using @@ -18127,8 +18127,8 @@ The options @option{-ftrapv} and @option{-fwrapv} override each other, so using using @option{-ftrapv} @option{-fwrapv} @option{-fno-wrapv} on the command-line results in @option{-ftrapv} being effective. -@item -fwrapv @opindex fwrapv +@item -fwrapv This option instructs the compiler to assume that signed arithmetic overflow of addition, subtraction and multiplication wraps around using twos-complement representation. This flag enables some optimizations @@ -18139,20 +18139,20 @@ The options @option{-ftrapv} and @option{-fwrapv} override each other, so using using @option{-ftrapv} @option{-fwrapv} @option{-fno-wrapv} on the command-line results in @option{-ftrapv} being effective. -@item -fwrapv-pointer @opindex fwrapv-pointer +@item -fwrapv-pointer This option instructs the compiler to assume that pointer arithmetic overflow on addition and subtraction wraps around using twos-complement representation. This flag disables some optimizations which assume pointer overflow is invalid. -@item -fstrict-overflow @opindex fstrict-overflow +@item -fstrict-overflow This option implies @option{-fno-wrapv} @option{-fno-wrapv-pointer} and when negated implies @option{-fwrapv} @option{-fwrapv-pointer}. -@item -fexceptions @opindex fexceptions +@item -fexceptions Enable exception handling. Generates extra code needed to propagate exceptions. For some targets, this implies GCC generates frame unwind information for all functions, which can produce significant data @@ -18165,8 +18165,8 @@ properly with exception handlers written in C++. You may also wish to disable this option if you are compiling older C++ programs that don't use exception handling. -@item -fnon-call-exceptions @opindex fnon-call-exceptions +@item -fnon-call-exceptions Generate code that allows trapping instructions to throw exceptions. Note that this requires platform-specific runtime support that does not exist everywhere. Moreover, it only allows @emph{trapping} @@ -18175,8 +18175,8 @@ instructions. It does not allow exceptions to be thrown from arbitrary signal handlers such as @code{SIGALRM}. This enables @option{-fexceptions}. -@item -fdelete-dead-exceptions @opindex fdelete-dead-exceptions +@item -fdelete-dead-exceptions Consider that instructions that may throw exceptions but don't otherwise contribute to the execution of the program can be optimized away. This does not affect calls to functions except those with the @@ -18185,22 +18185,22 @@ This option is enabled by default for the Ada and C++ compilers, as permitted by the language specifications. Optimization passes that cause dead exceptions to be removed are enabled independently at different optimization levels. -@item -funwind-tables @opindex funwind-tables +@item -funwind-tables Similar to @option{-fexceptions}, except that it just generates any needed static data, but does not affect the generated code in any other way. You normally do not need to enable this option; instead, a language processor that needs this handling enables it on your behalf. -@item -fasynchronous-unwind-tables @opindex fasynchronous-unwind-tables +@item -fasynchronous-unwind-tables Generate unwind table in DWARF format, if supported by target machine. The table is exact at each instruction boundary, so it can be used for stack unwinding from asynchronous events (such as debugger or garbage collector). -@item -fno-gnu-unique @opindex fno-gnu-unique @opindex fgnu-unique +@item -fno-gnu-unique On systems with recent GNU assembler and C library, the C++ compiler uses the @code{STB_GNU_UNIQUE} binding to make sure that definitions of template static data members and static local variables in inline @@ -18213,8 +18213,8 @@ DSOs; if your program relies on reinitialization of a DSO via @code{dlclose} and @code{dlopen}, you can use @option{-fno-gnu-unique}. -@item -fpcc-struct-return @opindex fpcc-struct-return +@item -fpcc-struct-return Return ``short'' @code{struct} and @code{union} values in memory like longer ones, rather than in registers. This convention is less efficient, but it has the advantage of allowing intercallability between @@ -18232,8 +18232,8 @@ switch is not binary compatible with code compiled with the @option{-freg-struct-return} switch. Use it to conform to a non-default application binary interface. -@item -freg-struct-return @opindex freg-struct-return +@item -freg-struct-return Return @code{struct} and @code{union} values in registers when possible. This is more efficient for small structures than @option{-fpcc-struct-return}. @@ -18250,8 +18250,8 @@ switch is not binary compatible with code compiled with the @option{-fpcc-struct-return} switch. Use it to conform to a non-default application binary interface. -@item -fshort-enums @opindex fshort-enums +@item -fshort-enums Allocate to an @code{enum} type only as many bytes as it needs for the declared range of possible values. Specifically, the @code{enum} type is equivalent to the smallest integer type that has enough room. @@ -18260,8 +18260,8 @@ is equivalent to the smallest integer type that has enough room. code that is not binary compatible with code generated without that switch. Use it to conform to a non-default application binary interface. -@item -fshort-wchar @opindex fshort-wchar +@item -fshort-wchar Override the underlying type for @code{wchar_t} to be @code{short unsigned int} instead of the default for the target. This option is useful for building programs to run under WINE@. @@ -18270,9 +18270,9 @@ useful for building programs to run under WINE@. code that is not binary compatible with code generated without that switch. Use it to conform to a non-default application binary interface. -@item -fcommon @opindex fcommon @opindex fno-common +@item -fcommon @cindex tentative definitions In C code, this option controls the placement of global variables defined without an initializer, known as @dfn{tentative definitions} @@ -18292,21 +18292,21 @@ definition. This behavior is inconsistent with C++, and on many targets implies a speed and code size penalty on global variable references. It is mainly useful to enable legacy code to link without errors. -@item -fno-ident @opindex fno-ident @opindex fident +@item -fno-ident Ignore the @code{#ident} directive. -@item -finhibit-size-directive @opindex finhibit-size-directive +@item -finhibit-size-directive Don't output a @code{.size} assembler directive, or anything else that would cause trouble if the function is split in the middle, and the two halves are placed at locations far apart in memory. This option is used when compiling @file{crtstuff.c}; you should not need to use it for anything else. -@item -fverbose-asm @opindex fverbose-asm +@item -fverbose-asm Put extra commentary information in the generated assembly code to make it more readable. This option is generally only of use to those who actually need to read the generated assembly code (perhaps while @@ -18399,8 +18399,8 @@ test: The comments are intended for humans rather than machines and hence the precise format of the comments is subject to change. -@item -frecord-gcc-switches @opindex frecord-gcc-switches +@item -frecord-gcc-switches This switch causes the command line used to invoke the compiler to be recorded into the object file that is being created. This switch is only implemented on some targets and the exact format @@ -18412,8 +18412,8 @@ comments, so it never reaches the object file. See also @option{-grecord-gcc-switches} for another way of storing compiler options into the object file. -@item -fpic @opindex fpic +@item -fpic @cindex global offset table @cindex PIC Generate position-independent code (PIC) suitable for use in a shared @@ -18435,8 +18435,8 @@ position-independent. When this flag is set, the macros @code{__pic__} and @code{__PIC__} are defined to 1. -@item -fPIC @opindex fPIC +@item -fPIC If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the global offset table. This option makes a difference on AArch64, m68k, @@ -18448,10 +18448,10 @@ only on certain machines. When this flag is set, the macros @code{__pic__} and @code{__PIC__} are defined to 2. -@item -fpie -@itemx -fPIE @opindex fpie @opindex fPIE +@item -fpie +@itemx -fPIE These options are similar to @option{-fpic} and @option{-fPIC}, but the generated position-independent code can be only linked into executables. Usually these options are used to compile code that will be linked using @@ -18461,9 +18461,9 @@ the @option{-pie} GCC option. @code{__pie__} and @code{__PIE__}. The macros have the value 1 for @option{-fpie} and 2 for @option{-fPIE}. -@item -fno-plt @opindex fno-plt @opindex fplt +@item -fno-plt Do not use the PLT for external function calls in position-independent code. Instead, load the callee address at call sites from the GOT and branch to it. This leads to more efficient code by eliminating PLT stubs and exposing @@ -18479,9 +18479,9 @@ through the PLT for specific external functions. In position-dependent code, a few targets also convert calls to functions that are marked to not use the PLT to use the GOT instead. -@item -fno-jump-tables @opindex fno-jump-tables @opindex fjump-tables +@item -fno-jump-tables Do not use jump tables for switch statements even where it would be more efficient than other code generation strategies. This option is of use in conjunction with @option{-fpic} or @option{-fPIC} for @@ -18489,14 +18489,14 @@ building code that forms part of a dynamic linker and cannot reference the address of a jump table. On some targets, jump tables do not require a GOT and this option is not needed. -@item -fno-bit-tests @opindex fno-bit-tests @opindex fbit-tests +@item -fno-bit-tests Do not use bit tests for switch statements even where it would be more efficient than other code generation strategies. -@item -ffixed-@var{reg} @opindex ffixed +@item -ffixed-@var{reg} Treat the register named @var{reg} as a fixed register; generated code should never refer to it (except perhaps as a stack pointer, frame pointer or in some other fixed role). @@ -18508,8 +18508,8 @@ macro in the machine description macro file. This flag does not have a negative form, because it specifies a three-way choice. -@item -fcall-used-@var{reg} @opindex fcall-used +@item -fcall-used-@var{reg} Treat the register named @var{reg} as an allocable register that is clobbered by function calls. It may be allocated for temporaries or variables that do not live across a call. Functions compiled this way @@ -18522,8 +18522,8 @@ the machine's execution model produces disastrous results. This flag does not have a negative form, because it specifies a three-way choice. -@item -fcall-saved-@var{reg} @opindex fcall-saved +@item -fcall-saved-@var{reg} Treat the register named @var{reg} as an allocable register saved by functions. It may be allocated even for temporaries or variables that live across a call. Functions compiled this way save and restore @@ -18539,8 +18539,8 @@ a register in which function values may be returned. This flag does not have a negative form, because it specifies a three-way choice. -@item -fpack-struct[=@var{n}] @opindex fpack-struct +@item -fpack-struct[=@var{n}] Without a value specified, pack all structure members together without holes. When a value is specified (which must be a small power of two), pack structure members according to this value, representing the maximum @@ -18552,8 +18552,8 @@ code that is not binary compatible with code generated without that switch. Additionally, it makes the code suboptimal. Use it to conform to a non-default application binary interface. -@item -fleading-underscore @opindex fleading-underscore +@item -fleading-underscore This option and its counterpart, @option{-fno-leading-underscore}, forcibly change the way C symbols are represented in the object file. One use is to help link with legacy assembly code. @@ -18563,8 +18563,8 @@ generate code that is not binary compatible with code generated without that switch. Use it to conform to a non-default application binary interface. Not all targets provide complete support for this switch. -@item -ftls-model=@var{model} @opindex ftls-model +@item -ftls-model=@var{model} Alter the thread-local storage model to be used (@pxref{Thread-Local}). The @var{model} argument should be one of @samp{global-dynamic}, @samp{local-dynamic}, @samp{initial-exec} or @samp{local-exec}. @@ -18575,8 +18575,8 @@ unit, or if @option{-fpic} is not given on the command line. The default without @option{-fpic} is @samp{initial-exec}; with @option{-fpic} the default is @samp{global-dynamic}. -@item -ftrampolines @opindex ftrampolines +@item -ftrampolines For targets that normally need trampolines for nested functions, always generate them instead of using descriptors. Otherwise, for targets that do not need them, like for example HP-PA or IA-64, do nothing. @@ -18602,8 +18602,8 @@ For languages other than Ada, the @code{-ftrampolines} and trampolines are always generated on platforms that need them for nested functions. -@item -fvisibility=@r{[}default@r{|}internal@r{|}hidden@r{|}protected@r{]} @opindex fvisibility +@item -fvisibility=@r{[}default@r{|}internal@r{|}hidden@r{|}protected@r{]} Set the default ELF image symbol visibility to the specified option---all symbols are marked with this unless overridden within the code. Using this feature can very substantially improve linking and @@ -18668,8 +18668,8 @@ the DSOs. An overview of these techniques, their benefits and how to use them is at @uref{https://gcc.gnu.org/@/wiki/@/Visibility}. -@item -fstrict-volatile-bitfields @opindex fstrict-volatile-bitfields +@item -fstrict-volatile-bitfields This option should be used if accesses to volatile bit-fields (or other structure fields, although the compiler usually honors those types anyway) should use a single access of the width of the @@ -18699,8 +18699,8 @@ to define all bits of the field's type as bit-field members. The default value of this option is determined by the application binary interface for the target processor. -@item -fsync-libcalls @opindex fsync-libcalls +@item -fsync-libcalls This option controls whether any out-of-line instance of the @code{__sync} family of functions may be used to implement the C++11 @code{__atomic} family of functions. @@ -18751,9 +18751,9 @@ The files are created in the directory of the output file. @table @gcctabopt +@opindex fcallgraph-info @item -fcallgraph-info @itemx -fcallgraph-info=@var{MARKERS} -@opindex fcallgraph-info Makes the compiler output callgraph information for the program, on a per-object-file basis. The information is generated in the common VCG format. It can be decorated with additional, per-node and/or per-edge @@ -18769,11 +18769,11 @@ along with the object file. At LTO link time, @option{-fcallgraph-info} may generate multiple callgraph information files next to intermediate LTO output files. +@opindex d +@opindex fdump-rtl-@var{pass} @item -d@var{letters} @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. @@ -18788,326 +18788,326 @@ letters for use in @var{pass} and @var{letters}, and their meanings: @table @gcctabopt -@item -fdump-rtl-alignments @opindex fdump-rtl-alignments +@item -fdump-rtl-alignments Dump after branch alignments have been computed. -@item -fdump-rtl-asmcons @opindex fdump-rtl-asmcons +@item -fdump-rtl-asmcons Dump after fixing rtl statements that have unsatisfied in/out constraints. -@item -fdump-rtl-auto_inc_dec @opindex fdump-rtl-auto_inc_dec +@item -fdump-rtl-auto_inc_dec Dump after auto-inc-dec discovery. This pass is only run on architectures that have auto inc or auto dec instructions. -@item -fdump-rtl-barriers @opindex fdump-rtl-barriers +@item -fdump-rtl-barriers Dump after cleaning up the barrier instructions. -@item -fdump-rtl-bbpart @opindex fdump-rtl-bbpart +@item -fdump-rtl-bbpart Dump after partitioning hot and cold basic blocks. -@item -fdump-rtl-bbro @opindex fdump-rtl-bbro +@item -fdump-rtl-bbro Dump after block reordering. -@item -fdump-rtl-btl1 -@itemx -fdump-rtl-btl2 @opindex fdump-rtl-btl2 @opindex fdump-rtl-btl2 +@item -fdump-rtl-btl1 +@itemx -fdump-rtl-btl2 @option{-fdump-rtl-btl1} and @option{-fdump-rtl-btl2} enable dumping after the two branch target load optimization passes. -@item -fdump-rtl-bypass @opindex fdump-rtl-bypass +@item -fdump-rtl-bypass Dump after jump bypassing and control flow optimizations. -@item -fdump-rtl-combine @opindex fdump-rtl-combine +@item -fdump-rtl-combine Dump after the RTL instruction combination pass. -@item -fdump-rtl-compgotos @opindex fdump-rtl-compgotos +@item -fdump-rtl-compgotos Dump after duplicating the computed gotos. -@item -fdump-rtl-ce1 -@itemx -fdump-rtl-ce2 -@itemx -fdump-rtl-ce3 @opindex fdump-rtl-ce1 @opindex fdump-rtl-ce2 @opindex fdump-rtl-ce3 +@item -fdump-rtl-ce1 +@itemx -fdump-rtl-ce2 +@itemx -fdump-rtl-ce3 @option{-fdump-rtl-ce1}, @option{-fdump-rtl-ce2}, and @option{-fdump-rtl-ce3} enable dumping after the three if conversion passes. -@item -fdump-rtl-cprop_hardreg @opindex fdump-rtl-cprop_hardreg +@item -fdump-rtl-cprop_hardreg Dump after hard register copy propagation. -@item -fdump-rtl-csa @opindex fdump-rtl-csa +@item -fdump-rtl-csa Dump after combining stack adjustments. -@item -fdump-rtl-cse1 -@itemx -fdump-rtl-cse2 @opindex fdump-rtl-cse1 @opindex fdump-rtl-cse2 +@item -fdump-rtl-cse1 +@itemx -fdump-rtl-cse2 @option{-fdump-rtl-cse1} and @option{-fdump-rtl-cse2} enable dumping after the two common subexpression elimination passes. -@item -fdump-rtl-dce @opindex fdump-rtl-dce +@item -fdump-rtl-dce Dump after the standalone dead code elimination passes. -@item -fdump-rtl-dbr @opindex fdump-rtl-dbr +@item -fdump-rtl-dbr Dump after delayed branch scheduling. -@item -fdump-rtl-dce1 -@itemx -fdump-rtl-dce2 @opindex fdump-rtl-dce1 @opindex fdump-rtl-dce2 +@item -fdump-rtl-dce1 +@itemx -fdump-rtl-dce2 @option{-fdump-rtl-dce1} and @option{-fdump-rtl-dce2} enable dumping after the two dead store elimination passes. -@item -fdump-rtl-eh @opindex fdump-rtl-eh +@item -fdump-rtl-eh Dump after finalization of EH handling code. -@item -fdump-rtl-eh_ranges @opindex fdump-rtl-eh_ranges +@item -fdump-rtl-eh_ranges Dump after conversion of EH handling range regions. -@item -fdump-rtl-expand @opindex fdump-rtl-expand +@item -fdump-rtl-expand Dump after RTL generation. -@item -fdump-rtl-fwprop1 -@itemx -fdump-rtl-fwprop2 @opindex fdump-rtl-fwprop1 @opindex fdump-rtl-fwprop2 +@item -fdump-rtl-fwprop1 +@itemx -fdump-rtl-fwprop2 @option{-fdump-rtl-fwprop1} and @option{-fdump-rtl-fwprop2} enable dumping after the two forward propagation passes. -@item -fdump-rtl-gcse1 -@itemx -fdump-rtl-gcse2 @opindex fdump-rtl-gcse1 @opindex fdump-rtl-gcse2 +@item -fdump-rtl-gcse1 +@itemx -fdump-rtl-gcse2 @option{-fdump-rtl-gcse1} and @option{-fdump-rtl-gcse2} enable dumping after global common subexpression elimination. -@item -fdump-rtl-init-regs @opindex fdump-rtl-init-regs +@item -fdump-rtl-init-regs Dump after the initialization of the registers. -@item -fdump-rtl-initvals @opindex fdump-rtl-initvals +@item -fdump-rtl-initvals Dump after the computation of the initial value sets. -@item -fdump-rtl-into_cfglayout @opindex fdump-rtl-into_cfglayout +@item -fdump-rtl-into_cfglayout Dump after converting to cfglayout mode. -@item -fdump-rtl-ira @opindex fdump-rtl-ira +@item -fdump-rtl-ira Dump after iterated register allocation. -@item -fdump-rtl-jump @opindex fdump-rtl-jump +@item -fdump-rtl-jump Dump after the second jump optimization. -@item -fdump-rtl-loop2 @opindex fdump-rtl-loop2 +@item -fdump-rtl-loop2 @option{-fdump-rtl-loop2} enables dumping after the rtl loop optimization passes. -@item -fdump-rtl-mach @opindex fdump-rtl-mach +@item -fdump-rtl-mach Dump after performing the machine dependent reorganization pass, if that pass exists. -@item -fdump-rtl-mode_sw @opindex fdump-rtl-mode_sw +@item -fdump-rtl-mode_sw Dump after removing redundant mode switches. -@item -fdump-rtl-rnreg @opindex fdump-rtl-rnreg +@item -fdump-rtl-rnreg Dump after register renumbering. -@item -fdump-rtl-outof_cfglayout @opindex fdump-rtl-outof_cfglayout +@item -fdump-rtl-outof_cfglayout Dump after converting from cfglayout mode. -@item -fdump-rtl-peephole2 @opindex fdump-rtl-peephole2 +@item -fdump-rtl-peephole2 Dump after the peephole pass. -@item -fdump-rtl-postreload @opindex fdump-rtl-postreload +@item -fdump-rtl-postreload Dump after post-reload optimizations. -@item -fdump-rtl-pro_and_epilogue @opindex fdump-rtl-pro_and_epilogue +@item -fdump-rtl-pro_and_epilogue Dump after generating the function prologues and epilogues. -@item -fdump-rtl-sched1 -@itemx -fdump-rtl-sched2 @opindex fdump-rtl-sched1 @opindex fdump-rtl-sched2 +@item -fdump-rtl-sched1 +@itemx -fdump-rtl-sched2 @option{-fdump-rtl-sched1} and @option{-fdump-rtl-sched2} enable dumping after the basic block scheduling passes. -@item -fdump-rtl-ree @opindex fdump-rtl-ree +@item -fdump-rtl-ree Dump after sign/zero extension elimination. -@item -fdump-rtl-seqabstr @opindex fdump-rtl-seqabstr +@item -fdump-rtl-seqabstr Dump after common sequence discovery. -@item -fdump-rtl-shorten @opindex fdump-rtl-shorten +@item -fdump-rtl-shorten Dump after shortening branches. -@item -fdump-rtl-sibling @opindex fdump-rtl-sibling +@item -fdump-rtl-sibling Dump after sibling call optimizations. -@item -fdump-rtl-split1 -@itemx -fdump-rtl-split2 -@itemx -fdump-rtl-split3 -@itemx -fdump-rtl-split4 -@itemx -fdump-rtl-split5 @opindex fdump-rtl-split1 @opindex fdump-rtl-split2 @opindex fdump-rtl-split3 @opindex fdump-rtl-split4 @opindex fdump-rtl-split5 +@item -fdump-rtl-split1 +@itemx -fdump-rtl-split2 +@itemx -fdump-rtl-split3 +@itemx -fdump-rtl-split4 +@itemx -fdump-rtl-split5 These options enable dumping after five rounds of instruction splitting. -@item -fdump-rtl-sms @opindex fdump-rtl-sms +@item -fdump-rtl-sms Dump after modulo scheduling. This pass is only run on some architectures. -@item -fdump-rtl-stack @opindex fdump-rtl-stack +@item -fdump-rtl-stack Dump after conversion from GCC's ``flat register file'' registers to the x87's stack-like registers. This pass is only run on x86 variants. -@item -fdump-rtl-subreg1 -@itemx -fdump-rtl-subreg2 @opindex fdump-rtl-subreg1 @opindex fdump-rtl-subreg2 +@item -fdump-rtl-subreg1 +@itemx -fdump-rtl-subreg2 @option{-fdump-rtl-subreg1} and @option{-fdump-rtl-subreg2} enable dumping after the two subreg expansion passes. -@item -fdump-rtl-unshare @opindex fdump-rtl-unshare +@item -fdump-rtl-unshare Dump after all rtl has been unshared. -@item -fdump-rtl-vartrack @opindex fdump-rtl-vartrack +@item -fdump-rtl-vartrack Dump after variable tracking. -@item -fdump-rtl-vregs @opindex fdump-rtl-vregs +@item -fdump-rtl-vregs Dump after converting virtual registers to hard registers. -@item -fdump-rtl-web @opindex fdump-rtl-web +@item -fdump-rtl-web Dump after live range splitting. -@item -fdump-rtl-regclass -@itemx -fdump-rtl-subregs_of_mode_init -@itemx -fdump-rtl-subregs_of_mode_finish -@itemx -fdump-rtl-dfinit -@itemx -fdump-rtl-dfinish @opindex fdump-rtl-regclass @opindex fdump-rtl-subregs_of_mode_init @opindex fdump-rtl-subregs_of_mode_finish @opindex fdump-rtl-dfinit @opindex fdump-rtl-dfinish +@item -fdump-rtl-regclass +@itemx -fdump-rtl-subregs_of_mode_init +@itemx -fdump-rtl-subregs_of_mode_finish +@itemx -fdump-rtl-dfinit +@itemx -fdump-rtl-dfinish These dumps are defined but always produce empty files. -@item -da -@itemx -fdump-rtl-all @opindex da @opindex fdump-rtl-all +@item -da +@itemx -fdump-rtl-all Produce all the dumps listed above. -@item -dA @opindex dA +@item -dA Annotate the assembler output with miscellaneous debugging information. -@item -dD @opindex dD +@item -dD Dump all macro definitions, at the end of preprocessing, in addition to normal output. -@item -dH @opindex dH +@item -dH Produce a core dump whenever an error occurs. -@item -dp @opindex dp +@item -dp Annotate the assembler output with a comment indicating which pattern and alternative is used. The length and cost of each instruction are also printed. -@item -dP @opindex dP +@item -dP Dump the RTL in the assembler output as a comment before each instruction. Also turns on @option{-dp} annotation. -@item -dx @opindex dx +@item -dx Just generate RTL for a function instead of compiling it. Usually used with @option{-fdump-rtl-expand}. @end table -@item -fdump-debug @opindex fdump-debug +@item -fdump-debug Dump debugging information generated during the debug generation phase. -@item -fdump-earlydebug @opindex fdump-earlydebug +@item -fdump-earlydebug Dump debugging information generated during the early debug generation phase. -@item -fdump-noaddr @opindex fdump-noaddr +@item -fdump-noaddr When doing debugging dumps, suppress address output. This makes it more feasible to use diff on debugging dumps for compiler invocations with different compiler binaries and/or different text / bss / data / heap / stack / dso start locations. -@item -freport-bug @opindex freport-bug +@item -freport-bug Collect and dump debug information into a temporary file if an internal compiler error (ICE) occurs. -@item -fdump-unnumbered @opindex fdump-unnumbered +@item -fdump-unnumbered When doing debugging dumps, suppress instruction numbers and address output. This makes it more feasible to use diff on debugging dumps for compiler invocations with different options, in particular with and without @option{-g}. -@item -fdump-unnumbered-links @opindex fdump-unnumbered-links +@item -fdump-unnumbered-links When doing debugging dumps (see @option{-d} option above), suppress instruction numbers for the links to the previous and next instructions in a sequence. +@opindex fdump-ipa @item -fdump-ipa-@var{switch} @itemx -fdump-ipa-@var{switch}-@var{options} -@opindex fdump-ipa Control the dumping at various stages of inter-procedural analysis language tree to a file. The file name is generated by appending a switch specific suffix to the source file name, and the file is created @@ -19139,17 +19139,17 @@ By default, the dump will contain messages about successful optimizations (equivalent to @option{-optimized}) together with low-level details about the analysis. -@item -fdump-lang @opindex fdump-lang +@item -fdump-lang Dump language-specific information. The file name is made by appending @file{.lang} to the source file name. +@opindex fdump-lang-all +@opindex fdump-lang @item -fdump-lang-all @itemx -fdump-lang-@var{switch} @itemx -fdump-lang-@var{switch}-@var{options} @itemx -fdump-lang-@var{switch}-@var{options}=@var{filename} -@opindex fdump-lang-all -@opindex fdump-lang Control the dumping of language-specific information. The @var{options} and @var{filename} portions behave as described in the @option{-fdump-tree} option. The following @var{switch} values are @@ -19177,13 +19177,13 @@ Dump the raw internal tree data. This option is applicable to C++ only. @end table -@item -fdump-passes @opindex fdump-passes +@item -fdump-passes Print on @file{stderr} the list of optimization passes that are turned on and off by the current command-line options. -@item -fdump-statistics-@var{option} @opindex fdump-statistics +@item -fdump-statistics-@var{option} Enable and control dumping of pass statistics in a separate file. The file name is generated by appending a suffix ending in @samp{.statistics} to the source file name, and the file is created in @@ -19193,12 +19193,12 @@ whole compilation unit while @samp{-details} dumps every event as the passes generate them. The default with no option is to sum counters for each function compiled. +@opindex fdump-tree-all +@opindex fdump-tree @item -fdump-tree-all @itemx -fdump-tree-@var{switch} @itemx -fdump-tree-@var{switch}-@var{options} @itemx -fdump-tree-@var{switch}-@var{options}=@var{filename} -@opindex fdump-tree-all -@opindex fdump-tree Control the dumping at various stages of processing the intermediate language tree to a file. If the @samp{-@var{options}} form is used, @var{options} is a list of @samp{-} separated options @@ -19303,10 +19303,10 @@ directory. Note that the numeric codes are not stable and may change from one version of GCC to another. @end enumerate +@opindex fopt-info @item -fopt-info @itemx -fopt-info-@var{options} @itemx -fopt-info-@var{options}=@var{filename} -@opindex fopt-info Controls optimization dumps from various optimization passes. If the @samp{-@var{options}} form is used, @var{options} is a list of @samp{-} separated option keywords to select the dump details and @@ -19440,8 +19440,8 @@ the first option takes effect and the subsequent options are ignored. Thus only @file{vec.miss} is produced which contains dumps from the vectorizer about missed opportunities. -@item -fsave-optimization-record @opindex fsave-optimization-record +@item -fsave-optimization-record Write a SRCFILE.opt-record.json.gz file detailing what optimizations were performed, for those optimizations that support @option{-fopt-info}. @@ -19485,8 +19485,8 @@ Additionally, some messages are logically nested within other messages, reflecting implementation details of the optimization passes. -@item -fsched-verbose=@var{n} @opindex fsched-verbose +@item -fsched-verbose=@var{n} On targets that use instruction scheduling, this option controls the amount of debugging output the scheduler prints to the dump files. @@ -19500,10 +19500,10 @@ dependence info. -@item -fenable-@var{kind}-@var{pass} -@itemx -fdisable-@var{kind}-@var{pass}=@var{range-list} @opindex fdisable- @opindex fenable- +@item -fenable-@var{kind}-@var{pass} +@itemx -fdisable-@var{kind}-@var{pass}=@var{range-list} This is a set of options that are used to explicitly disable/enable optimization passes. These options are intended for use for debugging GCC. @@ -19573,16 +19573,16 @@ Here are some examples showing uses of these options. @end smallexample -@item -fchecking -@itemx -fchecking=@var{n} @opindex fchecking @opindex fno-checking +@item -fchecking +@itemx -fchecking=@var{n} Enable internal consistency checking. The default depends on the compiler configuration. @option{-fchecking=2} enables further internal consistency checking that might affect code generation. -@item -frandom-seed=@var{string} @opindex frandom-seed +@item -frandom-seed=@var{string} This option provides a seed that GCC uses in place of random numbers in generating certain symbol names that have to be different in every compiled file. It is also used to @@ -19596,8 +19596,8 @@ computing CRC32). The @var{string} should be different for every file you compile. -@item -save-temps @opindex save-temps +@item -save-temps Store the usual ``temporary'' intermediate files permanently; name them as auxiliary output files, as specified described under @option{-dumpbase} and @option{-dumpdir}. @@ -19608,20 +19608,20 @@ input source file with the same extension as an intermediate file. The corresponding intermediate file may be obtained by renaming the source file before using @option{-save-temps}. -@item -save-temps=cwd @opindex save-temps=cwd +@item -save-temps=cwd Equivalent to @option{-save-temps -dumpdir ./}. -@item -save-temps=obj @opindex save-temps=obj +@item -save-temps=obj Equivalent to @option{-save-temps -dumpdir @file{outdir/}}, where @file{outdir/} is the directory of the output file specified after the @option{-o} option, including any directory separators. If the @option{-o} option is not used, the @option{-save-temps=obj} switch behaves like @option{-save-temps=cwd}. -@item -time@r{[}=@var{file}@r{]} @opindex time +@item -time@r{[}=@var{file}@r{]} Report the CPU time taken by each subprocess in the compilation sequence. For C source files, this is the compiler proper and assembler (plus the linker if linking is done). @@ -19650,16 +19650,16 @@ The ``user time'' and the ``system time'' are moved before the program name, and the options passed to the program are displayed, so that one can later tell what file was being compiled, and with which options. -@item -fdump-final-insns@r{[}=@var{file}@r{]} @opindex fdump-final-insns +@item -fdump-final-insns@r{[}=@var{file}@r{]} Dump the final internal representation (RTL) to @var{file}. If the optional argument is omitted (or if @var{file} is @code{.}), the name of the dump file is determined by appending @code{.gkd} to the dump base name, see @option{-dumpbase}. -@item -fcompare-debug@r{[}=@var{opts}@r{]} @opindex fcompare-debug @opindex fno-compare-debug +@item -fcompare-debug@r{[}=@var{opts}@r{]} If no error occurs during compilation, run the compiler a second time, adding @var{opts} and @option{-fcompare-debug-second} to the arguments passed to the second compilation. Dump the final internal @@ -19685,8 +19685,8 @@ which GCC rejects as an invalid option in any actual compilation warning, setting @env{GCC_COMPARE_DEBUG} to @samp{-w%n-fcompare-debug not overridden} will do. -@item -fcompare-debug-second @opindex fcompare-debug-second +@item -fcompare-debug-second This option is implicitly passed to the compiler for the second compilation requested by @option{-fcompare-debug}, along with options to silence warnings, and omitting other options that would cause the compiler @@ -19699,8 +19699,8 @@ When this option is passed to the compiler driver, it causes the @emph{first} compilation to be skipped, which makes it useful for little other than debugging the compiler proper. -@item -gtoggle @opindex gtoggle +@item -gtoggle Turn off generation of debug info, if leaving out this option generates it, or turn it on at level 2 otherwise. The position of this argument in the command line does not matter; it takes effect after all @@ -19708,34 +19708,34 @@ other options are processed, and it does so only once, no matter how many times it is given. This is mainly intended to be used with @option{-fcompare-debug}. -@item -fvar-tracking-assignments-toggle @opindex fvar-tracking-assignments-toggle @opindex fno-var-tracking-assignments-toggle +@item -fvar-tracking-assignments-toggle Toggle @option{-fvar-tracking-assignments}, in the same way that @option{-gtoggle} toggles @option{-g}. -@item -Q @opindex Q +@item -Q Makes the compiler print out each function name as it is compiled, and print some statistics about each pass when it finishes. -@item -ftime-report @opindex ftime-report +@item -ftime-report Makes the compiler print some statistics about the time consumed by each pass when it finishes. -@item -ftime-report-details @opindex ftime-report-details +@item -ftime-report-details Record the time consumed by infrastructure parts separately for each pass. -@item -fira-verbose=@var{n} @opindex fira-verbose +@item -fira-verbose=@var{n} Control the verbosity of the dump file for the integrated register allocator. The default value is 5. If the value @var{n} is greater or equal to 10, the dump output is sent to stderr using the same format as @var{n} minus 10. -@item -flto-report @opindex flto-report +@item -flto-report Prints a report with internal details on the workings of the link-time optimizer. The contents of this report vary from version to version. It is meant to be useful to GCC developers when processing object @@ -19743,30 +19743,30 @@ files in LTO mode (via @option{-flto}). Disabled by default. -@item -flto-report-wpa @opindex flto-report-wpa +@item -flto-report-wpa Like @option{-flto-report}, but only print for the WPA phase of link-time optimization. -@item -fmem-report @opindex fmem-report +@item -fmem-report Makes the compiler print some statistics about permanent memory allocation when it finishes. -@item -fmem-report-wpa @opindex fmem-report-wpa +@item -fmem-report-wpa Makes the compiler print some statistics about permanent memory allocation for the WPA phase only. -@item -fpre-ipa-mem-report @opindex fpre-ipa-mem-report -@item -fpost-ipa-mem-report @opindex fpost-ipa-mem-report +@item -fpre-ipa-mem-report +@item -fpost-ipa-mem-report Makes the compiler print some statistics about permanent memory allocation before or after interprocedural optimization. -@item -fmultiflags @opindex fmultiflags +@item -fmultiflags This option enables multilib-aware @code{TFLAGS} to be used to build target libraries with options different from those the compiler is configured to use by default, through the use of specs (@xref{Spec @@ -19793,13 +19793,13 @@ all target libraries, by configuring a non-bootstrap compiler @samp{--with-specs='%@{!fmultiflags:%emissing TFLAGS@}'} and building the compiler and target libraries. -@item -fprofile-report @opindex fprofile-report +@item -fprofile-report Makes the compiler print some statistics about consistency of the (estimated) profile and effect of individual passes. -@item -fstack-usage @opindex fstack-usage +@item -fstack-usage Makes the compiler output stack usage information for the program, on a per-function basis. The filename for the dump is made by appending @file{.su} to the @var{auxname}. @var{auxname} is generated from the name of @@ -19831,19 +19831,19 @@ the function. If it is not present, the amount of these adjustments is not bounded at compile time and the second field only represents the bounded part. -@item -fstats @opindex fstats +@item -fstats Emit statistics about front-end processing at the end of the compilation. This option is supported only by the C++ front end, and the information is generally only useful to the G++ development team. -@item -fdbg-cnt-list @opindex fdbg-cnt-list +@item -fdbg-cnt-list Print the name and the counter upper bound for all debug counters. -@item -fdbg-cnt=@var{counter-value-list} @opindex fdbg-cnt +@item -fdbg-cnt=@var{counter-value-list} Set the internal debug counter lower and upper bound. @var{counter-value-list} is a comma-separated list of @var{name}:@var{lower_bound1}-@var{upper_bound1} [:@var{lower_bound2}-@var{upper_bound2}...] tuples which sets @@ -19855,29 +19855,29 @@ For example, with @option{-fdbg-cnt=dce:2-4:10-11,tail_call:10}, eleventh invocation. For @code{dbg_cnt(tail_call)} true is returned for first 10 invocations. -@item -print-file-name=@var{library} @opindex print-file-name +@item -print-file-name=@var{library} Print the full absolute name of the library file @var{library} that would be used when linking---and don't do anything else. With this option, GCC does not compile or link anything; it just prints the file name. -@item -print-multi-directory @opindex print-multi-directory +@item -print-multi-directory Print the directory name corresponding to the multilib selected by any other switches present in the command line. This directory is supposed to exist in @env{GCC_EXEC_PREFIX}. -@item -print-multi-lib @opindex print-multi-lib +@item -print-multi-lib Print the mapping from multilib directory names to compiler switches that enable them. The directory name is separated from the switches by @samp{;}, and each switch starts with an @samp{@@} instead of the @samp{-}, without spaces between multiple switches. This is supposed to ease shell processing. -@item -print-multi-os-directory @opindex print-multi-os-directory +@item -print-multi-os-directory Print the path to OS libraries for the selected multilib, relative to some @file{lib} subdirectory. If OS libraries are present in the @file{lib} subdirectory and no multilibs are used, this is @@ -19886,17 +19886,17 @@ sibling directories this prints e.g.@: @file{../lib64}, @file{../lib} or @file{../lib32}, or if OS libraries are present in @file{lib/@var{subdir}} subdirectories it prints e.g.@: @file{amd64}, @file{sparcv9} or @file{ev6}. -@item -print-multiarch @opindex print-multiarch +@item -print-multiarch Print the path to OS libraries for the selected multiarch, relative to some @file{lib} subdirectory. -@item -print-prog-name=@var{program} @opindex print-prog-name +@item -print-prog-name=@var{program} Like @option{-print-file-name}, but searches for a program such as @command{cpp}. -@item -print-libgcc-file-name @opindex print-libgcc-file-name +@item -print-libgcc-file-name Same as @option{-print-file-name=libgcc.a}. This is useful when you use @option{-nostdlib} or @option{-nodefaultlibs} @@ -19906,8 +19906,8 @@ but you do want to link with @file{libgcc.a}. You can do: gcc -nostdlib @var{files}@dots{} `gcc -print-libgcc-file-name` @end smallexample -@item -print-search-dirs @opindex print-search-dirs +@item -print-search-dirs Print the name of the configured installation directory and a list of program and library directories @command{gcc} searches---and don't do anything else. @@ -19919,27 +19919,27 @@ variable @env{GCC_EXEC_PREFIX} to the directory where you installed them. Don't forget the trailing @samp{/}. @xref{Environment Variables}. -@item -print-sysroot @opindex print-sysroot +@item -print-sysroot Print the target sysroot directory that is used during compilation. This is the target sysroot specified either at configure time or using the @option{--sysroot} option, possibly with an extra suffix that depends on compilation options. If no target sysroot is specified, the option prints nothing. -@item -print-sysroot-headers-suffix @opindex print-sysroot-headers-suffix +@item -print-sysroot-headers-suffix Print the suffix added to the target sysroot when searching for headers, or give an error if the compiler is not configured with such a suffix---and don't do anything else. -@item -dumpmachine @opindex dumpmachine +@item -dumpmachine Print the compiler's target machine (for example, @samp{i686-pc-linux-gnu})---and don't do anything else. -@item -dumpversion @opindex dumpversion +@item -dumpversion Print the compiler version (for example, @code{3.0}, @code{6.3.0} or @code{7})---and don't do anything else. This is the compiler version used in filesystem paths and specs. Depending on how the compiler has been configured it can be just @@ -19947,13 +19947,13 @@ a single number (major version), two numbers separated by a dot (major and minor version) or three numbers separated by dots (major, minor and patchlevel version). -@item -dumpfullversion @opindex dumpfullversion +@item -dumpfullversion Print the full compiler version---and don't do anything else. The output is always three numbers separated by dots, major, minor and patchlevel version. -@item -dumpspecs @opindex dumpspecs +@item -dumpspecs Print the compiler's built-in specs---and don't do anything else. (This is used when GCC itself is being built.) @xref{Spec Files}. @end table @@ -20049,8 +20049,8 @@ These options are defined for AArch64 implementations: @table @gcctabopt -@item -mabi=@var{name} @opindex mabi +@item -mabi=@var{name} Generate code for the specified data model. Permissible values are @samp{ilp32} for SysV-like data model where int, long int and pointers are 32 bits, and @samp{lp64} for SysV-like data model where int is 32 bits, @@ -20060,61 +20060,61 @@ The default depends on the specific target configuration. Note that the LP64 and ILP32 ABIs are not link-compatible; you must compile your entire program with the same ABI, and link with a compatible set of libraries. -@item -mbig-endian @opindex mbig-endian +@item -mbig-endian Generate big-endian code. This is the default when GCC is configured for an @samp{aarch64_be-*-*} target. -@item -mgeneral-regs-only @opindex mgeneral-regs-only +@item -mgeneral-regs-only Generate code which uses only the general-purpose registers. This will prevent the compiler from using floating-point and Advanced SIMD registers but will not impose any restrictions on the assembler. -@item -mlittle-endian @opindex mlittle-endian +@item -mlittle-endian Generate little-endian code. This is the default when GCC is configured for an @samp{aarch64-*-*} but not an @samp{aarch64_be-*-*} target. -@item -mcmodel=tiny @opindex mcmodel=tiny +@item -mcmodel=tiny Generate code for the tiny code model. The program and its statically defined symbols must be within 1MB of each other. Programs can be statically or dynamically linked. -@item -mcmodel=small @opindex mcmodel=small +@item -mcmodel=small Generate code for the small code model. The program and its statically defined symbols must be within 4GB of each other. Programs can be statically or dynamically linked. This is the default code model. -@item -mcmodel=large @opindex mcmodel=large +@item -mcmodel=large Generate code for the large code model. This makes no assumptions about addresses and sizes of sections. Programs can be statically linked only. The @option{-mcmodel=large} option is incompatible with @option{-mabi=ilp32}, @option{-fpic} and @option{-fPIC}. -@item -mstrict-align -@itemx -mno-strict-align @opindex mstrict-align @opindex mno-strict-align +@item -mstrict-align +@itemx -mno-strict-align Avoid or allow generating memory accesses that may not be aligned on a natural object boundary as described in the architecture specification. -@item -momit-leaf-frame-pointer -@itemx -mno-omit-leaf-frame-pointer @opindex momit-leaf-frame-pointer @opindex mno-omit-leaf-frame-pointer +@item -momit-leaf-frame-pointer +@itemx -mno-omit-leaf-frame-pointer Omit or keep the frame pointer in leaf functions. The former behavior is the default. -@item -mstack-protector-guard=@var{guard} -@itemx -mstack-protector-guard-reg=@var{reg} -@itemx -mstack-protector-guard-offset=@var{offset} @opindex mstack-protector-guard @opindex mstack-protector-guard-reg @opindex mstack-protector-guard-offset +@item -mstack-protector-guard=@var{guard} +@itemx -mstack-protector-guard-reg=@var{reg} +@itemx -mstack-protector-guard-offset=@var{offset} Generate stack protection code using canary at @var{guard}. Supported locations are @samp{global} for a global canary or @samp{sysreg} for a canary in an appropriate system register. @@ -20127,51 +20127,51 @@ and from what offset from that base register. There is no default register or offset as this is entirely for use within the Linux kernel. -@item -mtls-dialect=desc @opindex mtls-dialect=desc +@item -mtls-dialect=desc Use TLS descriptors as the thread-local storage mechanism for dynamic accesses of TLS variables. This is the default. -@item -mtls-dialect=traditional @opindex mtls-dialect=traditional +@item -mtls-dialect=traditional Use traditional TLS as the thread-local storage mechanism for dynamic accesses of TLS variables. -@item -mtls-size=@var{size} @opindex mtls-size +@item -mtls-size=@var{size} Specify bit size of immediate TLS offsets. Valid values are 12, 24, 32, 48. This option requires binutils 2.26 or newer. -@item -mfix-cortex-a53-835769 -@itemx -mno-fix-cortex-a53-835769 @opindex mfix-cortex-a53-835769 @opindex mno-fix-cortex-a53-835769 +@item -mfix-cortex-a53-835769 +@itemx -mno-fix-cortex-a53-835769 Enable or disable the workaround for the ARM Cortex-A53 erratum number 835769. This involves inserting a NOP instruction between memory instructions and 64-bit integer multiply-accumulate instructions. -@item -mfix-cortex-a53-843419 -@itemx -mno-fix-cortex-a53-843419 @opindex mfix-cortex-a53-843419 @opindex mno-fix-cortex-a53-843419 +@item -mfix-cortex-a53-843419 +@itemx -mno-fix-cortex-a53-843419 Enable or disable the workaround for the ARM Cortex-A53 erratum number 843419. This erratum workaround is made at link time and this will only pass the corresponding flag to the linker. -@item -mlow-precision-recip-sqrt -@itemx -mno-low-precision-recip-sqrt @opindex mlow-precision-recip-sqrt @opindex mno-low-precision-recip-sqrt +@item -mlow-precision-recip-sqrt +@itemx -mno-low-precision-recip-sqrt Enable or disable the reciprocal square root approximation. This option only has an effect if @option{-ffast-math} or @option{-funsafe-math-optimizations} is used as well. Enabling this reduces precision of reciprocal square root results to about 16 bits for single precision and to 32 bits for double precision. -@item -mlow-precision-sqrt -@itemx -mno-low-precision-sqrt @opindex mlow-precision-sqrt @opindex mno-low-precision-sqrt +@item -mlow-precision-sqrt +@itemx -mno-low-precision-sqrt Enable or disable the square root approximation. This option only has an effect if @option{-ffast-math} or @option{-funsafe-math-optimizations} is used as well. Enabling this reduces @@ -20179,10 +20179,10 @@ precision of square root results to about 16 bits for single precision and to 32 bits for double precision. If enabled, it implies @option{-mlow-precision-recip-sqrt}. -@item -mlow-precision-div -@itemx -mno-low-precision-div @opindex mlow-precision-div @opindex mno-low-precision-div +@item -mlow-precision-div +@itemx -mno-low-precision-div Enable or disable the division approximation. This option only has an effect if @option{-ffast-math} or @option{-funsafe-math-optimizations} is used as well. Enabling this reduces @@ -20211,8 +20211,8 @@ used directly. The same applies when using @option{-mcpu=} when the selected cpu supports the @samp{lse} feature. This option is on by default. -@item -march=@var{name} @opindex march +@item -march=@var{name} Specify the name of the target architecture and, optionally, one or more feature modifiers. This option has the form @option{-march=@var{arch}@r{@{}+@r{[}no@r{]}@var{feature}@r{@}*}}. @@ -20254,8 +20254,8 @@ without either of @option{-mtune} or @option{-mcpu} also being specified, the code is tuned to perform well across a range of target processors implementing the target architecture. -@item -mtune=@var{name} @opindex mtune +@item -mtune=@var{name} Specify the name of the target processor for which GCC should tune the performance of the code. Permissible values for this option are: @samp{generic}, @samp{cortex-a35}, @samp{cortex-a53}, @samp{cortex-a55}, @@ -20306,8 +20306,8 @@ of target processors. This option cannot be suffixed by feature modifiers. -@item -mcpu=@var{name} @opindex mcpu +@item -mcpu=@var{name} Specify the name of the target processor, optionally suffixed by one or more feature modifiers. This option has the form @option{-mcpu=@var{cpu}@r{@{}+@r{[}no@r{]}@var{feature}@r{@}*}}, where @@ -20335,8 +20335,8 @@ these properties. Unless overridden by @option{-mtune}, @option{-mcpu=neoverse-512tvb} tunes code in the same way as for @option{-mtune=neoverse-512tvb}. -@item -moverride=@var{string} @opindex moverride +@item -moverride=@var{string} Override tuning decisions made by the back-end in response to a @option{-mtune=} switch. The syntax, semantics, and accepted values for @var{string} in this option are not guaranteed to be consistent @@ -20344,22 +20344,22 @@ across releases. This option is only intended to be useful when developing GCC. -@item -mverbose-cost-dump @opindex mverbose-cost-dump +@item -mverbose-cost-dump Enable verbose cost model dumping in the debug dump files. This option is provided for use in debugging the compiler. -@item -mpc-relative-literal-loads -@itemx -mno-pc-relative-literal-loads @opindex mpc-relative-literal-loads @opindex mno-pc-relative-literal-loads +@item -mpc-relative-literal-loads +@itemx -mno-pc-relative-literal-loads Enable or disable PC-relative literal loads. With this option literal pools are accessed using a single instruction and emitted after each function. This limits the maximum size of functions to 1MB. This is enabled by default for @option{-mcmodel=tiny}. -@item -msign-return-address=@var{scope} @opindex msign-return-address +@item -msign-return-address=@var{scope} Select the function scope on which return address signing will be applied. Permissible values are @samp{none}, which disables return address signing, @samp{non-leaf}, which enables pointer signing for functions which are not leaf @@ -20367,8 +20367,8 @@ functions, and @samp{all}, which enables pointer signing for all functions. The default value is @samp{none}. This option has been deprecated by -mbranch-protection. -@item -mbranch-protection=@var{none}|@var{standard}|@var{pac-ret}[+@var{leaf}+@var{b-key}]|@var{bti} @opindex mbranch-protection +@item -mbranch-protection=@var{none}|@var{standard}|@var{pac-ret}[+@var{leaf}+@var{b-key}]|@var{bti} Select the branch protection features to use. @samp{none} is the default and turns off all types of branch protection. @samp{standard} turns on all types of branch protection features. If a feature @@ -20382,8 +20382,8 @@ functions. The optional argument @samp{b-key} can be used to sign the functions with the B-key instead of the A-key. @samp{bti} turns on branch target identification mechanism. -@item -mharden-sls=@var{opts} @opindex mharden-sls +@item -mharden-sls=@var{opts} Enable compiler hardening against straight line speculation (SLS). @var{opts} is a comma-separated list of the following options: @table @samp @@ -20393,8 +20393,8 @@ Enable compiler hardening against straight line speculation (SLS). In addition, @samp{-mharden-sls=all} enables all SLS hardening while @samp{-mharden-sls=none} disables all SLS hardening. -@item -msve-vector-bits=@var{bits} @opindex msve-vector-bits +@item -msve-vector-bits=@var{bits} Specify the number of bits in an SVE vector register. This option only has an effect when SVE is enabled. @@ -20550,34 +20550,34 @@ Conversely, @option{nofp} implies @option{nosimd}, which implies These @samp{-m} options are defined for Adapteva Epiphany: @table @gcctabopt -@item -mhalf-reg-file @opindex mhalf-reg-file +@item -mhalf-reg-file Don't allocate any register in the range @code{r32}@dots{}@code{r63}. That allows code to run on hardware variants that lack these registers. -@item -mprefer-short-insn-regs @opindex mprefer-short-insn-regs +@item -mprefer-short-insn-regs Preferentially allocate registers that allow short instruction generation. This can result in increased instruction count, so this may either reduce or increase overall code size. -@item -mbranch-cost=@var{num} @opindex mbranch-cost +@item -mbranch-cost=@var{num} Set the cost of branches to roughly @var{num} ``simple'' instructions. This cost is only a heuristic and is not guaranteed to produce consistent results across releases. -@item -mcmove @opindex mcmove +@item -mcmove Enable the generation of conditional moves. -@item -mnops=@var{num} @opindex mnops +@item -mnops=@var{num} Emit @var{num} NOPs before every other generated instruction. -@item -mno-soft-cmpsf @opindex mno-soft-cmpsf @opindex msoft-cmpsf +@item -mno-soft-cmpsf For single-precision floating-point comparisons, emit an @code{fsub} instruction and test the flags. This is faster than a software comparison, but can get incorrect results in the presence of NaNs, or when two different small @@ -20585,8 +20585,8 @@ numbers are compared such that their difference is calculated as zero. The default is @option{-msoft-cmpsf}, which uses slower, but IEEE-compliant, software comparisons. -@item -mstack-offset=@var{num} @opindex mstack-offset +@item -mstack-offset=@var{num} Set the offset between the top of the stack and the stack pointer. E.g., a value of 8 means that the eight bytes in the range @code{sp+0@dots{}sp+7} can be used by leaf functions without stack allocation. @@ -20599,33 +20599,33 @@ offset would give you better code, but to actually use a different stack offset to build working programs, it is recommended to configure the toolchain with the appropriate @option{--with-stack-offset=@var{num}} option. -@item -mno-round-nearest @opindex mno-round-nearest @opindex mround-nearest +@item -mno-round-nearest Make the scheduler assume that the rounding mode has been set to truncating. The default is @option{-mround-nearest}. -@item -mlong-calls @opindex mlong-calls +@item -mlong-calls If not otherwise specified by an attribute, assume all calls might be beyond the offset range of the @code{b} / @code{bl} instructions, and therefore load the function address into a register before performing a (otherwise direct) call. This is the default. -@item -mshort-calls @opindex short-calls +@item -mshort-calls If not otherwise specified by an attribute, assume all direct calls are in the range of the @code{b} / @code{bl} instructions, so use these instructions for direct calls. The default is @option{-mlong-calls}. -@item -msmall16 @opindex msmall16 +@item -msmall16 Assume addresses can be loaded as 16-bit unsigned values. This does not apply to function addresses for which @option{-mlong-calls} semantics are in effect. -@item -mfp-mode=@var{mode} @opindex mfp-mode +@item -mfp-mode=@var{mode} Set the prevailing mode of the floating-point unit. This determines the floating-point mode that is provided and expected at function call and return time. Making this mode match the mode you @@ -20661,42 +20661,42 @@ integer multiply, or integer multiply-and-accumulate. The default is @option{-mfp-mode=caller} -@item -mno-split-lohi -@itemx -mno-postinc -@itemx -mno-postmodify @opindex mno-split-lohi @opindex msplit-lohi @opindex mno-postinc @opindex mpostinc @opindex mno-postmodify @opindex mpostmodify +@item -mno-split-lohi +@itemx -mno-postinc +@itemx -mno-postmodify Code generation tweaks that disable, respectively, splitting of 32-bit loads, generation of post-increment addresses, and generation of post-modify addresses. The defaults are @option{msplit-lohi}, @option{-mpost-inc}, and @option{-mpost-modify}. -@item -mnovect-double @opindex mno-vect-double @opindex mvect-double +@item -mnovect-double Change the preferred SIMD mode to SImode. The default is @option{-mvect-double}, which uses DImode as preferred SIMD mode. -@item -max-vect-align=@var{num} @opindex max-vect-align +@item -max-vect-align=@var{num} The maximum alignment for SIMD vector mode types. @var{num} may be 4 or 8. The default is 8. Note that this is an ABI change, even though many library function interfaces are unaffected if they don't use SIMD vector modes in places that affect size and/or alignment of relevant types. -@item -msplit-vecmove-early @opindex msplit-vecmove-early +@item -msplit-vecmove-early Split vector moves into single word moves before reload. In theory this can give better register allocation, but so far the reverse seems to be generally the case. -@item -m1reg-@var{reg} @opindex m1reg- +@item -m1reg-@var{reg} Specify a register to hold the constant @minus{}1, which makes loading small negative constants and certain bitmasks faster. Allowable values for @var{reg} are @samp{r43} and @samp{r63}, @@ -20714,10 +20714,10 @@ These options are defined specifically for the AMD GCN port. @table @gcctabopt -@item -march=@var{gpu} @opindex march -@itemx -mtune=@var{gpu} @opindex mtune +@item -march=@var{gpu} +@itemx -mtune=@var{gpu} Set architecture type or tuning for @var{gpu}. Supported values for @var{gpu} are @@ -20739,25 +20739,25 @@ Compile for CDNA2 Instinct MI200 series devices (gfx90a). @end table +@opindex msram-ecc @item -msram-ecc=on @itemx -msram-ecc=off @itemx -msram-ecc=any -@opindex msram-ecc Compile binaries suitable for devices with the SRAM-ECC feature enabled, disabled, or either mode. This feature can be enabled per-process on some devices. The compiled code must match the device mode. The default is @samp{any}, for devices that support it. -@item -mstack-size=@var{bytes} @opindex mstack-size +@item -mstack-size=@var{bytes} Specify how many @var{bytes} of stack space will be requested for each GPU thread (wave-front). Beware that there may be many threads and limited memory available. The size of the stack allocation may also have an impact on run-time performance. The default is 32KB when using OpenACC or OpenMP, and 1MB otherwise. -@item -mxnack @opindex mxnack +@item -mxnack Compile binaries suitable for devices with the XNACK feature enabled. Some devices always require XNACK and some allow the user to configure XNACK. The compiled code must match the device mode. The default is @samp{-mno-xnack}. @@ -20776,18 +20776,18 @@ is being compiled: @c architecture variants @table @gcctabopt -@item -mbarrel-shifter @opindex mbarrel-shifter +@item -mbarrel-shifter Generate instructions supported by barrel shifter. This is the default unless @option{-mcpu=ARC601} or @samp{-mcpu=ARCEM} is in effect. -@item -mjli-always @opindex mjli-always +@item -mjli-always Force to call a function using jli_s instruction. This option is valid only for ARCv2 architecture. -@item -mcpu=@var{cpu} @opindex mcpu +@item -mcpu=@var{cpu} Set architecture type, register usage, and instruction scheduling parameters for @var{cpu}. There are also shortcut alias options available for backward compatibility and convenience. Supported @@ -20799,13 +20799,13 @@ values for @var{cpu} are @item arc600 Compile for ARC600. Aliases: @option{-mA6}, @option{-mARC600}. -@item arc601 @opindex mARC601 +@item arc601 Compile for ARC601. Alias: @option{-mARC601}. -@item arc700 @opindex mA7 @opindex mARC700 +@item arc700 Compile for ARC700. Aliases: @option{-mA7}, @option{-mARC700}. This is the default when configured with @option{--with-cpu=arc700}@. @@ -20885,103 +20885,103 @@ set. @end table -@item -mdpfp @opindex mdpfp -@itemx -mdpfp-compact @opindex mdpfp-compact +@item -mdpfp +@itemx -mdpfp-compact Generate double-precision FPX instructions, tuned for the compact implementation. -@item -mdpfp-fast @opindex mdpfp-fast +@item -mdpfp-fast Generate double-precision FPX instructions, tuned for the fast implementation. -@item -mno-dpfp-lrsr @opindex mno-dpfp-lrsr +@item -mno-dpfp-lrsr Disable @code{lr} and @code{sr} instructions from using FPX extension aux registers. -@item -mea @opindex mea +@item -mea Generate extended arithmetic instructions. Currently only @code{divaw}, @code{adds}, @code{subs}, and @code{sat16} are supported. Only valid for @option{-mcpu=ARC700}. -@item -mno-mpy @opindex mno-mpy @opindex mmpy +@item -mno-mpy Do not generate @code{mpy}-family instructions for ARC700. This option is deprecated. -@item -mmul32x16 @opindex mmul32x16 +@item -mmul32x16 Generate 32x16-bit multiply and multiply-accumulate instructions. -@item -mmul64 @opindex mmul64 +@item -mmul64 Generate @code{mul64} and @code{mulu64} instructions. Only valid for @option{-mcpu=ARC600}. -@item -mnorm @opindex mnorm +@item -mnorm Generate @code{norm} instructions. This is the default if @option{-mcpu=ARC700} is in effect. -@item -mspfp @opindex mspfp -@itemx -mspfp-compact @opindex mspfp-compact +@item -mspfp +@itemx -mspfp-compact Generate single-precision FPX instructions, tuned for the compact implementation. -@item -mspfp-fast @opindex mspfp-fast +@item -mspfp-fast Generate single-precision FPX instructions, tuned for the fast implementation. -@item -msimd @opindex msimd +@item -msimd Enable generation of ARC SIMD instructions via target-specific builtins. Only valid for @option{-mcpu=ARC700}. -@item -msoft-float @opindex msoft-float +@item -msoft-float This option ignored; it is provided for compatibility purposes only. Software floating-point code is emitted by default, and this default can overridden by FPX options; @option{-mspfp}, @option{-mspfp-compact}, or @option{-mspfp-fast} for single precision, and @option{-mdpfp}, @option{-mdpfp-compact}, or @option{-mdpfp-fast} for double precision. -@item -mswap @opindex mswap +@item -mswap Generate @code{swap} instructions. -@item -matomic @opindex matomic +@item -matomic This enables use of the locked load/store conditional extension to implement atomic memory built-in functions. Not available for ARC 6xx or ARC EM cores. -@item -mdiv-rem @opindex mdiv-rem +@item -mdiv-rem Enable @code{div} and @code{rem} instructions for ARCv2 cores. -@item -mcode-density @opindex mcode-density +@item -mcode-density Enable code density instructions for ARC EM. This option is on by default for ARC HS. -@item -mll64 @opindex mll64 +@item -mll64 Enable double load/store operations for ARC HS cores. -@item -mtp-regno=@var{regno} @opindex mtp-regno +@item -mtp-regno=@var{regno} Specify thread pointer register number. -@item -mmpy-option=@var{multo} @opindex mmpy-option +@item -mmpy-option=@var{multo} Compile ARCv2 code with a multiplier design option. You can specify the option using either a string or numeric value for @var{multo}. @samp{wlh1} is the default value. The recognized values are: @@ -21042,8 +21042,8 @@ ARC HS SIMD support. This option is only available for ARCv2 cores@. -@item -mfpu=@var{fpu} @opindex mfpu +@item -mfpu=@var{fpu} Enables support for specific floating-point hardware extensions for ARCv2 cores. Supported values for @var{fpu} are: @@ -21112,8 +21112,8 @@ hardware extensions. Not available for ARC EM@. @end table -@item -mirq-ctrl-saved=@var{register-range}, @var{blink}, @var{lp_count} @opindex mirq-ctrl-saved +@item -mirq-ctrl-saved=@var{register-range}, @var{blink}, @var{lp_count} Specifies general-purposes registers that the processor automatically saves/restores on interrupt entry and exit. @var{register-range} is specified as two registers separated by a dash. The register range @@ -21121,8 +21121,8 @@ always starts with @code{r0}, the upper limit is @code{fp} register. @var{blink} and @var{lp_count} are optional. This option is only valid for ARC EM and ARC HS cores. -@item -mrgf-banked-regs=@var{number} @opindex mrgf-banked-regs +@item -mrgf-banked-regs=@var{number} Specifies the number of registers replicated in second register bank on entry to fast interrupt. Fast interrupts are interrupts with the highest priority level P0. These interrupts save only PC and STATUS32 @@ -21130,8 +21130,8 @@ registers to avoid memory transactions during interrupt entry and exit sequences. Use this option when you are using fast interrupts in an ARC V2 family processor. Permitted values are 4, 8, 16, and 32. -@item -mlpc-width=@var{width} @opindex mlpc-width +@item -mlpc-width=@var{width} Specify the width of the @code{lp_count} register. Valid values for @var{width} are 8, 16, 20, 24, 28 and 32 bits. The default width is fixed to 32 bits. If the width is less than 32, the compiler does not @@ -21142,14 +21142,14 @@ specified, the compiler and run-time library might continue to use the loop mechanism for various needs. This option defines macro @code{__ARC_LPC_WIDTH__} with the value of @var{width}. -@item -mrf16 @opindex mrf16 +@item -mrf16 This option instructs the compiler to generate code for a 16-entry register file. This option defines the @code{__ARC_RF16__} preprocessor macro. -@item -mbranch-index @opindex mbranch-index +@item -mbranch-index Enable use of @code{bi} or @code{bih} instructions to implement jump tables. @@ -21161,57 +21161,57 @@ define preprocessor macro symbols. @c Flags used by the assembler, but for which we define preprocessor @c macro symbols as well. @table @gcctabopt -@item -mdsp-packa @opindex mdsp-packa +@item -mdsp-packa Passed down to the assembler to enable the DSP Pack A extensions. Also sets the preprocessor symbol @code{__Xdsp_packa}. This option is deprecated. -@item -mdvbf @opindex mdvbf +@item -mdvbf Passed down to the assembler to enable the dual Viterbi butterfly extension. Also sets the preprocessor symbol @code{__Xdvbf}. This option is deprecated. @c ARC700 4.10 extension instruction -@item -mlock @opindex mlock +@item -mlock Passed down to the assembler to enable the locked load/store conditional extension. Also sets the preprocessor symbol @code{__Xlock}. -@item -mmac-d16 @opindex mmac-d16 +@item -mmac-d16 Passed down to the assembler. Also sets the preprocessor symbol @code{__Xxmac_d16}. This option is deprecated. -@item -mmac-24 @opindex mmac-24 +@item -mmac-24 Passed down to the assembler. Also sets the preprocessor symbol @code{__Xxmac_24}. This option is deprecated. @c ARC700 4.10 extension instruction -@item -mrtsc @opindex mrtsc +@item -mrtsc Passed down to the assembler to enable the 64-bit time-stamp counter extension instruction. Also sets the preprocessor symbol @code{__Xrtsc}. This option is deprecated. @c ARC700 4.10 extension instruction -@item -mswape @opindex mswape +@item -mswape Passed down to the assembler to enable the swap byte ordering extension instruction. Also sets the preprocessor symbol @code{__Xswape}. -@item -mtelephony @opindex mtelephony +@item -mtelephony Passed down to the assembler to enable dual- and single-operand instructions for telephony. Also sets the preprocessor symbol @code{__Xtelephony}. This option is deprecated. -@item -mxy @opindex mxy +@item -mxy Passed down to the assembler to enable the XY memory extension. Also sets the preprocessor symbol @code{__Xxy}. @@ -21221,12 +21221,12 @@ The following options control how the assembly code is annotated: @c Assembly annotation options @table @gcctabopt -@item -misize @opindex misize +@item -misize Annotate assembler instructions with estimated addresses. -@item -mannotate-align @opindex mannotate-align +@item -mannotate-align Explain what alignment considerations lead to the decision to make an instruction short or long. @@ -21236,15 +21236,15 @@ The following options are passed through to the linker: @c options passed through to the linker @table @gcctabopt -@item -marclinux @opindex marclinux +@item -marclinux Passed through to the linker, to specify use of the @code{arclinux} emulation. This option is enabled by default in tool chains built for @w{@code{arc-linux-uclibc}} and @w{@code{arceb-linux-uclibc}} targets when profiling is not requested. -@item -marclinux_prof @opindex marclinux_prof +@item -marclinux_prof Passed through to the linker, to specify use of the @code{arclinux_prof} emulation. This option is enabled by default in tool chains built for @w{@code{arc-linux-uclibc}} and @@ -21256,13 +21256,13 @@ The following options control the semantics of generated code: @c semantically relevant code generation options @table @gcctabopt -@item -mlong-calls @opindex mlong-calls +@item -mlong-calls Generate calls as register indirect calls, thus providing access to the full 32-bit address range. -@item -mmedium-calls @opindex mmedium-calls +@item -mmedium-calls Don't use less than 25-bit addressing range for calls, which is the offset available for an unconditional branch-and-link instruction. Conditional execution of function calls is suppressed, to @@ -21270,28 +21270,28 @@ allow use of the 25-bit range, rather than the 21-bit range with conditional branch-and-link. This is the default for tool chains built for @w{@code{arc-linux-uclibc}} and @w{@code{arceb-linux-uclibc}} targets. -@item -G @var{num} @opindex G +@item -G @var{num} Put definitions of externally-visible data in a small data section if that data is no bigger than @var{num} bytes. The default value of @var{num} is 4 for any ARC configuration, or 8 when we have double load/store operations. -@item -mno-sdata @opindex mno-sdata @opindex msdata +@item -mno-sdata Do not generate sdata references. This is the default for tool chains built for @w{@code{arc-linux-uclibc}} and @w{@code{arceb-linux-uclibc}} targets. -@item -mvolatile-cache @opindex mvolatile-cache +@item -mvolatile-cache Use ordinarily cached memory accesses for volatile references. This is the default. -@item -mno-volatile-cache @opindex mno-volatile-cache @opindex mvolatile-cache +@item -mno-volatile-cache Enable cache bypass for volatile references. @end table @@ -21299,37 +21299,37 @@ Enable cache bypass for volatile references. The following options fine tune code generation: @c code generation tuning options @table @gcctabopt -@item -malign-call @opindex malign-call +@item -malign-call Does nothing. Preserved for backward compatibility. -@item -mauto-modify-reg @opindex mauto-modify-reg +@item -mauto-modify-reg Enable the use of pre/post modify with register displacement. -@item -mbbit-peephole @opindex mbbit-peephole +@item -mbbit-peephole Enable bbit peephole2. -@item -mno-brcc @opindex mno-brcc +@item -mno-brcc This option disables a target-specific pass in @file{arc_reorg} to generate compare-and-branch (@code{br@var{cc}}) instructions. It has no effect on generation of these instructions driven by the combiner pass. -@item -mcase-vector-pcrel @opindex mcase-vector-pcrel +@item -mcase-vector-pcrel Use PC-relative switch case tables to enable case table shortening. This is the default for @option{-Os}. -@item -mcompact-casesi @opindex mcompact-casesi +@item -mcompact-casesi Enable compact @code{casesi} pattern. This is the default for @option{-Os}, and only available for ARCv1 cores. This option is deprecated. -@item -mno-cond-exec @opindex mno-cond-exec +@item -mno-cond-exec Disable the ARCompact-specific pass to generate conditional execution instructions. @@ -21345,41 +21345,41 @@ If you have a problem with call instructions exceeding their allowable offset range because they are conditionalized, you should consider using @option{-mmedium-calls} instead. -@item -mearly-cbranchsi @opindex mearly-cbranchsi +@item -mearly-cbranchsi Enable pre-reload use of the @code{cbranchsi} pattern. -@item -mexpand-adddi @opindex mexpand-adddi +@item -mexpand-adddi Expand @code{adddi3} and @code{subdi3} at RTL generation time into @code{add.f}, @code{adc} etc. This option is deprecated. -@item -mindexed-loads @opindex mindexed-loads +@item -mindexed-loads Enable the use of indexed loads. This can be problematic because some optimizers then assume that indexed stores exist, which is not the case. -@item -mlra @opindex mlra +@item -mlra Enable Local Register Allocation. This is still experimental for ARC, so by default the compiler uses standard reload (i.e.@: @option{-mno-lra}). -@item -mlra-priority-none @opindex mlra-priority-none +@item -mlra-priority-none Don't indicate any priority for target registers. -@item -mlra-priority-compact @opindex mlra-priority-compact +@item -mlra-priority-compact Indicate target register priority for r0..r3 / r12..r15. -@item -mlra-priority-noncompact @opindex mlra-priority-noncompact +@item -mlra-priority-noncompact Reduce target register priority for r0..r3 / r12..r15. -@item -mmillicode @opindex mmillicode +@item -mmillicode When optimizing for size (using @option{-Os}), prologues and epilogues that have to save or restore a large number of registers are often shortened by using call to a special function in libgcc; this is @@ -21388,31 +21388,31 @@ performance issues, and/or cause linking issues when linking in a nonstandard way, this option is provided to turn on or off millicode call generation. -@item -mcode-density-frame @opindex mcode-density-frame +@item -mcode-density-frame This option enable the compiler to emit @code{enter} and @code{leave} instructions. These instructions are only valid for CPUs with code-density feature. -@item -mmixed-code @opindex mmixed-code +@item -mmixed-code Does nothing. Preserved for backward compatibility. -@item -mq-class @opindex mq-class +@item -mq-class Ths option is deprecated. Enable @samp{q} instruction alternatives. This is the default for @option{-Os}. -@item -mRcq @opindex mRcq +@item -mRcq Does nothing. Preserved for backward compatibility. -@item -mRcw @opindex mRcw +@item -mRcw Does nothing. Preserved for backward compatibility. -@item -msize-level=@var{level} @opindex msize-level +@item -msize-level=@var{level} Fine-tune size optimization with regards to instruction lengths and alignment. The recognized values for @var{level} are: @table @samp @@ -21433,8 +21433,8 @@ In addition, optional data alignment is dropped, and the option @option{Os} is e This defaults to @samp{3} when @option{-Os} is in effect. Otherwise, the behavior when this is not set is equivalent to level @samp{1}. -@item -mtune=@var{cpu} @opindex mtune +@item -mtune=@var{cpu} Set instruction scheduling parameters for @var{cpu}, overriding any implied by @option{-mcpu=}. @@ -21468,13 +21468,13 @@ Tune for ARC4x release 3.10a. @end table -@item -mmultcost=@var{num} @opindex mmultcost +@item -mmultcost=@var{num} Cost to assume for a multiply instruction, with @samp{4} being equal to a normal instruction. -@item -munalign-prob-threshold=@var{probability} @opindex munalign-prob-threshold +@item -munalign-prob-threshold=@var{probability} Does nothing. Preserved for backward compatibility. @end table @@ -21485,72 +21485,72 @@ are now deprecated and will be removed in a future release: @c Deprecated options @table @gcctabopt -@item -margonaut @opindex margonaut +@item -margonaut Obsolete FPX. -@item -mbig-endian @opindex mbig-endian -@itemx -EB @opindex EB +@item -mbig-endian +@itemx -EB Compile code for big-endian targets. Use of these options is now deprecated. Big-endian code is supported by configuring GCC to build @w{@code{arceb-elf32}} and @w{@code{arceb-linux-uclibc}} targets, for which big endian is the default. -@item -mlittle-endian @opindex mlittle-endian -@itemx -EL @opindex EL +@item -mlittle-endian +@itemx -EL Compile code for little-endian targets. Use of these options is now deprecated. Little-endian code is supported by configuring GCC to build @w{@code{arc-elf32}} and @w{@code{arc-linux-uclibc}} targets, for which little endian is the default. -@item -mbarrel_shifter @opindex mbarrel_shifter +@item -mbarrel_shifter Replaced by @option{-mbarrel-shifter}. -@item -mdpfp_compact @opindex mdpfp_compact +@item -mdpfp_compact Replaced by @option{-mdpfp-compact}. -@item -mdpfp_fast @opindex mdpfp_fast +@item -mdpfp_fast Replaced by @option{-mdpfp-fast}. -@item -mdsp_packa @opindex mdsp_packa +@item -mdsp_packa Replaced by @option{-mdsp-packa}. -@item -mEA @opindex mEA +@item -mEA Replaced by @option{-mea}. -@item -mmac_24 @opindex mmac_24 +@item -mmac_24 Replaced by @option{-mmac-24}. -@item -mmac_d16 @opindex mmac_d16 +@item -mmac_d16 Replaced by @option{-mmac-d16}. -@item -mspfp_compact @opindex mspfp_compact +@item -mspfp_compact Replaced by @option{-mspfp-compact}. -@item -mspfp_fast @opindex mspfp_fast +@item -mspfp_fast Replaced by @option{-mspfp-fast}. -@item -mtune=@var{cpu} @opindex mtune +@item -mtune=@var{cpu} Values @samp{arc600}, @samp{arc601}, @samp{arc700} and @samp{arc700-xmac} for @var{cpu} are replaced by @samp{ARC600}, @samp{ARC601}, @samp{ARC700} and @samp{ARC700-xmac} respectively. -@item -multcost=@var{num} @opindex multcost +@item -multcost=@var{num} Replaced by @option{-mmultcost}. @end table @@ -21562,13 +21562,13 @@ Replaced by @option{-mmultcost}. These @samp{-m} options are defined for the ARM port: @table @gcctabopt -@item -mabi=@var{name} @opindex mabi +@item -mabi=@var{name} Generate code for the specified ABI@. Permissible values are: @samp{apcs-gnu}, @samp{atpcs}, @samp{aapcs}, @samp{aapcs-linux} and @samp{iwmmxt}. -@item -mapcs-frame @opindex mapcs-frame +@item -mapcs-frame Generate a stack frame that is compliant with the ARM Procedure Call Standard for all functions, even if this is not strictly necessary for correct execution of the code. Specifying @option{-fomit-frame-pointer} @@ -21576,14 +21576,14 @@ with this option causes the stack frames not to be generated for leaf functions. The default is @option{-mno-apcs-frame}. This option is deprecated. -@item -mapcs @opindex mapcs +@item -mapcs This is a synonym for @option{-mapcs-frame} and is deprecated. @ignore @c not currently implemented -@item -mapcs-stack-check @opindex mapcs-stack-check +@item -mapcs-stack-check Generate code to check the amount of stack space available upon entry to every function (that actually uses some stack space). If there is insufficient space available then either the function @@ -21593,14 +21593,14 @@ system is required to provide these functions. The default is @option{-mno-apcs-stack-check}, since this produces smaller code. @c not currently implemented -@item -mapcs-reentrant @opindex mapcs-reentrant +@item -mapcs-reentrant Generate reentrant, position-independent code. The default is @option{-mno-apcs-reentrant}. @end ignore -@item -mthumb-interwork @opindex mthumb-interwork +@item -mthumb-interwork Generate code that supports calling between the ARM and Thumb instruction sets. Without this option, on pre-v5 architectures, the two instruction sets cannot be reliably used inside one program. The @@ -21608,9 +21608,9 @@ default is @option{-mno-thumb-interwork}, since slightly larger code is generated when @option{-mthumb-interwork} is specified. In AAPCS configurations this option is meaningless. -@item -mno-sched-prolog @opindex mno-sched-prolog @opindex msched-prolog +@item -mno-sched-prolog Prevent the reordering of instructions in the function prologue, or the merging of those instruction with the instructions in the function's body. This means that all functions start with a recognizable set @@ -21619,8 +21619,8 @@ different function prologues), and this information can be used to locate the start of functions inside an executable piece of code. The default is @option{-msched-prolog}. -@item -mfloat-abi=@var{name} @opindex mfloat-abi +@item -mfloat-abi=@var{name} Specifies which floating-point ABI to use. Permissible values are: @samp{soft}, @samp{softfp} and @samp{hard}. @@ -21636,33 +21636,33 @@ the hard-float and soft-float ABIs are not link-compatible; you must compile your entire program with the same ABI, and link with a compatible set of libraries. -@item -mgeneral-regs-only @opindex mgeneral-regs-only +@item -mgeneral-regs-only Generate code which uses only the general-purpose registers. This will prevent the compiler from using floating-point and Advanced SIMD registers but will not impose any restrictions on the assembler. -@item -mlittle-endian @opindex mlittle-endian +@item -mlittle-endian Generate code for a processor running in little-endian mode. This is the default for all standard configurations. -@item -mbig-endian @opindex mbig-endian +@item -mbig-endian Generate code for a processor running in big-endian mode; the default is to compile code for a little-endian processor. +@opindex mbe8 @item -mbe8 @itemx -mbe32 -@opindex mbe8 When linking a big-endian image select between BE8 and BE32 formats. The option has no effect for little-endian images and is ignored. The default is dependent on the selected target architecture. For ARMv6 and later architectures the default is BE8, for older architectures the default is BE32. BE32 format has been deprecated by ARM. -@item -march=@var{name}@r{[}+extension@dots{}@r{]} @opindex march +@item -march=@var{name}@r{[}+extension@dots{}@r{]} This specifies the name of the target ARM architecture. GCC uses this name to determine what kind of instructions it can emit when generating assembly code. This option can be used in conjunction with or instead @@ -22151,8 +22151,8 @@ of the build computer. At present, this feature is only supported on GNU/Linux, and not all architectures are recognized. If the auto-detect is unsuccessful the option has no effect. -@item -mtune=@var{name} @opindex mtune +@item -mtune=@var{name} This option specifies the name of the target ARM processor for which GCC should tune the performance of the code. For some ARM implementations better performance can be obtained by using @@ -22206,8 +22206,8 @@ of the build computer. At present, this feature is only supported on GNU/Linux, and not all architectures are recognized. If the auto-detect is unsuccessful the option has no effect. -@item -mcpu=@var{name}@r{[}+extension@dots{}@r{]} @opindex mcpu +@item -mcpu=@var{name}@r{[}+extension@dots{}@r{]} This specifies the name of the target ARM processor. GCC uses this name to derive the name of the target ARM architecture (as if specified by @option{-march}) and the ARM processor type for which to tune for @@ -22313,8 +22313,8 @@ of the build computer. At present, this feature is only supported on GNU/Linux, and not all architectures are recognized. If the auto-detect is unsuccessful the option has no effect. -@item -mfpu=@var{name} @opindex mfpu +@item -mfpu=@var{name} This specifies what floating-point hardware (or hardware emulation) is available on the target. Permissible names are: @samp{auto}, @samp{vfpv2}, @samp{vfpv3}, @@ -22340,15 +22340,15 @@ zero), so the use of NEON instructions may lead to a loss of precision. You can also set the fpu name at function level by using the @code{target("fpu=")} function attributes (@pxref{ARM Function Attributes}) or pragmas (@pxref{Function Specific Option Pragmas}). -@item -mfp16-format=@var{name} @opindex mfp16-format +@item -mfp16-format=@var{name} Specify the format of the @code{__fp16} half-precision floating-point type. Permissible names are @samp{none}, @samp{ieee}, and @samp{alternative}; the default is @samp{none}, in which case the @code{__fp16} type is not defined. @xref{Half-Precision}, for more information. -@item -mstructure-size-boundary=@var{n} @opindex mstructure-size-boundary +@item -mstructure-size-boundary=@var{n} The sizes of all structures and unions are rounded up to a multiple of the number of bits set by this option. Permissible values are 8, 32 and 64. The default value varies for different toolchains. For the COFF @@ -22363,16 +22363,16 @@ information using structures or unions. This option is deprecated. -@item -mabort-on-noreturn @opindex mabort-on-noreturn +@item -mabort-on-noreturn Generate a call to the function @code{abort} at the end of a @code{noreturn} function. It is executed if the function tries to return. -@item -mlong-calls -@itemx -mno-long-calls @opindex mlong-calls @opindex mno-long-calls +@item -mlong-calls +@itemx -mno-long-calls Tells the compiler to perform function calls by first loading the address of the function into a register and then performing a subroutine call on this register. This switch is needed if the target function @@ -22397,23 +22397,23 @@ long_calls_off} directive. Note these switches have no effect on how the compiler generates code to handle function calls via function pointers. -@item -msingle-pic-base @opindex msingle-pic-base +@item -msingle-pic-base Treat the register used for PIC addressing as read-only, rather than loading it in the prologue for each function. The runtime system is responsible for initializing this register with an appropriate value before execution begins. -@item -mpic-register=@var{reg} @opindex mpic-register +@item -mpic-register=@var{reg} Specify the register to be used for PIC addressing. For standard PIC base case, the default is any suitable register determined by compiler. For single PIC base case, the default is @samp{R9} if target is EABI based or stack-checking is enabled, otherwise the default is @samp{R10}. -@item -mpic-data-is-text-relative @opindex mpic-data-is-text-relative +@item -mpic-data-is-text-relative Assume that the displacement between the text and data segments is fixed at static link time. This permits using PC-relative addressing operations to access data known to be in the data segment. For @@ -22421,8 +22421,8 @@ non-VxWorks RTP targets, this option is enabled by default. When disabled on such targets, it will enable @option{-msingle-pic-base} by default. -@item -mpoke-function-name @opindex mpoke-function-name +@item -mpoke-function-name Write the name of each function into the text section, directly preceding the function prologue. The generated code is similar to this: @@ -22444,10 +22444,10 @@ location @code{pc - 12} and the top 8 bits are set, then we know that there is a function name embedded immediately preceding this location and has length @code{((pc[-3]) & 0xff000000)}. -@item -mthumb -@itemx -marm @opindex marm @opindex mthumb +@item -mthumb +@itemx -marm Select between generating code that executes in ARM and Thumb states. The default for most configurations is to generate code @@ -22459,34 +22459,34 @@ You can also override the ARM and Thumb mode for each function by using the @code{target("thumb")} and @code{target("arm")} function attributes (@pxref{ARM Function Attributes}) or pragmas (@pxref{Function Specific Option Pragmas}). -@item -mflip-thumb @opindex mflip-thumb +@item -mflip-thumb Switch ARM/Thumb modes on alternating functions. This option is provided for regression testing of mixed Thumb/ARM code generation, and is not intended for ordinary use in compiling code. -@item -mtpcs-frame @opindex mtpcs-frame +@item -mtpcs-frame Generate a stack frame that is compliant with the Thumb Procedure Call Standard for all non-leaf functions. (A leaf function is one that does not call any other functions.) The default is @option{-mno-tpcs-frame}. -@item -mtpcs-leaf-frame @opindex mtpcs-leaf-frame +@item -mtpcs-leaf-frame Generate a stack frame that is compliant with the Thumb Procedure Call Standard for all leaf functions. (A leaf function is one that does not call any other functions.) The default is @option{-mno-apcs-leaf-frame}. -@item -mcallee-super-interworking @opindex mcallee-super-interworking +@item -mcallee-super-interworking Gives all externally visible functions in the file being compiled an ARM instruction set header which switches to Thumb mode before executing the rest of the function. This allows these functions to be called from non-interworking code. This option is not valid in AAPCS configurations because interworking is enabled by default. -@item -mcaller-super-interworking @opindex mcaller-super-interworking +@item -mcaller-super-interworking Allows calls via function pointers (including virtual functions) to execute correctly regardless of whether the target code has been compiled for interworking or not. There is a small overhead in the cost @@ -22494,8 +22494,8 @@ of executing a function pointer if this option is enabled. This option is not valid in AAPCS configurations because interworking is enabled by default. -@item -mtp=@var{name} @opindex mtp +@item -mtp=@var{name} Specify the access model for the thread local storage pointer. The valid models are @samp{soft}, which generates calls to @code{__aeabi_read_tp}, @samp{cp15}, which fetches the thread pointer from @code{cp15} directly @@ -22503,8 +22503,8 @@ models are @samp{soft}, which generates calls to @code{__aeabi_read_tp}, best available method for the selected processor. The default setting is @samp{auto}. -@item -mtls-dialect=@var{dialect} @opindex mtls-dialect +@item -mtls-dialect=@var{dialect} Specify the dialect to use for accessing thread local storage. Two @var{dialect}s are supported---@samp{gnu} and @samp{gnu2}. The @samp{gnu} dialect selects the original GNU scheme for supporting @@ -22515,15 +22515,15 @@ the original scheme, but does require new assembler, linker and library support. Initial and local exec TLS models are unaffected by this option and always use the original scheme. -@item -mword-relocations @opindex mword-relocations +@item -mword-relocations Only generate absolute relocations on word-sized values (i.e.@: R_ARM_ABS32). This is enabled by default on targets (uClinux, SymbianOS) where the runtime loader imposes this restriction, and when @option{-fpic} or @option{-fPIC} is specified. This option conflicts with @option{-mslow-flash-data}. -@item -mfix-cortex-m3-ldrd @opindex mfix-cortex-m3-ldrd +@item -mfix-cortex-m3-ldrd Some Cortex-M3 cores can cause data corruption when @code{ldrd} instructions with overlapping destination and base registers are used. This option avoids generating these instructions. This option is enabled by default when @@ -22538,10 +22538,10 @@ Cortex-A72 that affects the AES cryptographic instructions. This option is enabled by default when either @option{-mcpu=cortex-a57} or @option{-mcpu=cortex-a72} is specified. -@item -munaligned-access -@itemx -mno-unaligned-access @opindex munaligned-access @opindex mno-unaligned-access +@item -munaligned-access +@itemx -mno-unaligned-access Enables (or disables) reading and writing of 16- and 32- bit values from addresses that are not 16- or 32- bit aligned. By default unaligned access is disabled for all pre-ARMv6, all ARMv6-M and for @@ -22555,57 +22555,57 @@ setting of this option. If unaligned access is enabled then the preprocessor symbol @code{__ARM_FEATURE_UNALIGNED} is also defined. -@item -mneon-for-64bits @opindex mneon-for-64bits +@item -mneon-for-64bits This option is deprecated and has no effect. -@item -mslow-flash-data @opindex mslow-flash-data +@item -mslow-flash-data Assume loading data from flash is slower than fetching instruction. Therefore literal load is minimized for better performance. This option is only supported when compiling for ARMv7 M-profile and off by default. It conflicts with @option{-mword-relocations}. -@item -masm-syntax-unified @opindex masm-syntax-unified +@item -masm-syntax-unified Assume inline assembler is using unified asm syntax. The default is currently off which implies divided syntax. This option has no impact on Thumb2. However, this may change in future releases of GCC. Divided syntax should be considered deprecated. -@item -mrestrict-it @opindex mrestrict-it +@item -mrestrict-it Restricts generation of IT blocks to conform to the rules of ARMv8-A. IT blocks can only contain a single 16-bit instruction from a select set of instructions. This option is on by default for ARMv8-A Thumb mode. -@item -mprint-tune-info @opindex mprint-tune-info +@item -mprint-tune-info Print CPU tuning information as comment in assembler file. This is an option used only for regression testing of the compiler and not intended for ordinary use in compiling code. This option is disabled by default. -@item -mverbose-cost-dump @opindex mverbose-cost-dump +@item -mverbose-cost-dump Enable verbose cost model dumping in the debug dump files. This option is provided for use in debugging the compiler. -@item -mpure-code @opindex mpure-code +@item -mpure-code Do not allow constant data to be placed in code sections. Additionally, when compiling for ELF object format give all text sections the ELF processor-specific section attribute @code{SHF_ARM_PURECODE}. This option is only available when generating non-pic code for M-profile targets. -@item -mcmse @opindex mcmse +@item -mcmse Generate secure code as per the "ARMv8-M Security Extensions: Requirements on Development Tools Engineering Specification", which can be found on @url{https://developer.arm.com/documentation/ecm0359818/latest/}. -@item -mfix-cmse-cve-2021-35465 @opindex mfix-cmse-cve-2021-35465 +@item -mfix-cmse-cve-2021-35465 Mitigate against a potential security issue with the @code{VLLDM} instruction in some M-profile devices when using CMSE (CVE-2021-365465). This option is enabled by default when the option @option{-mcpu=} is used with @@ -22613,20 +22613,20 @@ enabled by default when the option @option{-mcpu=} is used with or @code{star-mc1}. The option @option{-mno-fix-cmse-cve-2021-35465} can be used to disable the mitigation. -@item -mstack-protector-guard=@var{guard} -@itemx -mstack-protector-guard-offset=@var{offset} @opindex mstack-protector-guard @opindex mstack-protector-guard-offset +@item -mstack-protector-guard=@var{guard} +@itemx -mstack-protector-guard-offset=@var{offset} Generate stack protection code using canary at @var{guard}. Supported locations are @samp{global} for a global canary or @samp{tls} for a canary accessible via the TLS register. The option @option{-mstack-protector-guard-offset=} is for use with @option{-fstack-protector-guard=tls} and not for use in user-land code. -@item -mfdpic -@itemx -mno-fdpic @opindex mfdpic @opindex mno-fdpic +@item -mfdpic +@itemx -mno-fdpic Select the FDPIC ABI, which uses 64-bit function descriptors to represent pointers to functions. When the compiler is configured for @code{arm-*-uclinuxfdpiceabi} targets, this option is on by default @@ -22643,8 +22643,8 @@ The opposite @option{-mno-fdpic} option is useful (and required) to build the Linux kernel using the same (@code{arm-*-uclinuxfdpiceabi}) toolchain as the one used to build the userland programs. -@item -mbranch-protection=@var{none}|@var{standard}|@var{pac-ret}[+@var{leaf}][+@var{bti}]|@var{bti}[+@var{pac-ret}[+@var{leaf}]] @opindex mbranch-protection +@item -mbranch-protection=@var{none}|@var{standard}|@var{pac-ret}[+@var{leaf}][+@var{bti}]|@var{bti}[+@var{pac-ret}[+@var{leaf}]] Enable branch protection features (armv8.1-m.main only). @samp{none} generate code without branch protection or return address signing. @@ -22685,8 +22685,8 @@ address signing. These options are defined for AVR implementations: @table @gcctabopt -@item -mmcu=@var{mcu} @opindex mmcu +@item -mmcu=@var{mcu} Specify Atmel AVR instruction set architectures (ISA) or MCU type. The default for this option is@tie{}@samp{avr2}. @@ -22695,16 +22695,16 @@ GCC supports the following AVR devices and ISAs: @include avr-mmcu.texi -@item -mabsdata @opindex mabsdata +@item -mabsdata Assume that all data in static storage can be accessed by LDS / STS instructions. This option has only an effect on reduced Tiny devices like ATtiny40. See also the @code{absdata} @ref{AVR Variable Attributes,variable attribute}. -@item -maccumulate-args @opindex maccumulate-args +@item -maccumulate-args Accumulate outgoing function arguments and acquire/release the needed stack space for outgoing function arguments once in function prologue/epilogue. Without this option, outgoing arguments are pushed @@ -22719,21 +22719,21 @@ This option can lead to reduced code size for functions that perform several calls to functions that get their arguments on the stack like calls to printf-like functions. -@item -mbranch-cost=@var{cost} @opindex mbranch-cost +@item -mbranch-cost=@var{cost} Set the branch costs for conditional branch instructions to @var{cost}. Reasonable values for @var{cost} are small, non-negative integers. The default branch cost is 0. -@item -mcall-prologues @opindex mcall-prologues +@item -mcall-prologues Functions prologues/epilogues are expanded as calls to appropriate subroutines. Code size is smaller. -@item -mdouble=@var{bits} -@itemx -mlong-double=@var{bits} @opindex mdouble @opindex mlong-double +@item -mdouble=@var{bits} +@itemx -mlong-double=@var{bits} Set the size (in bits) of the @code{double} or @code{long double} type, respectively. Possible values for @var{bits} are 32 and 64. Whether or not a specific value for @var{bits} is allowed depends on @@ -22741,8 +22741,8 @@ the @code{--with-double=} and @code{--with-long-double=} @w{@uref{https://gcc.gnu.org/install/configure.html#avr,configure options}}, and the same applies for the default values of the options. -@item -mgas-isr-prologues @opindex mgas-isr-prologues +@item -mgas-isr-prologues Interrupt service routines (ISRs) may use the @code{__gcc_isr} pseudo instruction supported by GNU Binutils. If this option is on, the feature can still be disabled for individual @@ -22751,32 +22751,32 @@ function attribute. This feature is activated per default if optimization is on (but not with @option{-Og}, @pxref{Optimize Options}), and if GNU Binutils support @w{@uref{https://sourceware.org/PR21683,PR21683}}. -@item -mint8 @opindex mint8 +@item -mint8 Assume @code{int} to be 8-bit integer. This affects the sizes of all types: a @code{char} is 1 byte, an @code{int} is 1 byte, a @code{long} is 2 bytes, and @code{long long} is 4 bytes. Please note that this option does not conform to the C standards, but it results in smaller code size. -@item -mmain-is-OS_task @opindex mmain-is-OS_task +@item -mmain-is-OS_task Do not save registers in @code{main}. The effect is the same like attaching attribute @ref{AVR Function Attributes,,@code{OS_task}} to @code{main}. It is activated per default if optimization is on. -@item -mn-flash=@var{num} @opindex mn-flash +@item -mn-flash=@var{num} Assume that the flash memory has a size of @var{num} times 64@tie{}KiB. -@item -mno-interrupts @opindex mno-interrupts +@item -mno-interrupts Generated code is not compatible with hardware interrupts. Code size is smaller. -@item -mrelax @opindex mrelax +@item -mrelax Try to replace @code{CALL} resp.@: @code{JMP} instruction by the shorter @code{RCALL} resp.@: @code{RJMP} instruction if applicable. Setting @option{-mrelax} just adds the @option{--mlink-relax} option to @@ -22791,13 +22791,13 @@ differ from instructions in the assembler code. Relaxing must be turned on if linker stubs are needed, see the section on @code{EIND} and linker stubs below. -@item -mrmw @opindex mrmw +@item -mrmw Assume that the device supports the Read-Modify-Write instructions @code{XCH}, @code{LAC}, @code{LAS} and @code{LAT}. -@item -mshort-calls @opindex mshort-calls +@item -mshort-calls Assume that @code{RJMP} and @code{RCALL} can target the whole program memory. @@ -22805,8 +22805,8 @@ program memory. This option is used internally for multilib selection. It is not an optimization option, and you don't need to set it by hand. -@item -msp8 @opindex msp8 +@item -msp8 Treat the stack pointer register as an 8-bit register, i.e.@: assume the high byte of the stack pointer is zero. In general, you don't need to set this option by hand. @@ -22820,8 +22820,8 @@ proper's command line, because the compiler then knows if the device or architecture has an 8-bit stack pointer and thus no @code{SPH} register or not. -@item -mstrict-X @opindex mstrict-X +@item -mstrict-X Use address register @code{X} in a way proposed by the hardware. This means that @code{X} is only used in indirect, post-increment or pre-decrement addressing. @@ -22839,20 +22839,20 @@ ld @var{Rn}, X ; @var{Rn} = *X sbiw r26, const ; X -= const @end example -@item -mtiny-stack @opindex mtiny-stack +@item -mtiny-stack Only change the lower 8@tie{}bits of the stack pointer. -@item -mfract-convert-truncate @opindex mfract-convert-truncate +@item -mfract-convert-truncate Allow to use truncation instead of rounding towards zero for fractional fixed-point types. -@item -nodevicelib @opindex nodevicelib +@item -nodevicelib Don't link against AVR-LibC's device specific library @code{lib<mcu>.a}. -@item -nodevicespecs @opindex nodevicespecs +@item -nodevicespecs Don't add @option{-specs=device-specs/specs-@var{mcu}} to the compiler driver's command line. The user takes responsibility for supplying the sub-processes like compiler proper, assembler and linker with appropriate command line @@ -22865,15 +22865,15 @@ specifying custom device-specs files that needed @option{-B @var{some-path}} to which contains a folder named @code{device-specs} which contains a specs file named @code{specs-@var{mcu}}, where @var{mcu} was specified by @option{-mmcu=@var{mcu}}. -@item -Waddr-space-convert @opindex Waddr-space-convert @opindex Wno-addr-space-convert +@item -Waddr-space-convert Warn about conversions between address spaces in the case where the resulting address space is not contained in the incoming address space. -@item -Wmisspelled-isr @opindex Wmisspelled-isr @opindex Wno-misspelled-isr +@item -Wmisspelled-isr Warn if the ISR is misspelled, i.e.@: without __vector prefix. Enabled by default. @end table @@ -23251,8 +23251,8 @@ Reflects the @code{--with-libf7=@{libgcc|math|math-symbols@}} @cindex Blackfin Options @table @gcctabopt -@item -mcpu=@var{cpu}@r{[}-@var{sirevision}@r{]} @opindex mcpu= +@item -mcpu=@var{cpu}@r{[}-@var{sirevision}@r{]} Specifies the name of the target Blackfin processor. Currently, @var{cpu} can be one of @samp{bf512}, @samp{bf514}, @samp{bf516}, @samp{bf518}, @samp{bf522}, @samp{bf523}, @samp{bf524}, @samp{bf525}, @samp{bf526}, @@ -23283,107 +23283,107 @@ Without this option, @samp{bf532} is used as the processor by default. Note that support for @samp{bf561} is incomplete. For @samp{bf561}, only the preprocessor macro is defined. -@item -msim @opindex msim +@item -msim Specifies that the program will be run on the simulator. This causes the simulator BSP provided by libgloss to be linked in. This option has effect only for @samp{bfin-elf} toolchain. Certain other options, such as @option{-mid-shared-library} and @option{-mfdpic}, imply @option{-msim}. -@item -momit-leaf-frame-pointer @opindex momit-leaf-frame-pointer +@item -momit-leaf-frame-pointer Don't keep the frame pointer in a register for leaf functions. This avoids the instructions to save, set up and restore frame pointers and makes an extra register available in leaf functions. -@item -mspecld-anomaly @opindex mspecld-anomaly +@item -mspecld-anomaly When enabled, the compiler ensures that the generated code does not contain speculative loads after jump instructions. If this option is used, @code{__WORKAROUND_SPECULATIVE_LOADS} is defined. -@item -mno-specld-anomaly @opindex mno-specld-anomaly @opindex mspecld-anomaly +@item -mno-specld-anomaly Don't generate extra code to prevent speculative loads from occurring. -@item -mcsync-anomaly @opindex mcsync-anomaly +@item -mcsync-anomaly When enabled, the compiler ensures that the generated code does not contain CSYNC or SSYNC instructions too soon after conditional branches. If this option is used, @code{__WORKAROUND_SPECULATIVE_SYNCS} is defined. -@item -mno-csync-anomaly @opindex mno-csync-anomaly @opindex mcsync-anomaly +@item -mno-csync-anomaly Don't generate extra code to prevent CSYNC or SSYNC instructions from occurring too soon after a conditional branch. -@item -mlow64k @opindex mlow64k +@item -mlow64k When enabled, the compiler is free to take advantage of the knowledge that the entire program fits into the low 64k of memory. -@item -mno-low64k @opindex mno-low64k +@item -mno-low64k Assume that the program is arbitrarily large. This is the default. -@item -mstack-check-l1 @opindex mstack-check-l1 +@item -mstack-check-l1 Do stack checking using information placed into L1 scratchpad memory by the uClinux kernel. -@item -mid-shared-library @opindex mid-shared-library +@item -mid-shared-library Generate code that supports shared libraries via the library ID method. This allows for execute in place and shared libraries in an environment without virtual memory management. This option implies @option{-fPIC}. With a @samp{bfin-elf} target, this option implies @option{-msim}. -@item -mno-id-shared-library @opindex mno-id-shared-library @opindex mid-shared-library +@item -mno-id-shared-library Generate code that doesn't assume ID-based shared libraries are being used. This is the default. -@item -mleaf-id-shared-library @opindex mleaf-id-shared-library +@item -mleaf-id-shared-library Generate code that supports shared libraries via the library ID method, but assumes that this library or executable won't link against any other ID shared libraries. That allows the compiler to use faster code for jumps and calls. -@item -mno-leaf-id-shared-library @opindex mno-leaf-id-shared-library @opindex mleaf-id-shared-library +@item -mno-leaf-id-shared-library Do not assume that the code being compiled won't link against any ID shared libraries. Slower code is generated for jump and call insns. -@item -mshared-library-id=n @opindex mshared-library-id +@item -mshared-library-id=n Specifies the identification number of the ID-based shared library being compiled. Specifying a value of 0 generates more compact code; specifying other values forces the allocation of that number to the current library but is no more space- or time-efficient than omitting this option. -@item -msep-data @opindex msep-data +@item -msep-data Generate code that allows the data segment to be located in a different area of memory from the text segment. This allows for execute in place in an environment without virtual memory management by eliminating relocations against the text section. -@item -mno-sep-data @opindex mno-sep-data @opindex msep-data +@item -mno-sep-data Generate code that assumes that the data segment follows the text segment. This is the default. -@item -mlong-calls -@itemx -mno-long-calls @opindex mlong-calls @opindex mno-long-calls +@item -mlong-calls +@itemx -mno-long-calls Tells the compiler to perform function calls by first loading the address of the function into a register and then performing a subroutine call on this register. This switch is needed if the target function @@ -23395,19 +23395,19 @@ This feature is not enabled by default. Specifying switches have no effect on how the compiler generates code to handle function calls via function pointers. -@item -mfast-fp @opindex mfast-fp +@item -mfast-fp Link with the fast floating-point library. This library relaxes some of the IEEE floating-point standard's rules for checking inputs against Not-a-Number (NAN), in the interest of performance. -@item -minline-plt @opindex minline-plt +@item -minline-plt Enable inlining of PLT entries in function calls to functions that are not known to bind locally. It has no effect without @option{-mfdpic}. -@item -mmulticore @opindex mmulticore +@item -mmulticore Build a standalone application for multicore Blackfin processors. This option causes proper start files and link scripts supporting multicore to be used, and defines the macro @code{__BFIN_MULTICORE}. @@ -23422,16 +23422,16 @@ should be named as @code{coreb_main}. If this option is not used, the single-core application programming model is used. -@item -mcorea @opindex mcorea +@item -mcorea Build a standalone application for Core A of BF561 when using the one-application-per-core programming model. Proper start files and link scripts are used to support Core A, and the macro @code{__BFIN_COREA} is defined. This option can only be used in conjunction with @option{-mmulticore}. -@item -mcoreb @opindex mcoreb +@item -mcoreb Build a standalone application for Core B of BF561 when using the one-application-per-core programming model. Proper start files and link scripts are used to support Core B, and the macro @@ -23439,15 +23439,15 @@ and link scripts are used to support Core B, and the macro should be used instead of @code{main}. This option can only be used in conjunction with @option{-mmulticore}. -@item -msdram @opindex msdram +@item -msdram Build a standalone application for SDRAM. Proper start files and link scripts are used to put the application into SDRAM, and the macro @code{__BFIN_SDRAM} is defined. The loader should initialize SDRAM before loading the application. -@item -micplb @opindex micplb +@item -micplb Assume that ICPLBs are enabled at run time. This has an effect on certain anomaly workarounds. For Linux targets, the default is to assume ICPLBs are enabled; for standalone applications the default is off. @@ -23458,27 +23458,27 @@ are enabled; for standalone applications the default is off. @cindex C6X Options @table @gcctabopt -@item -march=@var{name} @opindex march +@item -march=@var{name} This specifies the name of the target architecture[...] [diff truncated at 524288 bytes]
reply other threads:[~2023-02-23 1:09 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230223010953.47B373858D33@sourceware.org \ --to=gerald@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).