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

6.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 See section 6.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 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 () will be treated as an unspecified number of arguments, rather than no arguments, as C++ demands.



This document was generated by Charlie & on June, 17 2001 using texi2html