in CentOS, gcc, gcc 4.7.2, Redhat

Redhat developer toolset 1.1

Tru Huynh of has built the redhat developer toolset 1.1, for centos and it contains gcc 4.7.2

So you could simply use his repo and install just gcc, instantly.

cd /etc/yum.repos.d
yum --enablerepo=testing-1.1-devtools-6 install devtoolset-1.1-gcc 

This will install it most likely into: /opt/centos/devtoolset-1.1/root/usr/bin/

Then you can tell your compile process to use the gcc 4.7 instead of 4.4 with the CC variable

export CC=/opt/centos/devtoolset-1.1/root/usr/bin/gcc  
export CPP=/opt/centos/devtoolset-1.1/root/usr/bin/cpp
export CXX=/opt/centos/devtoolset-1.1/root/usr/bin/c++

Also, worth noting; that instead of setting individual variables you can do
 scl enable devtoolset-1.1 bash
(it just starts new shell with all the appropriate variables already set).