>>And instead of having the kids write their own from scratch,>>something they'll probably never do in their industrial careers, have>>them pick up something like gcc, study it, and modify it.

> Do you really think that a student, with no experience with real> compiler code, can understand a monster like gcc in reasonable time???

It depends on what you want to learn, but I would say probably not.
If you just want to learn to be able to port gcc to a different target
machine, it probably doesn't take so long, but do you really learn
enough about compilers?

I think lcc might be a better choice. It is documented well enough
that you might at least believe that you understand the different
parts without rewriting them. This only helps if you want to learn
how to retarget C compilers, though.

If you simplify the source language it doesn't take that long to learn
enough to write the compiler.