public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* 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-17 15:46 How to understand gcc mike stump
@ 2001-12-17 16:20 ` David Rasmussen
  2001-12-18  2:59 ` Axel Kittenberger
  1 sibling, 0 replies; 9+ messages in thread
From: David Rasmussen @ 2001-12-17 16:20 UTC (permalink / raw)
  To: mike stump, gcc


----- Original Message -----
From: "mike stump" <mrs@windriver.com>
To: <gcc@gcc.gnu.org>; <pinkfloydhomer@yahoo.com>
Sent: Tuesday, December 18, 2001 12:21 AM
Subject: Re: How to understand gcc


> 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 know :)

> > 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

I have taken a lot of courses in these areas. I study computer science and
math.

> books on compilers and languages and read them all.
>

OK, which books? Some are better than others, I gather. "Modern Compiler
Implementation in ML" is not a good book, as aren't the others the author
has done, for other implementation languages.

> > and I own the "Dragon book"
>
> I'd recommend reading and understanding it, if you haven't yet.  :-)
>

I have read and understood it. Of course, reading this book again wouldn't
hurt.

> > 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.
>

I haven't done all of those things. Things for me to do... :)

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

I have done that. In fact I have written a couple for assignments in various
courses, but the results were quite "messy". I would like to have a book
that I could read and do excercises from, that would help me build a good
compiler with a nice design.

> Lather, rinse, repeat.

:)

/David

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

* Re: How to understand gcc
  2001-12-17 15:46 How to understand gcc mike stump
  2001-12-17 16:20 ` David Rasmussen
@ 2001-12-18  2:59 ` Axel Kittenberger
  2001-12-18 15:03   ` Toon Moene
  1 sibling, 1 reply; 9+ messages in thread
From: Axel Kittenberger @ 2001-12-18  2:59 UTC (permalink / raw)
  To: mike stump, gcc, pinkfloydhomer

On Tuesday 18 December 2001 00:21, mike stump wrote:
> 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.

Well that much of an arcane art how some people view compiler aren't the 
translors. And even worse some people working in that field like to be viewed 
as arcane wizards.  It's generally not true. Just take a look at the code an 
enjoy it. Never forget to read books/texts, but don't listen to people who 
require you to read a library before they even want to hear your thougths, 
(or want to let you fix 100 bugs, some are enough :o)) in science more than 
once an outsider moved the field on. And if you are more expirienced do not 
push the same acrcane attitude on newcomers.  

( However I do not view myself understand a lot or even some of it, but 
reading some texts in the past I often wondered why they ie. often use terms 
like "first class entities" without explaining what it means. 

My view is that some things as simple as they are like to be viewed 
complicated by the author or more expirienced users. )

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

* Re: How to understand gcc
  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
  0 siblings, 2 replies; 9+ messages in thread
From: Toon Moene @ 2001-12-18 15:03 UTC (permalink / raw)
  To: Axel Kittenberger; +Cc: mike stump, gcc, pinkfloydhomer

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.

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

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

* Re: How to understand gcc
  2001-12-18 15:03   ` Toon Moene
@ 2001-12-18 15:39     ` Neil Booth
  2001-12-18 23:27     ` Axel Kittenberger
  1 sibling, 0 replies; 9+ messages in thread
From: Neil Booth @ 2001-12-18 15:39 UTC (permalink / raw)
  To: Toon Moene; +Cc: Axel Kittenberger, mike stump, gcc, pinkfloydhomer

Toon Moene wrote:-

> 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 :-)

Neil.

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

* Re: How to understand gcc
  2001-12-18 15:03   ` Toon Moene
  2001-12-18 15:39     ` Neil Booth
@ 2001-12-18 23:27     ` Axel Kittenberger
  1 sibling, 0 replies; 9+ messages in thread
From: Axel Kittenberger @ 2001-12-18 23:27 UTC (permalink / raw)
  To: Toon Moene; +Cc: gcc

On Tuesday 18 December 2001 23:42, Toon Moene wrote:
> 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.

Oh well , I'm sorry got it messed up a bit :o) 

Don't you have error correction? *g* 

- Axel

^ 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

* Re: How to understand gcc
  2001-12-17 15:01 David Rasmussen
@ 2001-12-17 15:05 ` Neil Booth
  0 siblings, 0 replies; 9+ messages in thread
From: Neil Booth @ 2001-12-17 15:05 UTC (permalink / raw)
  To: David Rasmussen; +Cc: gcc

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.

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

* 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

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:46 How to understand gcc 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
  -- strict thread matches above, loose matches on Subject: below --
2001-12-18 17:32 mike stump
2001-12-17 15:01 David Rasmussen
2001-12-17 15:05 ` Neil Booth

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).