'Pure' GNU C++ compilers for Lion I need to compile simple *.cpp files with a GNU compiler of at least version 4.3.1.
As I understand, Apple's Xcode does not install standard GNU compilers but a modified version suited to Apple's needs:

g++ -v


gives me

gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)


also referred to as

i686-apple-darwin11-llvm-g++-4.2




What is a simple way to install and safe method to use a newer C++ compiler in Mac OS?
MacPorts has several pre-configured gcc packages (from 4.2 to 4.6). Just install MacPorts and run

sudo port install gcc46