summaryrefslogtreecommitdiff
path: root/devdocs/gcc~13/invoking-g_002b_002b.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
committerCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
commit82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch)
tree158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/gcc~13/invoking-g_002b_002b.html
parent9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff)
downloaddotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz
dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/gcc~13/invoking-g_002b_002b.html')
-rw-r--r--devdocs/gcc~13/invoking-g_002b_002b.html6
1 files changed, 0 insertions, 6 deletions
diff --git a/devdocs/gcc~13/invoking-g_002b_002b.html b/devdocs/gcc~13/invoking-g_002b_002b.html
deleted file mode 100644
index ca964f944..000000000
--- a/devdocs/gcc~13/invoking-g_002b_002b.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<div class="section-level-extent" id="Invoking-G_002b_002b"> <div class="nav-panel"> <p> Next: <a href="c-dialect-options" accesskey="n" rel="next">Options Controlling C Dialect</a>, Previous: <a href="overall-options" accesskey="p" rel="prev">Options Controlling the Kind of Output</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="Compiling-C_002b_002b-Programs"><span>3.3 Compiling C++ Programs<a class="copiable-link" href="#Compiling-C_002b_002b-Programs"> ¶</a></span></h1> <p>C++ source files conventionally use one of the suffixes ‘<samp class="samp">.C</samp>’, ‘<samp class="samp">.cc</samp>’, ‘<samp class="samp">.cpp</samp>’, ‘<samp class="samp">.CPP</samp>’, ‘<samp class="samp">.c++</samp>’, ‘<samp class="samp">.cp</samp>’, or ‘<samp class="samp">.cxx</samp>’; C++ header files often use ‘<samp class="samp">.hh</samp>’, ‘<samp class="samp">.hpp</samp>’, ‘<samp class="samp">.H</samp>’, or (for shared template code) ‘<samp class="samp">.tcc</samp>’; and preprocessed C++ files use the suffix ‘<samp class="samp">.ii</samp>’. GCC recognizes files with these names and compiles them as C++ programs even if you call the compiler the same way as for compiling C programs (usually with the name <code class="command">gcc</code>). </p> <p>However, the use of <code class="command">gcc</code> does not add the C++ library. <code class="command">g++</code> is a program that calls GCC and automatically specifies linking against the C++ library. It treats ‘<samp class="samp">.c</samp>’, ‘<samp class="samp">.h</samp>’ and ‘<samp class="samp">.i</samp>’ files as C++ source files instead of C source files unless <samp class="option">-x</samp> is used. This program is also useful when precompiling a C header file with a ‘<samp class="samp">.h</samp>’ extension for use in C++ compilations. On many systems, <code class="command">g++</code> is also installed with the name <code class="command">c++</code>. </p> <p>When you compile C++ programs, you may specify many of the same command-line options that you use for compiling programs in any language; or command-line options meaningful for C and related languages; or options that are meaningful only for C++ programs. See <a class="xref" href="c-dialect-options">Options Controlling C Dialect</a>, for explanations of options for languages related to C. See <a class="xref" href="c_002b_002b-dialect-options">Options Controlling C++ Dialect</a>, for explanations of options that are meaningful only for C++ programs. </p> </div> <div class="nav-panel"> <p> Next: <a href="c-dialect-options">Options Controlling C Dialect</a>, Previous: <a href="overall-options">Options Controlling the Kind of Output</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">
- &copy; 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/Invoking-G_002b_002b.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Invoking-G_002b_002b.html</a>
- </p>
-</div>