Ganesh wrote:
I work in a company where we have been using gcc-2.95.4 (based cross
compiler) for compiling our code. Most of the code is written in c++
and makes extensive use of the stl libraries. We would not be changing
our operating system or processor architecture (so portability is not
a very good reason to give).  [Compiling with gcc-3.x is quite painful.
Why should we migrate to a newer gcc?  How would you convince someone to?]

We went through exactly this.   In our case, what convinced
everyone was "it runs our app faster" and "we can get bugs fixed".
You have to back up that first claim with benchmarks, though!
We couldn't prove newer gcc's were faster until gcc-4.1 and
until we replaced most uses of std::string with a faster variant
(sadly, gcc-4.1's STL is slower than gcc-2.95.3's in some ways;
maybe gcc-4.3 will fix that?).

The transition is long and hard.  You will probably need to port
key portions of your codebase yourself to get your benchmarks to run.

Having an automated nightly build, and automatically sending
out emails to people who check in things that don't compile with
the newer gcc is important, otherwise it'll be hard to get your
codebase to a clean enough state for an orderly switchover.

http://kegel.com/gcc/gcc4.html has some tips for people dealing
with the many syntax errors.

I wouldn't recommend moving to gcc-3.x, really.  It turns out
not to save too much effort in the end...
- Dan

Fun footnote: at the gcc summit in 2004, I mentioned I was going
to migrate a large codebase to gcc-3.x, and people
said it was refreshing to see such optimism and bravery :-)
It turned out to be a lot more work than I bargained for!

--
Wine for Windows ISVs: http://kegel.com/wine/isv

Reply via email to