The project I'm working with is compiled with GCC 3.4.2. I'm con开发者_JAVA技巧sidering 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?
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.
精彩评论