Can I use both clang and gcc compiler in yosemite?
Yes you can.

Apple's Xcode supplies clang (and puts in /usr/bin/gcc a link to clang not gcc)

Then you can then install gcc - probably the easiest way is via a package manager like Macports, Homebrew or Fink