Projects for beginners

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Thu Feb 1 02:36:00 GMT 2001


    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.


More information about the Gcc mailing list