Originally Posted by Sergei Steshenko
Any particular reason you prefer it? Or it is just what you happen to use?
Originally Posted by fuzzyBuzz
I am starting a new Linux project in C++
32 bit x86 or x86_64? I think that might affect the choice of compiler version.
What kind of project also might affect the choice.
Do you really want to select a different version than the default for your Linux distribution? GCC makes it pretty easy to install and use a different version than the distribution default and/or have multiple versions installed and usable on one Linux system. But that isn't totally trivial, so I wouldn't do so without a reason.
Currently I use GCC heavily only for x86_64 Linux. I also use a closed source compiler from Intel heavily on all four combinations of Windows/Linux and 32/64 bit. On 32 bit GCC is much worse than the Intel compiler. On 64 bit that comparison is more complicated and no really clear winner. I expect you need an open source compiler, so even in 32 bit you're stuck with GCC.
I mainly use GCC 4.3.2 and I'm pretty happy with it. I also use GCC 4.1.2 and did a fair about of playing with GCC 4.4.0.
I do a moderate amount of profiling with Oprofile and a moderate amount of debugging. My source code has deep templating and deep inlining. The underlying tools that read the debugging info (for either profiling or debugging) get very confused. They get a LOT more confused by the GCC 4.3.2 generated debug info than the GCC 4.1.2 generated debug info, even in places where the generated asm code is the same. But I don't know if that is really a 4.3.2 vs. 4.1.2 difference or something uniquely weird about my source code or something wrong in the way I built binutils.
I also use OpenMP, which is supported by 4.3.2 and not by 4.1.2.
I'm trying to learn various optimizer hints because performance is very important in my code. I noticed some optimizer hints work in 4.4.0 that don't work in 4.3.2. I also noticed some optimizer hints supposedly present in 4.4.0 that I really want to use, but they don't actually work. I haven't had the time to follow up as much as I should on that kind of investigation. Clearly there is continuing improvement in the support of optimizer hints. That matters a lot to me and may justify moving closer to the cutting edge (or bleeding edge) version. But I don't know enough to make that decision well myself much less advise you.