views:

31

answers:

1

I develop C++ applications on CentOS 5.4 and we came across several inconvenient situations with gcc 4.1.2 like inability to debug local variables in class constructor which is a confirmed gcc bug (same problem with scoped variables). I'm considering to upgrade to higher gcc version. What version should I choose for production environment? Can I simply grab the latest release from gcc.org, build it and start using it? Should I only use the rpms from CentOS repositories?

Thanks.

+1  A: 

It is always recommended to use your distribution's repositories if they provide what you want. To see if a specific GCC version fixes your problems, you can always check out the "regressions" on the home page (right side). I would trust the release criteria for GCC and use the latest stable release (4.5 at the time of writing). If you have trouble with it, switch to a version lower (4.4), and if that doesn't work, use 4.3. If you don't like trial and error, see the regression lists, or find the bug you've been having trouble with and see when it was fixed.

PS: I know 4.4.4 is the latest release, but 4.5 is the newest major release.

rubenvb