The following article will describe how to configure a CentOS 5.x-based or Centos 6.x-based system to use Fedora Epel repos and third party remi package repos. These package repositories are not officially supported by CentOS, but they provide much more current versions of popular applications like PHP or MYSQL.
If you install macports you can install gcc select, and then choose your gcc version.
/opt/local/bin/port install gcc_select
To see your versions use
port select --list gcc
To select a version use
sudo port select --set gcc gcc40
T. Hu, H. Xiong, W. Zhou, S. Sung, and H. Luo. SIGIR '08: Proceedings of the 31st annual international ACM SIGIR conference on Research and development in information retrieval, page 871--872. New York, NY, USA, ACM, (2008)
K. Avrachenkov, V. Dobrynin, D. Nemirovsky, S. Pham, and E. Smirnova. SIGIR '08: Proceedings of the 31st annual international ACM SIGIR conference on Research and development in information retrieval, page 873--874. New York, NY, USA, ACM, (2008)
D. Arthur, and S. Vassilvitskii. SCG '06: Proceedings of the twenty-second annual symposium on Computational geometry, page 144--153. New York, NY, USA, ACM, (2006)
M. Banko, and E. Brill. ACL '01: Proceedings of the 39th Annual Meeting on Association for Computational Linguistics, page 26--33. Morristown, NJ, USA, Association for Computational Linguistics, (2001)