1<html lang="en"> 2<head> 3<title>Deprecated Features - Using the GNU Compiler Collection (GCC)</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Using the GNU Compiler Collection (GCC)"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions" title="C++ Extensions"> 9<link rel="prev" href="Java-Exceptions.html#Java-Exceptions" title="Java Exceptions"> 10<link rel="next" href="Backwards-Compatibility.html#Backwards-Compatibility" title="Backwards Compatibility"> 11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 12<!-- 13Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 141998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 152010 Free Software Foundation, Inc. 16 17Permission is granted to copy, distribute and/or modify this document 18under the terms of the GNU Free Documentation License, Version 1.3 or 19any later version published by the Free Software Foundation; with the 20Invariant Sections being ``Funding Free Software'', the Front-Cover 21Texts being (a) (see below), and with the Back-Cover Texts being (b) 22(see below). A copy of the license is included in the section entitled 23``GNU Free Documentation License''. 24 25(a) The FSF's Front-Cover Text is: 26 27 A GNU Manual 28 29(b) The FSF's Back-Cover Text is: 30 31 You have freedom to copy and modify this GNU Manual, like GNU 32 software. Copies published by the Free Software Foundation raise 33 funds for GNU development.--> 34<meta http-equiv="Content-Style-Type" content="text/css"> 35<style type="text/css"><!-- 36 pre.display { font-family:inherit } 37 pre.format { font-family:inherit } 38 pre.smalldisplay { font-family:inherit; font-size:smaller } 39 pre.smallformat { font-family:inherit; font-size:smaller } 40 pre.smallexample { font-size:smaller } 41 pre.smalllisp { font-size:smaller } 42 span.sc { font-variant:small-caps } 43 span.roman { font-family:serif; font-weight:normal; } 44 span.sansserif { font-family:sans-serif; font-weight:normal; } 45--></style> 46<link rel="stylesheet" type="text/css" href="../cs.css"> 47</head> 48<body> 49<div class="node"> 50<a name="Deprecated-Features"></a> 51<p> 52Next: <a rel="next" accesskey="n" href="Backwards-Compatibility.html#Backwards-Compatibility">Backwards Compatibility</a>, 53Previous: <a rel="previous" accesskey="p" href="Java-Exceptions.html#Java-Exceptions">Java Exceptions</a>, 54Up: <a rel="up" accesskey="u" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions">C++ Extensions</a> 55<hr> 56</div> 57 58<h3 class="section">7.11 Deprecated Features</h3> 59 60<p>In the past, the GNU C++ compiler was extended to experiment with new 61features, at a time when the C++ language was still evolving. Now that 62the C++ standard is complete, some of those features are superseded by 63superior alternatives. Using the old features might cause a warning in 64some cases that the feature will be dropped in the future. In other 65cases, the feature might be gone already. 66 67 <p>While the list below is not exhaustive, it documents some of the options 68that are now deprecated: 69 70 <dl> 71<dt><code>-fexternal-templates</code><dt><code>-falt-external-templates</code><dd>These are two of the many ways for G++ to implement template 72instantiation. See <a href="Template-Instantiation.html#Template-Instantiation">Template Instantiation</a>. The C++ standard clearly 73defines how template definitions have to be organized across 74implementation units. G++ has an implicit instantiation mechanism that 75should work just fine for standard-conforming code. 76 77 <br><dt><code>-fstrict-prototype</code><dt><code>-fno-strict-prototype</code><dd>Previously it was possible to use an empty prototype parameter list to 78indicate an unspecified number of parameters (like C), rather than no 79parameters, as C++ demands. This feature has been removed, except where 80it is required for backwards compatibility. See <a href="Backwards-Compatibility.html#Backwards-Compatibility">Backwards Compatibility</a>. 81</dl> 82 83 <p>G++ allows a virtual function returning ‘<samp><span class="samp">void *</span></samp>’ to be overridden 84by one returning a different pointer type. This extension to the 85covariant return type rules is now deprecated and will be removed from a 86future version. 87 88 <p>The G++ minimum and maximum operators (‘<samp><span class="samp"><?</span></samp>’ and ‘<samp><span class="samp">>?</span></samp>’) and 89their compound forms (‘<samp><span class="samp"><?=</span></samp>’) and ‘<samp><span class="samp">>?=</span></samp>’) have been deprecated 90and are now removed from G++. Code using these operators should be 91modified to use <code>std::min</code> and <code>std::max</code> instead. 92 93 <p>The named return value extension has been deprecated, and is now 94removed from G++. 95 96 <p>The use of initializer lists with new expressions has been deprecated, 97and is now removed from G++. 98 99 <p>Floating and complex non-type template parameters have been deprecated, 100and are now removed from G++. 101 102 <p>The implicit typename extension has been deprecated and is now 103removed from G++. 104 105 <p>The use of default arguments in function pointers, function typedefs 106and other places where they are not permitted by the standard is 107deprecated and will be removed from a future version of G++. 108 109 <p>G++ allows floating-point literals to appear in integral constant expressions, 110e.g. ‘<samp><span class="samp"> enum E { e = int(2.2 * 3.7) } </span></samp>’ 111This extension is deprecated and will be removed from a future version. 112 113 <p>G++ allows static data members of const floating-point type to be declared 114with an initializer in a class definition. The standard only allows 115initializers for static members of const integral types and const 116enumeration types so this extension has been deprecated and will be removed 117from a future version. 118 119 </body></html> 120 121