This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Projects for beginners
- To: dberlin at redhat dot com
- Subject: Re: Projects for beginners
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Thu, 1 Feb 01 05:37:40 EST
- Cc: gcc at gcc dot gnu dot org
This is my only reason for using them. As I said, it was very
frustrating to try to start the new register allocator code, and i
couldn't even get functions i wanted without trying to hunt down what
things from 8 other files i never cared about i had to include first.
That is indeed a problem, but one that I think is far better dealt with
by restructuring the include files in a cleaner way than letting them
get messed up with all sorts of interdependences that now don't matter
because of the guards.
Include files conceptually should be hierarchical. We have the basic
things that are needed by everybody (which perhaps could all be included by
one header file, say gcc.h) and then a bynch of other include files that
are each only needed by some parts of the compiler. These would have the
rule that they could *only* depend on files in the first set.
Doing things this way is far cleaner and shows the structural dependencies
in a much clearer fashion.