[rescue] gcc

Meelis Roos mroos at linux.ee
Wed Jul 30 04:02:35 CDT 2003


> gcc-2.7.2 is pretty awful on anything but i386, and very bad for C++. Most
> distributions of gcc seem to be this version. Seems OK for C code on i386.

Agreed, but it is a fast compiler compared to 2.95 and a lightning fast
compiler comared to gcc 3.2/3.3.

> gcc-2.95 is a Red Hat hacked version that doesn't even generate working code
> on i386. It should be shot on sight.

Correction: 2.95.* is the official GNU release and is usable on several
architectures (most of Debian was compiled using it not too long time
ago). Some architectures like MIPS I never got to work correctly with
C++ - 2.95 is mostly a usable C compiler for several architectures.

2.96 was the unofficial Redhat hacked version. At first I thought that
Red Hat has fixed it after 100 subreleases but as I tried it myself with
a large C++ project and it just plain didn't work (compiled but
crashed). 2.95 and 3.0 were fine. This was even on x86.

> gcc-3.x actually seems to understand most of C++, and does nice stuff from
> C99. Code generation on m68k improves with increasing x. I've not tried the
> latest version yet, but I probably should.

Yes, gcc 3.x addedd standards-compilant C++ ABI (it took several years
to develop it). It has also much better optimisations, not only on x86
but other architectures too. I consider 3.2.3 the best so far, 3.3 has
not stabilized yet. There ar occassional glitches still but it has
gotten mostly usable (3.3 is the default compiler for most archs in
Debian, with 3.2 on some archs where 3.3 is not ready yet).

One thing to note is that 3.x is quite picky about C++ standard
compliance. Lots of code that compiled and ran fine with 2.95.* or
non-gcc compilers gives lots of errors and warnings with gcc 3 and
usually gcc is right and the source code is wrong.

-- 
Meelis Roos (mroos at linux.ee)



More information about the rescue mailing list