manpagez: man pages & more
info gcc
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.13 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. See section Deprecated Features.

For scope

If a variable is declared at for scope, it used to remain in scope until the end of the scope that 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 extern "C" {…} scope to set the language. On such systems, all header files are implicitly scoped inside a C language scope. Also, an empty prototype () is treated as an unspecified number of arguments, rather than no arguments, as C++ demands.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on October 19, 2013 using texi2html 5.0.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.