On 01 April 2007 12:59, Paul Brook wrote:

> On Sunday 01 April 2007 12:01, Dave Korn wrote:
>> On 01 April 2007 07:08, ganesh subramonian wrote:
>>> Hi
>>>  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). There seems to be a lot of changes since
>>>  gcc-2.95 as a result of which we get a large number of errors when
>>>  trying to compile the code with gcc-3.x.
>> 
>>   Yes, this is known.  The C++ language standard was still changing in the
>> 2.95->3.x timescale, and GCC moved a lot closer to strict conformance.  See
>> 
>> http://gcc.gnu.org/gcc-3.4/changes.html#cplusplus
>> 
>>   You may find that using a 3.3 series compiler requires a good deal less
>> rewriting than a 3.4 series compiler; which version did you try?
> 
> If you're already switching compilers, moving to an already obsolete release
> (3.3) seems a strange choice. At this point I'd recommend skipping 3.x
> altogether and going straight to gcc4.1/4.2.
> 
> Many of the improvements in c++ code generation were as a result of
> tree-ssa, you only get with 4.x.

  It is however a bigger step change, and a correspondingly bigger risk.
There are arguments in favour of not running with the bleeding edge when what
you want is simply a stable production compiler that will build your own
particular codebase.  It might be worth doing a three-way comparison of
generated code size and performance to give some idea of what extra benefits
were attached to those extra risks.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

Reply via email to