summaryrefslogtreecommitdiff
path: root/devdocs/gcc~13/deprecated-features.html
blob: 4a40e920cbd5dadd66b451c8749c846df3692d5b (plain)
1
2
3
4
5
6
<div class="section-level-extent" id="Deprecated-Features"> <div class="nav-panel"> <p> Next: <a href="backwards-compatibility" accesskey="n" rel="next">Backwards Compatibility</a>, Previous: <a href="c_002b_002b-concepts" accesskey="p" rel="prev">C++ Concepts</a>, Up: <a href="c_002b_002b-extensions" accesskey="u" rel="up">Extensions to the C++ Language</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="Deprecated-Features-1"><span>7.11 Deprecated Features<a class="copiable-link" href="#Deprecated-Features-1"> ¶</a></span></h1> <p>In the past, the GNU C++ compiler was extended to experiment with new features, at a time when the C++ language was still evolving. Now that the C++ standard is complete, some of those features are superseded by superior alternatives. Using the old features might cause a warning in some cases that the feature will be dropped in the future. In other cases, the feature might be gone already. </p> <p>G++ allows a virtual function returning ‘<samp class="samp">void *</samp>’ to be overridden by one returning a different pointer type. This extension to the covariant return type rules is now deprecated and will be removed from a future version. </p> <p>The use of default arguments in function pointers, function typedefs and other places where they are not permitted by the standard is deprecated and will be removed from a future version of G++. </p> <p>G++ allows floating-point literals to appear in integral constant expressions, e.g. ‘<samp class="samp"> enum E { e = int(2.2 * 3.7) } </samp>’ This extension is deprecated and will be removed from a future version. </p> <p>G++ allows static data members of const floating-point type to be declared with an initializer in a class definition. The standard only allows initializers for static members of const integral types and const enumeration types so this extension has been deprecated and will be removed from a future version. </p> <p>G++ allows attributes to follow a parenthesized direct initializer, e.g. ‘<samp class="samp"> int f (0) __attribute__ ((something)); </samp>’ This extension has been ignored since G++ 3.3 and is deprecated. </p> <p>G++ allows anonymous structs and unions to have members that are not public non-static data members (i.e. fields). These extensions are deprecated. </p> </div>  <div class="nav-panel"> <p> Next: <a href="backwards-compatibility">Backwards Compatibility</a>, Previous: <a href="c_002b_002b-concepts">C++ Concepts</a>, Up: <a href="c_002b_002b-extensions">Extensions to the C++ Language</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/Deprecated-Features.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Deprecated-Features.html</a>
  </p>
</div>