GNU C++ Renovation Project - Major changes

Node: Major changes Next: New features Prev: Summary of Phase 1.3 Up: Changes

Major Changes

This release includes four wholesale rewrites of certain areas of compiler functionality:

  1. Argument matching. gnu C++ is more compliant with the rules

    described in Chapter 13, ``Overloading'', of the arm. This behavior is the default, though you can specify it explicitly with `-fansi-overloading'. For compatibility with earlier releases of gnu C++, specify `-fno-ansi-overloading'; this makes the compiler behave as it used to with respect to argument matching and name overloading.

  2. Default constructors/destructors. Section 12.8 of the arm, ``Copying

    Class Objects'', and Section 12.1, ``Constructors'', state that a compiler must declare such default functions if the user does not specify them. gnu C++ now declares, and generates when necessary, the defaults for constructors and destructors you might omit. In particular, assignment operators (`operator =') behave the same way whether you define them, or whether the compiler generates them by default; taking the address of the default `operator =' is now guaranteed to work. Default copy constructors (`X::X(X&)') now function correctly, rather than calling the copy assignment operator for the base class. Finally, constructors (`X::X()'), as well as assignment operators and copy constructors, are now available whenever they are required.

  3. Binary incompatibility. There are no new binary incompatibilities

    in Phase 1.3, but Phase 1.2 introduced two binary incompatibilities with earlier releases. First, the functionality of `operator new' and `operator delete' changed. Name encoding (``mangling'') of virtual table names changed as well. Libraries built with versions of the compiler earlier than Phase 1.2 must be compiled with the new compiler. (This includes the Cygnus Q2 progressive release and the FSF 2.4.5 release.)

  4. New g++ driver.

    A new binary g++ compiler driver replaces the shell script. The new driver executes faster.


Next: New features Up: Changes