Search code examples
linuxgccicc

What do I need to look out for when I switch compilers from GCC 3.4.2 to a GCC 4.4.2 or to ICC?


The project I'm working with is compiled with GCC 3.4.2. I'm considering switching to a newer compiler. However, the project is at a stage where we're not making any big changes if the risks aren't well known.

What sort of problems can I expect when switching compilers?

What benefits does GCC 4.x give over GCC 3.4.2?

What benefits does ICC give over it?


Solution

  • The benefit is mostly performance and code size. Later and different compilers often have better or clearer errors and warnings.

    Fortunately, while you can expect trouble getting the project to compile, so there will be a bit of work to get it to run, once it does it is extremely likely to behave identically, other than performance. If your code does a lot of floating point, you need to read and understand all the floating point options, because that's the most likely point where behaviour may change.