Go to the first, previous, next, last section, table of contents.

Changes in Behavior in GNU C++

The GNU C++ compiler continues to improve and change. A major goal of our work has been to continue to bring the compiler into compliance with the draft ANSI C++ standard, and with The Annotated C++ Reference Manual (the ARM). This section outlines most of the user-noticeable changes that might be encountered during the normal course of use.

Summary of Changes in Phase 1.3

The bulk of this note discusses the cumulative effects of the GNU C++ Renovation Project to date. The work during its most recent phase (1.3) had these major effects:

Much of the work in Phase 1.3 went to elimination of known bugs, as well as the major items above.

During the span of Phase 1.3, there were also two changes associated with the compiler that, while not specifically part of the C++ Renovation project, may be of interest:

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.

New features

Enhancements and bug fixes

Problems with debugging

Two problems remain with regard to debugging:


Go to the first, previous, next, last section, table of contents.