According to the output you posted of uname -a
, you are running "Red Hat EL 3 AS". I would imagine all you need is the RHEL3 package. Go to RPM SEARCH
and click on "Advanced search" to the right of the search field. On the next page, remove check marks for all distributions except RedHat EL 3, and put g++ in the search field and hit search. On the next page, click on the link of this package --> distcc-2.18.3-2.1.el3.rf.x86_64.rpm, on the next page, look at the contents of the rpm, you'll notice it contains g++-3.2.3. You will also see what all dependencies are required for this rpm with download links to them also.
From what I understood when I was at the GCC source web site, the important part of the gcc versions is the first number. gcc-296 is basically gcc-2 at it's last revision, gcc-3.2.3 is gcc-3, so is gcc-3.4, but gcc-3.4 is a latter version of gcc-3. Most distributions today have gcc-4. The version number is the first and important number when you need a specific version of gcc, the other numbers are called "extra version" where small refinements were added.
You will notice at RPM SEARCH that the package maintainer is Dag Wieers, if you want to dig more to see if you can find that specific version of gcc with the "4.6" extra version, go to his site and dig.