The Definitive Guide to GCC

William von Hagen

Mentioned 1

* Expanded and revised in light of the GNU Compiler Collection (GCC) 4 release in April 2005, this book offers detailed coverage of GCC's somewhat daunting array of options and features and includes several chapters devoted to its support for languages like C, C++, Java, Objective-C, and Fortran. * Though targeting beginner and intermediate developers, this book goes well beyond basic compiler usage, combining instruction of GCC's advanced features and utilities (authconf, libtool, and gprof) with key coding techniques, such as profiling and optimization to show how to build and manage enterprise-level applications. * This is an enormous market. GCC is the defacto compiler collection for hundreds of thousands of open source projects worldwide, a wide variety of commercial development projects, and is the standard compiler for academic programs.

More on

Mentioned in questions and answers.

I've recently been very interested in compilers and how they work. Since gcc has it's source available, I figured it would be the best material to study.

The first thing I realized is that it would be pointless to study gcc if I didn't have a basic understand of simple compiler design principles. I have since been diligently reading the "Dragon Book" which, from what I have seen, is the de facto book on compiler implementation.

None-the-less, reading that book has only furthered my desire to learn about compilers such as gcc.

Additionally, I find it pertinent to say that I do have a intermediate understanding of c/c++ (aka, I'm not trying to study gcc without knowing c). I am hoping that studying gcc will help me improve upon that as well.

I have downloaded the latest build I could find; however, I get lost when perusing the source code.

What I'm looking for are suggestions on how to proceed. Is there a similar project, which is not so massive, I could use as a stepping stone to gcc? Is there a particular module of gcc which one would recommend studying first? Are there any books which go into gcc's implementation, rather than it's use? Perhaps I should stop whining and just keep reading the source until it clicks?

Any and all feedback will be greatly appreciated.

EDIT: If you think I should study a different compiler/interpreter, I would greatly appreciate suggestions as to which ones.

I think it's good to read the book "ruby under a microscope" and practise with ruby core development, before reading gcc's code. But you should need knowledge on ruby programming. It's about ruby internels.

As I know the best book on gcc is "the definitive guide to gcc" Although it is little bit old, I think you should read this.