Another hint: do not start digging into GCC; it is way too complicated. You want something more researchy and simple to start with, I would suggest looking into something like a Java compiler written in Java or the Erlang compilers written in Erlang.