1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
<div class="section-level-extent" id="Preprocessor-Options"> <div class="nav-panel"> <p> Next: <a href="assembler-options" accesskey="n" rel="next">Passing Options to the Assembler</a>, Previous: <a href="instrumentation-options" accesskey="p" rel="prev">Program Instrumentation Options</a>, Up: <a href="invoking-gcc" accesskey="u" rel="up">GCC Command Options</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div> <h1 class="section" id="Options-Controlling-the-Preprocessor"><span>3.13 Options Controlling the Preprocessor<a class="copiable-link" href="#Options-Controlling-the-Preprocessor"> ¶</a></span></h1> <p>These options control the C preprocessor, which is run on each C source file before actual compilation. </p> <p>If you use the <samp class="option">-E</samp> option, nothing is done except preprocessing. Some of these options make sense only together with <samp class="option">-E</samp> because they cause the preprocessor output to be unsuitable for actual compilation. </p> <p>In addition to the options listed here, there are a number of options to control search paths for include files documented in <a class="ref" href="directory-options">Options for Directory Search</a>. Options to control preprocessor diagnostics are listed in <a class="ref" href="warning-options">Options to Request or Suppress Warnings</a>. </p> <dl class="table"> <dt>
<span><code class="code">-D <var class="var">name</var></code><a class="copiable-link" href="#index-D-1"> ¶</a></span>
</dt> <dd>
<p>Predefine <var class="var">name</var> as a macro, with definition <code class="code">1</code>. </p> </dd> <dt><code class="code">-D <var class="var">name</var>=<var class="var">definition</var></code></dt> <dd>
<p>The contents of <var class="var">definition</var> are tokenized and processed as if they appeared during translation phase three in a ‘<samp class="samp">#define</samp>’ directive. In particular, the definition is truncated by embedded newline characters. </p> <p>If you are invoking the preprocessor from a shell or shell-like program you may need to use the shell’s quoting syntax to protect characters such as spaces that have a meaning in the shell syntax. </p> <p>If you wish to define a function-like macro on the command line, write its argument list with surrounding parentheses before the equals sign (if any). Parentheses are meaningful to most shells, so you should quote the option. With <code class="command">sh</code> and <code class="command">csh</code>, <samp class="option">-D'<var class="var">name</var>(<var class="var">args…</var>)=<var class="var">definition</var>'</samp> works. </p> <p><samp class="option">-D</samp> and <samp class="option">-U</samp> options are processed in the order they are given on the command line. All <samp class="option">-imacros <var class="var">file</var></samp> and <samp class="option">-include <var class="var">file</var></samp> options are processed after all <samp class="option">-D</samp> and <samp class="option">-U</samp> options. </p> </dd> <dt>
<span><code class="code">-U <var class="var">name</var></code><a class="copiable-link" href="#index-U"> ¶</a></span>
</dt> <dd>
<p>Cancel any previous definition of <var class="var">name</var>, either built in or provided with a <samp class="option">-D</samp> option. </p> </dd> <dt>
<span><code class="code">-include <var class="var">file</var></code><a class="copiable-link" href="#index-include"> ¶</a></span>
</dt> <dd>
<p>Process <var class="var">file</var> as if <code class="code">#include "file"</code> appeared as the first line of the primary source file. However, the first directory searched for <var class="var">file</var> is the preprocessor’s working directory <em class="emph">instead of</em> the directory containing the main source file. If not found there, it is searched for in the remainder of the <code class="code">#include "…"</code> search chain as normal. </p> <p>If multiple <samp class="option">-include</samp> options are given, the files are included in the order they appear on the command line. </p> </dd> <dt>
<span><code class="code">-imacros <var class="var">file</var></code><a class="copiable-link" href="#index-imacros"> ¶</a></span>
</dt> <dd>
<p>Exactly like <samp class="option">-include</samp>, except that any output produced by scanning <var class="var">file</var> is thrown away. Macros it defines remain defined. This allows you to acquire all the macros from a header without also processing its declarations. </p> <p>All files specified by <samp class="option">-imacros</samp> are processed before all files specified by <samp class="option">-include</samp>. </p> </dd> <dt>
<span><code class="code">-undef</code><a class="copiable-link" href="#index-undef"> ¶</a></span>
</dt> <dd>
<p>Do not predefine any system-specific or GCC-specific macros. The standard predefined macros remain defined. </p> </dd> <dt>
<span><code class="code">-pthread</code><a class="copiable-link" href="#index-pthread"> ¶</a></span>
</dt> <dd>
<p>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. </p> </dd> <dt>
<span><code class="code">-M</code><a class="copiable-link" href="#index-M"> ¶</a></span>
</dt> <dd>
<p>Instead of outputting the result of preprocessing, output a rule suitable for <code class="command">make</code> describing the dependencies of the main source file. The preprocessor outputs one <code class="command">make</code> rule containing the object file name for that source file, a colon, and the names of all the included files, including those coming from <samp class="option">-include</samp> or <samp class="option">-imacros</samp> command-line options. </p> <p>Unless specified explicitly (with <samp class="option">-MT</samp> or <samp class="option">-MQ</samp>), the object file name consists of the name of the source file with any suffix replaced with object file suffix and with any leading directory parts removed. If there are many included files then the rule is split into several lines using ‘<samp class="samp">\</samp>’-newline. The rule has no commands. </p> <p>This option does not suppress the preprocessor’s debug output, such as <samp class="option">-dM</samp>. To avoid mixing such debug output with the dependency rules you should explicitly specify the dependency output file with <samp class="option">-MF</samp>, or use an environment variable like <code class="env">DEPENDENCIES_OUTPUT</code> (see <a class="pxref" href="environment-variables">Environment Variables Affecting GCC</a>). Debug output is still sent to the regular output stream as normal. </p> <p>Passing <samp class="option">-M</samp> to the driver implies <samp class="option">-E</samp>, and suppresses warnings with an implicit <samp class="option">-w</samp>. </p> </dd> <dt>
<span><code class="code">-MM</code><a class="copiable-link" href="#index-MM"> ¶</a></span>
</dt> <dd>
<p>Like <samp class="option">-M</samp> 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. </p> <p>This implies that the choice of angle brackets or double quotes in an ‘<samp class="samp">#include</samp>’ directive does not in itself determine whether that header appears in <samp class="option">-MM</samp> dependency output. </p>
</dd> <dt>
<span><code class="code">-MF <var class="var">file</var></code><a class="copiable-link" href="#index-MF"> ¶</a></span>
</dt> <dd>
<p>When used with <samp class="option">-M</samp> or <samp class="option">-MM</samp>, specifies a file to write the dependencies to. If no <samp class="option">-MF</samp> switch is given the preprocessor sends the rules to the same place it would send preprocessed output. </p> <p>When used with the driver options <samp class="option">-MD</samp> or <samp class="option">-MMD</samp>, <samp class="option">-MF</samp> overrides the default dependency output file. </p> <p>If <var class="var">file</var> is <samp class="file">-</samp>, then the dependencies are written to <samp class="file">stdout</samp>. </p> </dd> <dt>
<span><code class="code">-MG</code><a class="copiable-link" href="#index-MG"> ¶</a></span>
</dt> <dd>
<p>In conjunction with an option such as <samp class="option">-M</samp> requesting dependency generation, <samp class="option">-MG</samp> assumes missing header files are generated files and adds them to the dependency list without raising an error. The dependency filename is taken directly from the <code class="code">#include</code> directive without prepending any path. <samp class="option">-MG</samp> also suppresses preprocessed output, as a missing header file renders this useless. </p> <p>This feature is used in automatic updating of makefiles. </p> </dd> <dt>
<span><code class="code">-Mno-modules</code><a class="copiable-link" href="#index-Mno-modules"> ¶</a></span>
</dt> <dd>
<p>Disable dependency generation for compiled module interfaces. </p> </dd> <dt>
<span><code class="code">-MP</code><a class="copiable-link" href="#index-MP"> ¶</a></span>
</dt> <dd>
<p>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 <code class="command">make</code> gives if you remove header files without updating the <samp class="file">Makefile</samp> to match. </p> <p>This is typical output: </p> <div class="example smallexample"> <pre class="example-preformatted" data-language="cpp">test.o: test.c test.h
test.h:</pre>
</div> </dd> <dt>
<span><code class="code">-MT <var class="var">target</var></code><a class="copiable-link" href="#index-MT"> ¶</a></span>
</dt> <dd> <p>Change the target of the rule emitted by dependency generation. By default CPP takes the name of the main input file, deletes any directory components and any file suffix such as ‘<samp class="samp">.c</samp>’, and appends the platform’s usual object suffix. The result is the target. </p> <p>An <samp class="option">-MT</samp> option sets the target to be exactly the string you specify. If you want multiple targets, you can specify them as a single argument to <samp class="option">-MT</samp>, or use multiple <samp class="option">-MT</samp> options. </p> <p>For example, <samp class="option">-MT '$(objpfx)foo.o'</samp> might give </p> <div class="example smallexample"> <pre class="example-preformatted" data-language="cpp">$(objpfx)foo.o: foo.c</pre>
</div> </dd> <dt>
<span><code class="code">-MQ <var class="var">target</var></code><a class="copiable-link" href="#index-MQ"> ¶</a></span>
</dt> <dd> <p>Same as <samp class="option">-MT</samp>, but it quotes any characters which are special to Make. <samp class="option">-MQ '$(objpfx)foo.o'</samp> gives </p> <div class="example smallexample"> <pre class="example-preformatted" data-language="cpp">$$(objpfx)foo.o: foo.c</pre>
</div> <p>The default target is automatically quoted, as if it were given with <samp class="option">-MQ</samp>. </p> </dd> <dt>
<span><code class="code">-MD</code><a class="copiable-link" href="#index-MD"> ¶</a></span>
</dt> <dd>
<p><samp class="option">-MD</samp> is equivalent to <samp class="option">-M -MF <var class="var">file</var></samp>, except that <samp class="option">-E</samp> is not implied. The driver determines <var class="var">file</var> based on whether an <samp class="option">-o</samp> option is given. If it is, the driver uses its argument but with a suffix of <samp class="file">.d</samp>, otherwise it takes the name of the input file, removes any directory components and suffix, and applies a <samp class="file">.d</samp> suffix. </p> <p>If <samp class="option">-MD</samp> is used in conjunction with <samp class="option">-E</samp>, any <samp class="option">-o</samp> switch is understood to specify the dependency output file (see <a class="pxref" href="#dashMF">-MF</a>), but if used without <samp class="option">-E</samp>, each <samp class="option">-o</samp> is understood to specify a target object file. </p> <p>Since <samp class="option">-E</samp> is not implied, <samp class="option">-MD</samp> can be used to generate a dependency output file as a side effect of the compilation process. </p> </dd> <dt>
<span><code class="code">-MMD</code><a class="copiable-link" href="#index-MMD"> ¶</a></span>
</dt> <dd>
<p>Like <samp class="option">-MD</samp> except mention only user header files, not system header files. </p> </dd> <dt>
<span><code class="code">-fpreprocessed</code><a class="copiable-link" href="#index-fpreprocessed"> ¶</a></span>
</dt> <dd>
<p>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. The preprocessor still recognizes and removes comments, so that you can pass a file preprocessed with <samp class="option">-C</samp> to the compiler without problems. In this mode the integrated preprocessor is little more than a tokenizer for the front ends. </p> <p><samp class="option">-fpreprocessed</samp> is implicit if the input file has one of the extensions ‘<samp class="samp">.i</samp>’, ‘<samp class="samp">.ii</samp>’ or ‘<samp class="samp">.mi</samp>’. These are the extensions that GCC uses for preprocessed files created by <samp class="option">-save-temps</samp>. </p> </dd> <dt>
<span><code class="code">-fdirectives-only</code><a class="copiable-link" href="#index-fdirectives-only"> ¶</a></span>
</dt> <dd>
<p>When preprocessing, handle directives, but do not expand macros. </p> <p>The option’s behavior depends on the <samp class="option">-E</samp> and <samp class="option">-fpreprocessed</samp> options. </p> <p>With <samp class="option">-E</samp>, preprocessing is limited to the handling of directives such as <code class="code">#define</code>, <code class="code">#ifdef</code>, and <code class="code">#error</code>. Other preprocessor operations, such as macro expansion and trigraph conversion are not performed. In addition, the <samp class="option">-dD</samp> option is implicitly enabled. </p> <p>With <samp class="option">-fpreprocessed</samp>, predefinition of command line and most builtin macros is disabled. Macros such as <code class="code">__LINE__</code>, which are contextually dependent, are handled normally. This enables compilation of files previously preprocessed with <code class="code">-E -fdirectives-only</code>. </p> <p>With both <samp class="option">-E</samp> and <samp class="option">-fpreprocessed</samp>, the rules for <samp class="option">-fpreprocessed</samp> take precedence. This enables full preprocessing of files previously preprocessed with <code class="code">-E -fdirectives-only</code>. </p> </dd> <dt>
<span><code class="code">-fdollars-in-identifiers</code><a class="copiable-link" href="#index-fdollars-in-identifiers"> ¶</a></span>
</dt> <dd>
<p>Accept ‘<samp class="samp">$</samp>’ in identifiers. </p> </dd> <dt>
<span><code class="code">-fextended-identifiers</code><a class="copiable-link" href="#index-fextended-identifiers"> ¶</a></span>
</dt> <dd>
<p>Accept universal character names and extended characters in identifiers. This option is enabled by default for C99 (and later C standard versions) and C++. </p> </dd> <dt>
<span><code class="code">-fno-canonical-system-headers</code><a class="copiable-link" href="#index-fno-canonical-system-headers"> ¶</a></span>
</dt> <dd>
<p>When preprocessing, do not shorten system header paths with canonicalization. </p> </dd> <dt>
<span><code class="code">-fmax-include-depth=<var class="var">depth</var></code><a class="copiable-link" href="#index-fmax-include-depth"> ¶</a></span>
</dt> <dd>
<p>Set the maximum depth of the nested #include. The default is 200. </p> </dd> <dt>
<span><code class="code">-ftabstop=<var class="var">width</var></code><a class="copiable-link" href="#index-ftabstop"> ¶</a></span>
</dt> <dd>
<p>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. </p> </dd> <dt>
<span><code class="code">-ftrack-macro-expansion<span class="r">[</span>=<var class="var">level</var><span class="r">]</span></code><a class="copiable-link" href="#index-ftrack-macro-expansion"> ¶</a></span>
</dt> <dd>
<p>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 option makes the preprocessor and the compiler consume more memory. The <var class="var">level</var> parameter can be used to choose the level of precision of token location tracking thus decreasing the memory consumption if necessary. Value ‘<samp class="samp">0</samp>’ of <var class="var">level</var> de-activates this option. Value ‘<samp class="samp">1</samp>’ tracks tokens locations in a degraded mode for the sake of minimal memory overhead. In this mode all tokens resulting from the expansion of an argument of a function-like macro have the same location. Value ‘<samp class="samp">2</samp>’ tracks tokens locations completely. This value is the most memory hungry. When this option is given no argument, the default parameter value is ‘<samp class="samp">2</samp>’. </p> <p>Note that <code class="code">-ftrack-macro-expansion=2</code> is activated by default. </p> </dd> <dt>
<span><code class="code">-fmacro-prefix-map=<var class="var">old</var>=<var class="var">new</var></code><a class="copiable-link" href="#index-fmacro-prefix-map"> ¶</a></span>
</dt> <dd>
<p>When preprocessing files residing in directory <samp class="file"><var class="var">old</var></samp>, expand the <code class="code">__FILE__</code> and <code class="code">__BASE_FILE__</code> macros as if the files resided in directory <samp class="file"><var class="var">new</var></samp> instead. This can be used to change an absolute path to a relative path by using <samp class="file">.</samp> for <var class="var">new</var> which can result in more reproducible builds that are location independent. This option also affects <code class="code">__builtin_FILE()</code> during compilation. See also <samp class="option">-ffile-prefix-map</samp> and <samp class="option">-fcanon-prefix-map</samp>. </p> </dd> <dt>
<span><code class="code">-fexec-charset=<var class="var">charset</var></code><a class="copiable-link" href="#index-fexec-charset"> ¶</a></span>
</dt> <dd>
<p>Set the execution character set, used for string and character constants. The default is UTF-8. <var class="var">charset</var> can be any encoding supported by the system’s <code class="code">iconv</code> library routine. </p> </dd> <dt>
<span><code class="code">-fwide-exec-charset=<var class="var">charset</var></code><a class="copiable-link" href="#index-fwide-exec-charset"> ¶</a></span>
</dt> <dd>
<p>Set the wide execution character set, used for wide string and character constants. The default is one of UTF-32BE, UTF-32LE, UTF-16BE, or UTF-16LE, whichever corresponds to the width of <code class="code">wchar_t</code> and the big-endian or little-endian byte order being used for code generation. As with <samp class="option">-fexec-charset</samp>, <var class="var">charset</var> can be any encoding supported by the system’s <code class="code">iconv</code> library routine; however, you will have problems with encodings that do not fit exactly in <code class="code">wchar_t</code>. </p> </dd> <dt>
<span><code class="code">-finput-charset=<var class="var">charset</var></code><a class="copiable-link" href="#index-finput-charset"> ¶</a></span>
</dt> <dd>
<p>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 locale does not specify, or GCC cannot get this information from the locale, the default is UTF-8. This can be overridden by either the locale or this command-line option. Currently the command-line option takes precedence if there’s a conflict. <var class="var">charset</var> can be any encoding supported by the system’s <code class="code">iconv</code> library routine. </p> </dd> <dt>
<span><code class="code">-fpch-deps</code><a class="copiable-link" href="#index-fpch-deps"> ¶</a></span>
</dt> <dd>
<p>When using precompiled headers (see <a class="pxref" href="precompiled-headers">Using Precompiled Headers</a>), this flag causes the dependency-output flags to also list the files from the precompiled header’s dependencies. If not specified, only the 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. </p> </dd> <dt>
<span><code class="code">-fpch-preprocess</code><a class="copiable-link" href="#index-fpch-preprocess"> ¶</a></span>
</dt> <dd>
<p>This option allows use of a precompiled header (see <a class="pxref" href="precompiled-headers">Using Precompiled Headers</a>) together with <samp class="option">-E</samp>. It inserts a special <code class="code">#pragma</code>, <code class="code">#pragma GCC pch_preprocess "<var class="var">filename</var>"</code> in the output to mark the place where the precompiled header was found, and its <var class="var">filename</var>. When <samp class="option">-fpreprocessed</samp> is in use, GCC recognizes this <code class="code">#pragma</code> and loads the PCH. </p> <p>This option is off by default, because the resulting preprocessed output is only really suitable as input to GCC. It is switched on by <samp class="option">-save-temps</samp>. </p> <p>You should not write this <code class="code">#pragma</code> in your own code, but it is safe to edit the filename if the PCH file is available in a different location. The filename may be absolute or it may be relative to GCC’s current directory. </p> </dd> <dt>
<span><code class="code">-fworking-directory</code><a class="copiable-link" href="#index-fworking-directory"> ¶</a></span>
</dt> <dd>
<p>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 emits, after the initial linemarker, a second linemarker with the current working directory followed by two slashes. GCC uses this directory, when it’s present in the preprocessed input, as the directory emitted as the current working directory in some debugging information formats. This option is implicitly enabled if debugging information is enabled, but this can be inhibited with the negated form <samp class="option">-fno-working-directory</samp>. If the <samp class="option">-P</samp> flag is present in the command line, this option has no effect, since no <code class="code">#line</code> directives are emitted whatsoever. </p> </dd> <dt>
<span><code class="code">-A <var class="var">predicate</var>=<var class="var">answer</var></code><a class="copiable-link" href="#index-A"> ¶</a></span>
</dt> <dd>
<p>Make an assertion with the predicate <var class="var">predicate</var> and answer <var class="var">answer</var>. This form is preferred to the older form <samp class="option">-A <var class="var">predicate</var>(<var class="var">answer</var>)</samp>, which is still supported, because it does not use shell special characters. </p> </dd> <dt><code class="code">-A -<var class="var">predicate</var>=<var class="var">answer</var></code></dt> <dd>
<p>Cancel an assertion with the predicate <var class="var">predicate</var> and answer <var class="var">answer</var>. </p> </dd> <dt>
<span><code class="code">-C</code><a class="copiable-link" href="#index-C"> ¶</a></span>
</dt> <dd>
<p>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. </p> <p>You should be prepared for side effects when using <samp class="option">-C</samp>; it causes the preprocessor to treat comments as tokens in their own right. 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 class="samp">#</samp>’. </p> </dd> <dt>
<span><code class="code">-CC</code><a class="copiable-link" href="#index-CC"> ¶</a></span>
</dt> <dd>
<p>Do not discard comments, including during macro expansion. This is like <samp class="option">-C</samp>, except that comments contained within macros are also passed through to the output file where the macro is expanded. </p> <p>In addition to the side effects of the <samp class="option">-C</samp> option, the <samp class="option">-CC</samp> option causes all C++-style comments inside a macro to be converted to C-style comments. This is to prevent later use of that macro from inadvertently commenting out the remainder of the source line. </p> <p>The <samp class="option">-CC</samp> option is generally used to support lint comments. </p> </dd> <dt>
<span><code class="code">-P</code><a class="copiable-link" href="#index-P"> ¶</a></span>
</dt> <dd>
<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 linemarkers. </p> </dd> <dt>
<span><code class="code">-traditional</code><a class="copiable-link" href="#index-traditional-C-language"> ¶</a></span>
</dt> <dt><code class="code">-traditional-cpp</code></dt> <dd> <p>Try to imitate the behavior of pre-standard C preprocessors, as opposed to ISO C preprocessors. See the GNU CPP manual for details. </p> <p>Note that GCC does not otherwise attempt to emulate a pre-standard C compiler, and these options are only supported with the <samp class="option">-E</samp> switch, or when invoking CPP explicitly. </p> </dd> <dt>
<span><code class="code">-trigraphs</code><a class="copiable-link" href="#index-trigraphs"> ¶</a></span>
</dt> <dd>
<p>Support ISO C trigraphs. These are three-character sequences, all starting with ‘<samp class="samp">??</samp>’, that are defined by ISO C to stand for single characters. For example, ‘<samp class="samp">??/</samp>’ stands for ‘<samp class="samp">\</samp>’, so ‘<samp class="samp">'??/n'</samp>’ is a character constant for a newline. </p> <p>The nine trigraphs and their replacements are </p> <div class="example smallexample"> <pre class="example-preformatted" data-language="cpp">Trigraph: ??( ??) ??< ??> ??= ??/ ??' ??! ??-
Replacement: [ ] { } # \ ^ | ~</pre>
</div> <p>By default, GCC ignores trigraphs, but in standard-conforming modes it converts them. See the <samp class="option">-std</samp> and <samp class="option">-ansi</samp> options. </p> </dd> <dt>
<span><code class="code">-remap</code><a class="copiable-link" href="#index-remap"> ¶</a></span>
</dt> <dd>
<p>Enable special code to work around file systems which only permit very short file names, such as MS-DOS. </p> </dd> <dt>
<span><code class="code">-H</code><a class="copiable-link" href="#index-H"> ¶</a></span>
</dt> <dd>
<p>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 class="samp">#include</samp>’ 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 class="samp">...x</samp>’ and a valid one with ‘<samp class="samp">...!</samp>’ . </p> </dd> <dt>
<span><code class="code">-d<var class="var">letters</var></code><a class="copiable-link" href="#index-d"> ¶</a></span>
</dt> <dd>
<p>Says to make debugging dumps during compilation as specified by <var class="var">letters</var>. The flags documented here are those relevant to the preprocessor. Other <var class="var">letters</var> are interpreted by the compiler proper, or reserved for future versions of GCC, and so are silently ignored. If you specify <var class="var">letters</var> whose behavior conflicts, the result is undefined. See <a class="xref" href="developer-options">GCC Developer Options</a>, for more information. </p> <dl class="table"> <dt>
<span><code class="code">-dM</code><a class="copiable-link" href="#index-dM"> ¶</a></span>
</dt> <dd>
<p>Instead of the normal output, generate a list of ‘<samp class="samp">#define</samp>’ directives for all the macros defined during the execution of the preprocessor, including predefined macros. This gives you a way of finding out what is predefined in your version of the preprocessor. Assuming you have no file <samp class="file">foo.h</samp>, the command </p> <div class="example smallexample"> <pre class="example-preformatted" data-language="cpp">touch foo.h; cpp -dM foo.h</pre>
</div> <p>shows all the predefined macros. </p> <p>If you use <samp class="option">-dM</samp> without the <samp class="option">-E</samp> option, <samp class="option">-dM</samp> is interpreted as a synonym for <samp class="option">-fdump-rtl-mach</samp>. See <a data-manual="gcc" href="https://gcc.gnu.org/onlinedocs/gcc/Developer-Options.html#Developer-Options">(gcc)Developer Options</a>. </p> </dd> <dt>
<span><code class="code">-dD</code><a class="copiable-link" href="#index-dD"> ¶</a></span>
</dt> <dd>
<p>Like <samp class="option">-dM</samp> except in two respects: it does <em class="emph">not</em> include the predefined macros, and it outputs <em class="emph">both</em> the ‘<samp class="samp">#define</samp>’ directives and the result of preprocessing. Both kinds of output go to the standard output file. </p> </dd> <dt>
<span><code class="code">-dN</code><a class="copiable-link" href="#index-dN"> ¶</a></span>
</dt> <dd>
<p>Like <samp class="option">-dD</samp>, but emit only the macro names, not their expansions. </p> </dd> <dt>
<span><code class="code">-dI</code><a class="copiable-link" href="#index-dI"> ¶</a></span>
</dt> <dd>
<p>Output ‘<samp class="samp">#include</samp>’ directives in addition to the result of preprocessing. </p> </dd> <dt>
<span><code class="code">-dU</code><a class="copiable-link" href="#index-dU"> ¶</a></span>
</dt> <dd><p>Like <samp class="option">-dD</samp> 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 ‘<samp class="samp">#undef</samp>’ directives are also output for macros tested but undefined at the time. </p></dd> </dl> </dd> <dt>
<span><code class="code">-fdebug-cpp</code><a class="copiable-link" href="#index-fdebug-cpp"> ¶</a></span>
</dt> <dd>
<p>This option is only useful for debugging GCC. When used from CPP or with <samp class="option">-E</samp>, it dumps debugging information about location maps. Every token in the output is preceded by the dump of the map its location belongs to. </p> <p>When used from GCC without <samp class="option">-E</samp>, this option has no effect. </p> </dd> <dt>
<span><code class="code">-Wp,<var class="var">option</var></code><a class="copiable-link" href="#index-Wp"> ¶</a></span>
</dt> <dd>
<p>You can use <samp class="option">-Wp,<var class="var">option</var></samp> to bypass the compiler driver and pass <var class="var">option</var> directly through to the preprocessor. If <var class="var">option</var> contains commas, it is split into multiple options at the commas. However, many options are modified, translated or interpreted by the compiler driver before being passed to the preprocessor, and <samp class="option">-Wp</samp> forcibly bypasses this phase. The preprocessor’s direct interface is undocumented and subject to change, so whenever possible you should avoid using <samp class="option">-Wp</samp> and let the driver handle the options instead. </p> </dd> <dt>
<span><code class="code">-Xpreprocessor <var class="var">option</var></code><a class="copiable-link" href="#index-Xpreprocessor"> ¶</a></span>
</dt> <dd>
<p>Pass <var class="var">option</var> as an option to the preprocessor. You can use this to supply system-specific preprocessor options that GCC does not recognize. </p> <p>If you want to pass an option that takes an argument, you must use <samp class="option">-Xpreprocessor</samp> twice, once for the option and once for the argument. </p> </dd> <dt>
<span><code class="code">-no-integrated-cpp</code><a class="copiable-link" href="#index-no-integrated-cpp"> ¶</a></span>
</dt> <dd>
<p>Perform preprocessing as a separate pass before compilation. By default, GCC performs preprocessing as an integrated part of input tokenization and parsing. If this option is provided, the appropriate language front end (<code class="command">cc1</code>, <code class="command">cc1plus</code>, or <code class="command">cc1obj</code> for C, C++, and Objective-C, respectively) is instead invoked twice, once for preprocessing only and once for actual compilation of the preprocessed input. This option may be useful in conjunction with the <samp class="option">-B</samp> or <samp class="option">-wrapper</samp> options to specify an alternate preprocessor or perform additional processing of the program source between normal preprocessing and compilation. </p> </dd> <dt>
<span><code class="code">-flarge-source-files</code><a class="copiable-link" href="#index-flarge-source-files"> ¶</a></span>
</dt> <dd>
<p>Adjust GCC to expect large source files, at the expense of slower compilation and higher memory usage. </p> <p>Specifically, GCC normally tracks both column numbers and line numbers within source files and it normally prints both of these numbers in diagnostics. However, once it has processed a certain number of source lines, it stops tracking column numbers and only tracks line numbers. This means that diagnostics for later lines do not include column numbers. It also means that options like <samp class="option">-Wmisleading-indentation</samp> cease to work at that point, although the compiler prints a note if this happens. Passing <samp class="option">-flarge-source-files</samp> significantly increases the number of source lines that GCC can process before it stops tracking columns. </p> </dd> </dl> </div> <div class="nav-panel"> <p> Next: <a href="assembler-options">Passing Options to the Assembler</a>, Previous: <a href="instrumentation-options">Program Instrumentation Options</a>, Up: <a href="invoking-gcc">GCC Command Options</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div><div class="_attribution">
<p class="_attribution-p">
© Free Software Foundation<br>Licensed under the GNU Free Documentation License, Version 1.3.<br>
<a href="https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Preprocessor-Options.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Preprocessor-Options.html</a>
</p>
</div>
|