Yum is not installed by default , Redhat EL 4.
'up2date' is used to get packages from Redhat,
if you remembered to sign up .. and pay.
The system gcc is 3.4.x , the latest update is
3.4.6-11 ( gcc-3.4.6-11.i386.rpm )
gcc4 = gcc4-4.1.2-44.EL4.i386.rpm is available too.
( You can have as many compilers, as you want.)
Example link for these packages :
http://mirror.centos.org/centos/4.8/...6/CentOS/RPMS/
If you don't have a Redhat account , and not wanting
one, why not install the free version of Redhat EL =
CentOS ...
.....
.....
The command # 'rpm -ivh <package>' is a one time /
first time only for that package.
The versatile command is 'rpm -Uvh <package>' .
Please read 'man rpm' to see why.
.....