summaryrefslogtreecommitdiff
path: root/devdocs/gcc~13/c_002b_002b-extensions.html
blob: 57d50502792a9ea022be0258dc2a2e9aaf67efb0 (plain)
1
2
3
4
5
6
<div class="chapter-level-extent" id="C_002b_002b-Extensions"> <div class="nav-panel"> <p> Next: <a href="objective-c" accesskey="n" rel="next">GNU Objective-C Features</a>, Previous: <a href="c-extensions" accesskey="p" rel="prev">Extensions to the C Language Family</a>, Up: <a href="index" accesskey="u" rel="up">Introduction</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="chapter" id="Extensions-to-the-C_002b_002b-Language"><span>7 Extensions to the C++ Language<a class="copiable-link" href="#Extensions-to-the-C_002b_002b-Language"> ¶</a></span></h1>   <p>The GNU compiler provides these extensions to the C++ language (and you can also use most of the C language extensions in your C++ programs). If you want to write code that checks whether these features are available, you can test for the GNU compiler the same way as for C programs: check for a predefined macro <code class="code">__GNUC__</code>. You can also use <code class="code">__GNUG__</code> to test specifically for GNU C++ (see <a data-manual="cpp" href="https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html#Common-Predefined-Macros">Predefined Macros</a> in The GNU C Preprocessor). </p> <ul class="mini-toc"> <li><a href="c_002b_002b-volatiles" accesskey="1">When is a Volatile C++ Object Accessed?</a></li> <li><a href="restricted-pointers" accesskey="2">Restricting Pointer Aliasing</a></li> <li><a href="vague-linkage" accesskey="3">Vague Linkage</a></li> <li><a href="c_002b_002b-interface" accesskey="4">C++ Interface and Implementation Pragmas</a></li> <li><a href="template-instantiation" accesskey="5">Where’s the Template?</a></li> <li><a href="bound-member-functions" accesskey="6">Extracting the Function Pointer from a Bound Pointer to Member Function</a></li> <li><a href="c_002b_002b-attributes" accesskey="7">C++-Specific Variable, Function, and Type Attributes</a></li> <li><a href="function-multiversioning" accesskey="8">Function Multiversioning</a></li> <li><a href="type-traits" accesskey="9">Type Traits</a></li> <li><a href="c_002b_002b-concepts">C++ Concepts</a></li> <li><a href="deprecated-features">Deprecated Features</a></li> <li><a href="backwards-compatibility">Backwards Compatibility</a></li> </ul> </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/C_002b_002b-Extensions.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/C_002b_002b-Extensions.html</a>
  </p>
</div>