I don't have CentOS installed at the moment, so I can't verify it, but isn't GCC available in the repo's? If you don't want the version available in the repo for some reason, you just need to install a compiler.

I think the following command should allow you to compile GCC from source.