This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: define_constraints patch, re-revised


>>>>> Zack Weinberg writes:

Zack> I have no better suggestion than that you move the #include "tm_p.h"
Zack> to the very bottom of the #include stack in every file that trips over
Zack> this.  I believe this is safe, since the only things in CPU-protos.h
Zack> and tm-preds.h are function declarations + these inlines, and nothing
Zack> in other headers should need to see them.

	Unfortunately, this creates a bigger mess.  tm_p.h is included in
many files, not just generated files and not just files that actually need
the constraint functions.  Not all of those files include the headers that
declare the function and variables referenced by tm_p.h.  This means that
one needs to start including more and more header files in all source
files that include tm_p.h to satisfy those functions.  Pretty soon every
source file in GCC is including lots of unnecessary headers.

	I doubt this is the proper direction for a solution.  Why can't
genpreds.c define the static functions at the top of insn-preds.c?

Thanks, David


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