diff options
| author | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
| commit | 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch) | |
| tree | 158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/gcc~13/c_002b_002b-module-preprocessing.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/gcc~13/c_002b_002b-module-preprocessing.html')
| -rw-r--r-- | devdocs/gcc~13/c_002b_002b-module-preprocessing.html | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/devdocs/gcc~13/c_002b_002b-module-preprocessing.html b/devdocs/gcc~13/c_002b_002b-module-preprocessing.html deleted file mode 100644 index aa56fe74..00000000 --- a/devdocs/gcc~13/c_002b_002b-module-preprocessing.html +++ /dev/null @@ -1,8 +0,0 @@ -<div class="subsection-level-extent" id="C_002b_002b-Module-Preprocessing"> <div class="nav-panel"> <p> Next: <a href="c_002b_002b-compiled-module-interface" accesskey="n" rel="next">Compiled Module Interface</a>, Previous: <a href="c_002b_002b-module-mapper" accesskey="p" rel="prev">Module Mapper</a>, Up: <a href="c_002b_002b-modules" accesskey="u" rel="up">C++ Modules</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="subsection" id="Module-Preprocessing"><span>3.23.2 Module Preprocessing<a class="copiable-link" href="#Module-Preprocessing"> ΒΆ</a></span></h1> <p>Modules affect preprocessing because of header units and include translation. Some uses of the preprocessor as a separate step either do not produce a correct output, or require CMIs to be available. </p> <p>Header units import macros. These macros can affect later conditional inclusion, which therefore can cascade to differing import sets. When preprocessing, it is necessary to load the CMI. If a header unit is unavailable, the preprocessor issues a warning and continue (when not just preprocessing, an error is emitted). Detecting such imports requires preprocessor tokenization of the input stream to phase 4 (macro expansion). </p> <p>Include translation converts <code class="code">#include</code>, <code class="code">#include_next</code> and <code class="code">#import</code> directives to internal <code class="code">import</code> declarations. Whether a particular directive is translated is controlled by the module mapper. Header unit names are canonicalized during preprocessing. </p> <p>Dependency information can be emitted for macro import, extending the functionality of <samp class="option">-MD</samp> and <samp class="option">-MMD</samp> options. Detection of import declarations also requires phase 4 preprocessing, and thus requires full preprocessing (or compilation). </p> <p>The <samp class="option">-M</samp>, <samp class="option">-MM</samp> and <samp class="option">-E -fdirectives-only</samp> options halt preprocessing before phase 4. </p> <p>The <samp class="option">-save-temps</samp> option uses <samp class="option">-fdirectives-only</samp> for preprocessing, and preserve the macro definitions in the preprocessed output. Usually you also want to use this option when explicitly preprocessing a header-unit, or consuming such preprocessed output: </p> <div class="example smallexample"> <pre class="example-preformatted" data-language="cpp">g++ -fmodules-ts -E -fdirectives-only my-header.hh -o my-header.ii -g++ -x c++-header -fmodules-ts -fpreprocessed -fdirectives-only my-header.ii</pre> -</div> </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/C_002b_002b-Module-Preprocessing.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/C_002b_002b-Module-Preprocessing.html</a> - </p> -</div> |
