This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to understand gcc
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- To: David Rasmussen <pinkfloydhomer at yahoo dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 17 Dec 2001 23:01:47 +0000
- Subject: Re: How to understand gcc
- References: <00dd01c1874d$58213f50$d26afea9@AMADEUS2>
David Rasmussen wrote:-
> Hi there,
>
> How can I learn how gcc works? I have taken one compiler course at my
> university, and I own the "Dragon book" and Modern Compiler Implementation
> in ML. I am specifically interested in the C++ part of the compiler. But
> really, I would like to have some sort of general understanding about the
> design of gcc, how it is modularized, what techniques are used and which are
> not (i.e. design choices) etc. I can imagine that this is a near impossible
> task, but I want to know anyway :) I think it would be great if there was
> some sort of documentation that described the design and techniques of gcc.
> Ultimately, I would like to read a compiler text book, that used gcc as an
> example throughout.
>From my experience (I knew nothing about compilers or GCC 2 yrs ago)
the best way is just to dive in and fix something, even if it's not
something you originally wanted to know about. There's a GCC
beginner's project list (some of which are definitely non-trivial)
when you click "Projects" on the home page. You could also try
picking easy-looking C++ bugs from GNATS and trying to fix them;
some hints on how you might do this are also on the beginner's page
I referred to.
The GCC documentation isn't bad either, and is getting better with
time. It covers some of the internals, albeit sketchily and with many
out-of-date bits.
Good luck!
Neil.