Backwards Compatibility - Red Hat ENTERPRISE LINUX 3 - USING GCC Using Instructions

Using the gnu compiler collection (gcc)
Hide thumbs Also See for ENTERPRISE LINUX 3 - USING GCC:
Table of Contents

Advertisement

Chapter 7. Extensions to the C++ Language
-fexternal-templates
-falt-external-templates
These are two of the many ways for g++ to implement template instantiation. Refer to Section
7.6 Where's the Template?. The C++ standard clearly defines how template definitions have to be
organized across implementation units. g++ has an implicit instantiation mechanism that should
work just fine for standard-conforming code.
-fstrict-prototype
-fno-strict-prototype
Previously it was possible to use an empty prototype parameter list to indicate an unspecified
number of parameters (like C), rather than no parameters, as C++ demands. This feature has
been removed, except where it is required for backwards compatibility Section 7.11 Backwards
Compatibility.
The named return value extension has been deprecated, and is now removed from g++.
The use of initializer lists with new expressions has been deprecated, and is now removed from g++.
Floating and complex non-type template parameters have been deprecated, and are now removed from
g++.
The implicit typename extension has been deprecated and will be removed from g++ at some point.
In some cases g++ determines that a dependent type such as
keyword, contrary to the standard.
typename

7.11. Backwards Compatibility

Now that there is a definitive ISO standard C++, G++ has a specification to adhere to. The C++
language evolved over time, and features that used to be acceptable in previous drafts of the standard,
such as the ARM [Annotated C++ Reference Manual], are no longer accepted. In order to allow
compilation of C++ written to such drafts, G++ contains some backwards compatibilities. All such
backwards compatibility features are liable to disappear in future versions of G++. They should be
considered deprecated Section 7.10 Deprecated Features.
For scope
If a variable is declared at for scope, it used to remain in scope until the end of the scope which
contained the for statement (rather than just within the for scope). G++ retains this, but issues a
warning, if such a variable is accessed outside the for scope.
Implicit C language
Old C system header files did not contain an
such systems, all header files are implicitly scoped inside a C language scope. Also, an empty
prototype
will be treated as an unspecified number of arguments, rather than no arguments,
()
as C++ demands.
TPL T ::X
extern "C" {...}
is a type without needing a
scope to set the language. On
219

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 3 - USING GCC and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Enterprise linux 3

Table of Contents