i recently got Oracle Solaris on my VM to test some code on it, i was unable to install gcc since i dont really know how, i googled alot but all info is about oracle compile
You can install gcc 4.3 from OpenCSW:
pkg-get -i gcc4code gcc4g++
I also had to run mkheaders manually after the install.