public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* How to understand gcc
@ 2001-12-17 15:01 David Rasmussen
  2001-12-17 15:05 ` Neil Booth
  0 siblings, 1 reply; 9+ messages in thread
From: David Rasmussen @ 2001-12-17 15:01 UTC (permalink / raw)
  To: gcc

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.

/David

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: How to understand gcc
@ 2001-12-17 15:46 mike stump
  2001-12-17 16:20 ` David Rasmussen
  2001-12-18  2:59 ` Axel Kittenberger
  0 siblings, 2 replies; 9+ messages in thread
From: mike stump @ 2001-12-17 15:46 UTC (permalink / raw)
  To: gcc, pinkfloydhomer

I think you can get answers as varied as people are.  I'll just toss
out a few quick things that can keep you busy for 5 years learning.

> From: "David Rasmussen" <pinkfloydhomer@yahoo.com>
> To: <gcc@gcc.gnu.org>
> Date: Mon, 17 Dec 2001 23:51:19 +0100

> How can I learn how gcc works?

:-)  I like simple, to the point questions that have simple answers.
Unfortunately, yours is not.

> I have taken one compiler course at my university,

Good first step.  In addition, you can take advanced algorithms
classes, theory classes...  You can also go to the library and find
books on compilers and languages and read them all.

> and I own the "Dragon book"

I'd recommend reading and understanding it, if you haven't yet.  :-)

> But really, I would like to have some sort of general understanding
> about the design of gcc,

You didn't mention if you had read the gcc manual, see our web site,
under documentation, and manual.  If you have not, you should.  After
that, please read the comments in the code, after that please read the
code.  After that, try fixing 100 bugs or doing a port.  Your
understanding will improve when trying to fix bugs or while doing a
port.

Also helpful, write an interpreter and compiler from the ground up.

Lather, rinse, repeat.

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: How to understand gcc
@ 2001-12-18 17:32 mike stump
  0 siblings, 0 replies; 9+ messages in thread
From: mike stump @ 2001-12-18 17:32 UTC (permalink / raw)
  To: neil, toon; +Cc: Axel.Kittenberger, gcc, pinkfloydhomer

> Date: Tue, 18 Dec 2001 23:04:42 +0000
> To: Toon Moene <toon@moene.indiv.nluug.nl>

> > Axel Kittenberger wrote:
> > 
> > > Well that much of an arcane art how some people view compiler aren't the
> > > translors.
> > 
> >       PARSE ERROR AT OR NEAR LINE 1.
> >       NO OBJECT PRODUCED.
> >       COMPILATION ABORTED.

> My own proprietary normally brokenness-permissive compiler failed at
> the same spot :-)

I autocorrected this without even missing a beat.  Hum, what does that
say about my processor v yours?  Remember, be premissive in what you
accept and pedantic in what you generate, it isn't just a good idea,
it's the law; oh, wait, those two don't go together do they?

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-12-19  7:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-17 15:01 How to understand gcc David Rasmussen
2001-12-17 15:05 ` Neil Booth
2001-12-17 15:46 mike stump
2001-12-17 16:20 ` David Rasmussen
2001-12-18  2:59 ` Axel Kittenberger
2001-12-18 15:03   ` Toon Moene
2001-12-18 15:39     ` Neil Booth
2001-12-18 23:27     ` Axel Kittenberger
2001-12-18 17:32 mike stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).