Installing gcc without admin?
Apps can run from anywhere, so if you don't want to authenticate as an admin user, you'll want to write it to /Users/Shared or ~ and expand your path to accommodate wherever you chose to land the package.

If you're working in a lab situation, you can make a USB drive called dev and a folder named bin to contain gcc would require something like this for the default bash shell:

export PATH=/Volumes/dev/bin:$PATH