Go to the first, previous, next, last section, table of contents.
After a two-year wait, gcc 2.8.0 was released in January 1998, along with libstdc++-2.8.0 and libg++-2.8.0. This has been followed up in March by the 2.8.1 release of all three packages, though libg++-2.8.1 is an "add-on" (it does not contain libstdc++ anymore). Note that libstdc++ is required.
For those familiar with egcs, the most obvious difference between
gcc-2.8.x and egcs is the packaging: egcs is bundled with
libstdc++, and gcc-2.8.x does not contain the class library. Otherwise,
except for the lack of the -frepo
option and some bug fixes
that have not yet made it into gcc-2.8.x, C++ users will find the
two compilers to be almost the same at this stage, other than that 2.8.x
users may get more bogus warnings with -Wall and optimization because
some fixes to flow analysis in the presence of exceptions that egcs made
are not yet present in gcc 2.8.x (as of 2.8.1).
The flow analysis problem in 2.8.1 produces bad code in some cases, not just spurious errors. It only affects code that actually throws an exception, and only the path corresponding to a thrown exception gets misoptimized. If this happens, you can try reducing the level of optimization.
Because the new feature lists for egcs and gcc 2.8 are almost the same, please see See section What new C++ features are in egcs? for a list of new features. It is a fairly long list.
egcs is the experimental GNU compiler system (see `http://www.cygnus.com/egcs' on the Web). It is an effort to accelerate development of new gcc features by providing a more open development model than gcc has traditionally used.
The first egcs release, egcs-1.0, came out on December 3, 1997. The current release is egcs-1.0.3, released May 15, 1998.
Questions not addressed here may be answered in the egcs FAQ (`http://www.cygnus.com/egcs/faq.html').
Note: unless indicated otherwise, these features are also present in g++ 2.8.x.
-frepo
flag is supported in egcs (it is not in 2.8.x).
However, because of the previous item, I don't recommend its use on ELF
systems, as the default method is better.
Features that are still missing include namespaces and templates as template arguments, though there is support for the latter feature in the egcs snapshots (which has not yet made it into a release).
To avoid future compatibility problems, we strongly urge anyone who is planning on distributing shared libraries that contain C++ code to upgrade to at least egcs-1.0.1 first (and preferably to 1.0.3). See `http://www.cygnus.com/egcs/egcs-1.0.1.html' for details about the compatibility issues as well as additional information about the bugfixes since the egcs-1.0 release.
No. If you build from sources, by default, egcs installs executables in
/usr/local/bin
and libraries in /usr/local/lib
, and you
can change this default if desired (see next section).
If, however, you install a package (e.g. Debian or Red Hat) that wants
to put egcs in /usr/bin
and /usr/lib
, then yes, you are
replacing your system compiler and C++ library (I don't know if anyone
has provided such packages yet -- proceed with caution).
The recommended approach is to provide a different argument to the
--prefix
flag when you configure egcs. For example, say
--prefix=/usr/local/egcs
and then, after installation, you
can make symbolic links from `/usr/local/egcs/bin' to whereever
you want, for example
ln -s /usr/local/egcs/bin/gcc /usr/local/bin/egcc ln -s /usr/local/egcs/bin/g++ /usr/local/bin/eg++
2.8.0 has now been released (followed up by 2.8.1), with essentially the same C++ front end as egcs.
Bug fixes generated in egcs will be passed to the 2.8.x releases for inclusion; the reverse is also taking place, though a bug fix may appear in one before it does in the other. egcs development is currently proceeding much more quickly than gcc 2.8.x development. However, there is essentially only one C++ front end, which is shared by the two distinct compiler back ends (however, since egcs-1.0.3 is newer than gcc 2.8.1, it has more bug fixes).
While the 'e' stands for 'experimental', egcs has been tested thoroughly and should be of high quality. The author considers egcs 1.0.3 the most robust GNU C++ compiler ever produced.
Go to the first, previous, next, last section, table of contents.