📄 option-summary.html
字号:
<html lang="en">
<head>
<title>Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.3">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
<!--
Copyright © 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
<p>Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "GNU General Public License" and "Funding
Free Software", the Front-Cover texts being (a) (see below), and with
the Back-Cover Texts being (b) (see below). A copy of the license is
included in the section entitled "GNU Free Documentation License".
<p>(a) The FSF's Front-Cover Text is:
<p>A GNU Manual
<p>(b) The FSF's Back-Cover Text is:
<p>You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
</head>
<body>
<div class="node">
<p>
Node:<a name="Option%20Summary">Option Summary</a>,
Next:<a rel="next" accesskey="n" href="Overall-Options.html#Overall%20Options">Overall Options</a>,
Up:<a rel="up" accesskey="u" href="Invoking-GCC.html#Invoking%20GCC">Invoking GCC</a>
<hr><br>
</div>
<h3 class="section">Option Summary</h3>
<p>Here is a summary of all the options, grouped by type. Explanations are
in the following sections.
<dl>
<dt><em>Overall Options</em>
<dd>See <a href="Overall-Options.html#Overall%20Options">Options Controlling the Kind of Output</a>.
<pre class="smallexample"> -c -S -E -o <var>file</var> -pipe -pass-exit-codes
-x <var>language</var> -v -### --help --target-help --version
</pre>
<br><dt><em>C Language Options</em>
<dd>See <a href="C-Dialect-Options.html#C%20Dialect%20Options">Options Controlling C Dialect</a>.
<pre class="smallexample"> -ansi -std=<var>standard</var> -aux-info <var>filename</var>
-fno-asm -fno-builtin -fno-builtin-<var>function</var>
-fhosted -ffreestanding -fms-extensions
-trigraphs -no-integrated-cpp -traditional -traditional-cpp
-fallow-single-precision -fcond-mismatch
-fsigned-bitfields -fsigned-char
-funsigned-bitfields -funsigned-char
-fwritable-strings
</pre>
<br><dt><em>C++ Language Options</em>
<dd>See <a href="C---Dialect-Options.html#C++%20Dialect%20Options">Options Controlling C++ Dialect</a>.
<pre class="smallexample"> -fabi-version=<var>n</var> -fno-access-control -fcheck-new
-fconserve-space -fno-const-strings -fdollars-in-identifiers
-fno-elide-constructors
-fno-enforce-eh-specs -fexternal-templates
-falt-external-templates
-ffor-scope -fno-for-scope -fno-gnu-keywords
-fno-implicit-templates
-fno-implicit-inline-templates
-fno-implement-inlines -fms-extensions
-fno-nonansi-builtins -fno-operator-names
-fno-optional-diags -fpermissive
-frepo -fno-rtti -fstats -ftemplate-depth-<var>n</var>
-fuse-cxa-atexit -fvtable-gc -fno-weak -nostdinc++
-fno-default-inline -Wabi -Wctor-dtor-privacy
-Wnon-virtual-dtor -Wreorder
-Weffc++ -Wno-deprecated
-Wno-non-template-friend -Wold-style-cast
-Woverloaded-virtual -Wno-pmf-conversions
-Wsign-promo -Wsynth
</pre>
<br><dt><em>Objective-C Language Options</em>
<dd>See <a href="Objective-C-Dialect-Options.html#Objective-C%20Dialect%20Options">Options Controlling Objective-C Dialect</a>.
<pre class="smallexample"> -fconstant-string-class=<var>class-name</var>
-fgnu-runtime -fnext-runtime -gen-decls
-Wno-protocol -Wselector -Wundeclared-selector
</pre>
<br><dt><em>Language Independent Options</em>
<dd>See <a href="Language-Independent-Options.html#Language%20Independent%20Options">Options to Control Diagnostic Messages Formatting</a>.
<pre class="smallexample"> -fmessage-length=<var>n</var>
-fdiagnostics-show-location=[once|every-line]
</pre>
<br><dt><em>Warning Options</em>
<dd>See <a href="Warning-Options.html#Warning%20Options">Options to Request or Suppress Warnings</a>.
<pre class="smallexample"> -fsyntax-only -pedantic -pedantic-errors
-w -W -Wall -Waggregate-return
-Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment
-Wconversion -Wno-deprecated-declarations
-Wdisabled-optimization -Wno-div-by-zero -Werror
-Wfloat-equal -Wformat -Wformat=2
-Wformat-nonliteral -Wformat-security
-Wimplicit -Wimplicit-int
-Wimplicit-function-declaration
-Werror-implicit-function-declaration
-Wimport -Winline -Wno-endif-labels
-Wlarger-than-<var>len</var> -Wlong-long
-Wmain -Wmissing-braces
-Wmissing-format-attribute -Wmissing-noreturn
-Wno-multichar -Wno-format-extra-args -Wno-format-y2k
-Wno-import -Wnonnull -Wpacked -Wpadded
-Wparentheses -Wpointer-arith -Wredundant-decls
-Wreturn-type -Wsequence-point -Wshadow
-Wsign-compare -Wstrict-aliasing
-Wswitch -Wswitch-default -Wswitch-enum
-Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized
-Wunknown-pragmas -Wunreachable-code
-Wunused -Wunused-function -Wunused-label -Wunused-parameter
-Wunused-value -Wunused-variable -Wwrite-strings
</pre>
<br><dt><em>C-only Warning Options</em>
<dd>
<pre class="smallexample"> -Wbad-function-cast -Wmissing-declarations
-Wmissing-prototypes -Wnested-externs
-Wstrict-prototypes -Wtraditional
</pre>
<br><dt><em>Debugging Options</em>
<dd>See <a href="Debugging-Options.html#Debugging%20Options">Options for Debugging Your Program or GCC</a>.
<pre class="smallexample"> -d<var>letters</var> -dumpspecs -dumpmachine -dumpversion
-fdump-unnumbered -fdump-translation-unit[-<var>n</var>]
-fdump-class-hierarchy[-<var>n</var>]
-fdump-tree-original[-<var>n</var>]
-fdump-tree-optimized[-<var>n</var>]
-fdump-tree-inlined[-<var>n</var>]
-feliminate-dwarf2-dups -fmem-report
-fprofile-arcs -fsched-verbose=<var>n</var>
-ftest-coverage -ftime-report
-g -g<var>level</var> -gcoff -gdwarf -gdwarf-1 -gdwarf-1+ -gdwarf-2
-ggdb -gstabs -gstabs+ -gvms -gxcoff -gxcoff+
-p -pg -print-file-name=<var>library</var> -print-libgcc-file-name
-print-multi-directory -print-multi-lib
-print-prog-name=<var>program</var> -print-search-dirs -Q
-save-temps -time
</pre>
<br><dt><em>Optimization Options</em>
<dd>See <a href="Optimize-Options.html#Optimize%20Options">Options that Control Optimization</a>.
<pre class="smallexample"> -falign-functions=<var>n</var> -falign-jumps=<var>n</var>
-falign-labels=<var>n</var> -falign-loops=<var>n</var>
-fbranch-probabilities -fcaller-saves -fcprop-registers
-fcse-follow-jumps -fcse-skip-blocks -fdata-sections
-fdelayed-branch -fdelete-null-pointer-checks
-fexpensive-optimizations -ffast-math -ffloat-store
-fforce-addr -fforce-mem -ffunction-sections
-fgcse -fgcse-lm -fgcse-sm -floop-optimize -fcrossjumping
-fif-conversion -fif-conversion2
-finline-functions -finline-limit=<var>n</var> -fkeep-inline-functions
-fkeep-static-consts -fmerge-constants -fmerge-all-constants
-fmove-all-movables -fnew-ra -fno-branch-count-reg
-fno-default-inline -fno-defer-pop
-fno-function-cse -fno-guess-branch-probability
-fno-inline -fno-math-errno -fno-peephole -fno-peephole2
-funsafe-math-optimizations -ffinite-math-only
-fno-trapping-math -fno-zero-initialized-in-bss
-fomit-frame-pointer -foptimize-register-move
-foptimize-sibling-calls -fprefetch-loop-arrays
-freduce-all-givs -fregmove -frename-registers
-freorder-blocks -freorder-functions
-frerun-cse-after-loop -frerun-loop-opt
-fschedule-insns -fschedule-insns2
-fno-sched-interblock -fno-sched-spec -fsched-spec-load
-fsched-spec-load-dangerous -fsignaling-nans
-fsingle-precision-constant -fssa -fssa-ccp -fssa-dce
-fstrength-reduce -fstrict-aliasing -ftracer -fthread-jumps
-funroll-all-loops -funroll-loops
--param <var>name</var>=<var>value</var>
-O -O0 -O1 -O2 -O3 -Os
</pre>
<br><dt><em>Preprocessor Options</em>
<dd>See <a href="Preprocessor-Options.html#Preprocessor%20Options">Options Controlling the Preprocessor</a>.
<pre class="smallexample"> -$ -A<var>question</var>=<var>answer</var>
-A-<var>question</var>[=<var>answer</var>]
-C -dD -dI -dM -dN
-D<var>macro</var>[=<var>defn</var>] -E -H
-idirafter <var>dir</var>
-include <var>file</var> -imacros <var>file</var>
-iprefix <var>file</var> -iwithprefix <var>dir</var>
-iwithprefixbefore <var>dir</var> -isystem <var>dir</var>
-M -MM -MF -MG -MP -MQ -MT -nostdinc -P -remap
-trigraphs -undef -U<var>macro</var> -Wp,<var>option</var>
</pre>
<br><dt><em>Assembler Option</em>
<dd>See <a href="Assembler-Options.html#Assembler%20Options">Passing Options to the Assembler</a>.
<pre class="smallexample"> -Wa,<var>option</var>
</pre>
<br><dt><em>Linker Options</em>
<dd>See <a href="Link-Options.html#Link%20Options">Options for Linking</a>.
<pre class="smallexample"> <var>object-file-name</var> -l<var>library</var>
-nostartfiles -nodefaultlibs -nostdlib
-s -static -static-libgcc -shared -shared-libgcc -symbolic
-Wl,<var>option</var> -Xlinker <var>option</var>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -