The listed below are the basic steps and you would be done.. to read the complete article you can visit
http://www.tarunworld.com/index.php?option...id=26&Itemid=361. Copy the bz2 file to a director say /usr/src.
2. Make a dir say named gcc 3.5 in /usr/src.
3. Untar the contents of the zip file in this directory.
4. go to the directory gcc 3.5 as cd gcc3.5
5. on shell give the command as /usr/src/gcc3.5/configure --prefix=/opt/gcc
6. on shell run make bootstrap.
7. on shell run make install(do it as root).
8. The gcc would be compiled 3 times and you might have to wait a while.
9. After the process is completed on shell run export PATH=/opt/gcc/bin:$PATH.
10. This command appends the gcc path to the environment path variable.
11. Now check gcc --v and you would get version as 3.5.
Regards