⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 preprocessor-options.html

📁 自己收集的linux入门到学懂高级编程书集 包括linux程序设计第三版
💻 HTML
📖 第 1 页 / 共 3 页
字号:
scanning <var>file</var> is thrown away.  Macros it defines remain defined. This allows you to acquire all the macros from a header without alsoprocessing its declarations.     <p>All files specified by <code>-imacros</code> are processed before all filesspecified by <code>-include</code>.     <br><dt><code>-idirafter </code><var>dir</var><code></code>     <dd>Search <var>dir</var> for header files, but do it <em>after</em> alldirectories specified with <code>-I</code> and the standard system directorieshave been exhausted.  <var>dir</var> is treated as a system include directory.     <br><dt><code>-iprefix </code><var>prefix</var><code></code>     <dd>Specify <var>prefix</var> as the prefix for subsequent <code>-iwithprefix</code>options.  If the prefix represents a directory, you should include thefinal <code>/</code>.     <br><dt><code>-iwithprefix </code><var>dir</var><code></code>     <dd><dt><code>-iwithprefixbefore </code><var>dir</var><code></code>     <dd>Append <var>dir</var> to the prefix specified previously with<code>-iprefix</code>, and add the resulting directory to the include searchpath.  <code>-iwithprefixbefore</code> puts it in the same place <code>-I</code>would; <code>-iwithprefix</code> puts it where <code>-idirafter</code> would.     <br><dt><code>-isystem </code><var>dir</var><code></code>     <dd>Search <var>dir</var> for header files, after all directories specified by<code>-I</code> but before the standard system directories.  Mark itas a system directory, so that it gets the same special treatment asis applied to the standard system directories.     <br><dt><code>-fdollars-in-identifiers</code>     <dd><a name="fdollars-in-identifiers"></a>Accept <code>$</code> in identifiers.     <br><dt><code>-fpreprocessed</code>     <dd>Indicate to the preprocessor that the input file has already beenpreprocessed.  This suppresses things like macro expansion, trigraphconversion, escaped newline splicing, and processing of most directives. The preprocessor still recognizes and removes comments, so that you canpass a file preprocessed with <code>-C</code> to the compiler withoutproblems.  In this mode the integrated preprocessor is little more thana tokenizer for the front ends.     <p><code>-fpreprocessed</code> is implicit if the input file has one of theextensions <code>.i</code>, <code>.ii</code> or <code>.mi</code>.  These are theextensions that GCC uses for preprocessed files created by<code>-save-temps</code>.     <br><dt><code>-ftabstop=</code><var>width</var><code></code>     <dd>Set the distance between tab stops.  This helps the preprocessor reportcorrect column numbers in warnings or errors, even if tabs appear on theline.  If the value is less than 1 or greater than 100, the option isignored.  The default is 8.     <br><dt><code>-fexec-charset=</code><var>charset</var><code></code>     <dd>Set the execution character set, used for string and characterconstants.  The default is UTF-8.  <var>charset</var> can be any encodingsupported by the system's <code>iconv</code> library routine.     <br><dt><code>-fwide-exec-charset=</code><var>charset</var><code></code>     <dd>Set the wide execution character set, used for wide string andcharacter constants.  The default is UTF-32 or UTF-16, whichevercorresponds to the width of <code>wchar_t</code>.  As with<code>-fexec-charset</code>, <var>charset</var> can be any encoding supportedby the system's <code>iconv</code> library routine; however, you will haveproblems with encodings that do not fit exactly in <code>wchar_t</code>.     <br><dt><code>-finput-charset=</code><var>charset</var><code></code>     <dd>Set the input character set, used for translation from the characterset of the input file to the source character set used by GCC. If thelocale does not specify, or GCC cannot get this information from thelocale, the default is UTF-8. This can be overridden by either the localeor this command line option. Currently the command line option takesprecedence if there's a conflict. <var>charset</var> can be any encodingsupported by the system's <code>iconv</code> library routine.     <br><dt><code>-fworking-directory</code>     <dd>Enable generation of linemarkers in the preprocessor output that willlet the compiler know the current working directory at the time ofpreprocessing.  When this option is enabled, the preprocessor willemit, after the initial linemarker, a second linemarker with thecurrent working directory followed by two slashes.  GCC will use thisdirectory, when it's present in the preprocessed input, as thedirectory emitted as the current working directory in some debugginginformation formats.  This option is implicitly enabled if debugginginformation is enabled, but this can be inhibited with the negatedform <code>-fno-working-directory</code>.  If the <code>-P</code> flag ispresent in the command line, this option has no effect, since no<code>#line</code> directives are emitted whatsoever.     <br><dt><code>-fno-show-column</code>     <dd>Do not print column numbers in diagnostics.  This may be necessary ifdiagnostics are being scanned by a program that does not understand thecolumn numbers, such as <code>dejagnu</code>.     <br><dt><code>-A </code><var>predicate</var><code>=</code><var>answer</var><code></code>     <dd>Make an assertion with the predicate <var>predicate</var> and answer<var>answer</var>.  This form is preferred to the older form <code>-A</code><var>predicate</var><code>(</code><var>answer</var><code>)</code>, which is still supported, becauseit does not use shell special characters.     <br><dt><code>-A -</code><var>predicate</var><code>=</code><var>answer</var><code></code>     <dd>Cancel an assertion with the predicate <var>predicate</var> and answer<var>answer</var>.     <br><dt><code>-dCHARS</code>     <dd><var>CHARS</var> is a sequence of one or more of the following characters,and must not be preceded by a space.  Other characters are interpretedby the compiler proper, or reserved for future versions of GCC, and soare silently ignored.  If you specify characters whose behaviorconflicts, the result is undefined.          <dl><dt><code>M</code>          <dd>Instead of the normal output, generate a list of <code>#define</code>directives for all the macros defined during the execution of thepreprocessor, including predefined macros.  This gives you a way offinding out what is predefined in your version of the preprocessor. Assuming you have no file <code>foo.h</code>, the command          <pre class="smallexample">               touch foo.h; cpp -dM foo.h               </pre>          <p>will show all the predefined macros.          <br><dt><code>D</code>          <dd>Like <code>M</code> except in two respects: it does <em>not</em> include thepredefined macros, and it outputs <em>both</em> the <code>#define</code>directives and the result of preprocessing.  Both kinds of output go tothe standard output file.          <br><dt><code>N</code>          <dd>Like <code>D</code>, but emit only the macro names, not their expansions.          <br><dt><code>I</code>          <dd>Output <code>#include</code> directives in addition to the result ofpreprocessing. </dl>     <br><dt><code>-P</code>     <dd>Inhibit generation of linemarkers in the output from the preprocessor. This might be useful when running the preprocessor on something that isnot C code, and will be sent to a program which might be confused by thelinemarkers.     <br><dt><code>-C</code>     <dd>Do not discard comments.  All comments are passed through to the outputfile, except for comments in processed directives, which are deletedalong with the directive.     <p>You should be prepared for side effects when using <code>-C</code>; itcauses the preprocessor to treat comments as tokens in their own right. For example, comments appearing at the start of what would be adirective line have the effect of turning that line into an ordinarysource line, since the first token on the line is no longer a <code>#</code>.     <br><dt><code>-CC</code>     <dd>Do not discard comments, including during macro expansion.  This islike <code>-C</code>, except that comments contained within macros arealso passed through to the output file where the macro is expanded.     <p>In addition to the side-effects of the <code>-C</code> option, the<code>-CC</code> option causes all C++-style comments inside a macroto be converted to C-style comments.  This is to prevent later useof that macro from inadvertently commenting out the remainder ofthe source line.     <p>The <code>-CC</code> option is generally used to support lint comments.     <br><dt><code>-traditional-cpp</code>     <dd>Try to imitate the behavior of old-fashioned C preprocessors, asopposed to ISO C preprocessors.     <br><dt><code>-trigraphs</code>     <dd>Process trigraph sequences. These are three-character sequences, all starting with <code>??</code>, thatare defined by ISO C to stand for single characters.  For example,<code>??/</code> stands for <code>\</code>, so <code>'??/n'</code> is a characterconstant for a newline.  By default, GCC ignores trigraphs, but instandard-conforming modes it converts them.  See the <code>-std</code> and<code>-ansi</code> options.     <p>The nine trigraphs and their replacements are     <pre class="smallexample">          Trigraph:       ??(  ??)  ??&lt;  ??&gt;  ??=  ??/  ??'  ??!  ??-          Replacement:      [    ]    {    }    #    \    ^    |    ~          </pre>     <br><dt><code>-remap</code>     <dd>Enable special code to work around file systems which only permit veryshort file names, such as MS-DOS.     <dt><code>--help</code>     <dd><dt><code>--target-help</code>     <dd>Print text describing all the command line options instead ofpreprocessing anything.     <br><dt><code>-v</code>     <dd>Verbose mode.  Print out GNU CPP's version number at the beginning ofexecution, and report the final form of the include path.     <br><dt><code>-H</code>     <dd>Print the name of each header file used, in addition to other normalactivities.  Each name is indented to show how deep in the<code>#include</code> stack it is.  Precompiled header files are alsoprinted, even if they are found to be invalid; an invalid precompiledheader file is printed with <code>...x</code> and a valid one with <code>...!</code> .     <br><dt><code>-version</code>     <dd><dt><code>--version</code>     <dd>Print out GNU CPP's version number.  With one dash, proceed topreprocess as normal.  With two dashes, exit immediately. </dl>   </body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -