This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Projects for beginners


    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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]