I would like know if GCC compiler 2.95.3 could be installed on Red Hat Entreprise Linux ES 3.0 and recompile C/C++ programs that were written/compiled earlier using 2.95.3 GCC compiler on Sun Solaris V 2.6 machine.
Also would like to know the pros and cons in using GCC 2.95.3 in preference to the compiler version that is shipped with Red Hat Entreprise Linux ES 3.0.
I'd recommend that you not even try, and that instead, you undertake maintenance of the code.
Failing that, yes, I suspect you could just use gcc 2.95.3 to compile it.
[ gcc-help is the more appropriate forum for this type of question ]