I don't know whether it's GCC or not, but I used to use PocketC on my Palm Vx. You write the code in the memo app and the compiler runs on the device and compiles as a .prc. Ahhh, memories!
Hope that helps.
Edit - here's a link for your convenience.
http://www.orbworks.com/pcpalm/index.html--
moto