Bug#121425: ITP: gxxcompat - compatibility library for porting C++ code between g++ versions
The new g++ 3.0 and libstdc++3 adhere more strictly to the C++ standard
than have previous versions of g++, and many of the extensions in g++
are now gone. Consequently, there is a lot of C++ code that doesn't
compile with g++ 3. Furthermore, some versions of g++ had bugs, missing
library features, and the like, and some incompatible extensions have
crept into g++ 3.
This is already causing a problem with the hppa port, which is lagging
on its build percentage because of its lack of a g++ 2.x (among other
reasons). Furthermore, it could very easily cause a greater problem for
whichever Debian release chooses to abandon gcc versions less than 3.
Gxxcompat aims to help mitigate this problem. It consists of a set of
autoconf macros and a library. The autoconf macros detect the state of
various incompatibilities and extensions in g++ versions; the library
provides implementations of some of those extensions for versions that
don't have them.
Use of the library in source code should go something like this:
// Get your autoconf macros defined.
// Define what extensions this source file needs.
// Pull the extensions in.
It's almost definitely incomplete, but the cases that are implemented
all work. It's not going to get any more complete by me holding on to
it, so I intend to upload it and let people start using it. A few small
bugs, some more documentation, and Debian packaging are all that remain
to finish before the first version can be uploaded.
If I get time, I'd like to write an autoconf-style analysis tool that
will do most of the heavy lifting for lazy maintainers and overworked
I wrote the library, so I am both the upstream and Debian maintainer.
The license is BSD-style (the changes amount to replacing the
UCB-specific bits with references to me). It's not available yet; its
official "upstream" release will be its installation into unstable.