* coretypes.h: Include machmode.h, signop.h, wide-int.h, double-int.h, real.h, and fixed-value.h when included in host source files, identified by the presence of config.h in the include chain. * double-int.h: Remove redundant #includes listed above. * fixed-value.h: Likewise. * real.h: Likewise. * wide-int.h: Likewise. * inchash.h: Likewise. * rtl.h: Add some include files When included from a generator file. * target.h: Remove wide-int.h and insn-modes.h from the include list. * internal-fn.h: Don't include coretypes.h. Index: coretypes.h =================================================================== --- coretypes.h (revision 223875) +++ coretypes.h (working copy) @@ -299,4 +299,14 @@ typedef unsigned char uchar; #endif +/* Most host source files will require the following headers. */ +#ifdef GCC_CONFIG_H +#include "machmode.h" +#include "signop.h" +#include "wide-int.h" +#include "double-int.h" +#include "real.h" +#include "fixed-value.h" +#endif + #endif /* coretypes.h */ Index: double-int.h =================================================================== --- double-int.h (revision 223875) +++ double-int.h (working copy) @@ -20,8 +20,6 @@ #ifndef DOUBLE_INT_H #define DOUBLE_INT_H -#include "wide-int.h" - /* A large integer is currently represented as a pair of HOST_WIDE_INTs. It therefore represents a number with precision of 2 * HOST_BITS_PER_WIDE_INT bits (it is however possible that the Index: fixed-value.h =================================================================== --- fixed-value.h (revision 223875) +++ fixed-value.h (working copy) @@ -20,10 +20,6 @@ #ifndef GCC_FIXED_VALUE_H #define GCC_FIXED_VALUE_H -#include "machmode.h" -#include "real.h" -#include "double-int.h" - struct GTY(()) fixed_value { double_int data; /* Store data up to 2 wide integers. */ Index: real.h =================================================================== --- real.h (revision 223875) +++ real.h (working copy) @@ -20,11 +20,6 @@ #ifndef GCC_REAL_H #define GCC_REAL_H -#include "machmode.h" -#include "signop.h" -#include "wide-int.h" -#include "insn-modes.h" - /* An expanded form of the represented number. */ /* Enumerate the special cases of numbers that we encounter. */ Index: wide-int.h =================================================================== --- wide-int.h (revision 223875) +++ wide-int.h (working copy) @@ -216,11 +216,6 @@ the same result as X + X; the precision of the shift amount Y can be arbitrarily different from X. */ -#include "system.h" -#include "hwint.h" -#include "signop.h" -#include "insn-modes.h" - /* The MAX_BITSIZE_MODE_ANY_INT is automatically generated by a very early examination of the target's mode file. The WIDE_INT_MAX_ELTS can accomodate at least 1 more bit so that unsigned numbers of that Index: inchash.h =================================================================== --- inchash.h (revision 223875) +++ inchash.h (working copy) @@ -20,13 +20,6 @@ #ifndef INCHASH_H #define INCHASH_H 1 -#ifdef GENERATOR_FILE -#include "bconfig.h" -#else -#include "config.h" -#endif -#include "system.h" -#include "coretypes.h" #include "hashtab.h" /* This file implements an incremential hash function ADT, to be used Index: rtl.h =================================================================== --- rtl.h (revision 223875) +++ rtl.h (working copy) @@ -20,15 +20,23 @@ #ifndef GCC_RTL_H #define GCC_RTL_H +/* This file is occasionally included by generator files which expect + machmode.h and other files to exist and would not normally have been + included by coretypes.h. */ +#ifdef GENERATOR_FILE +#include "machmode.h" +#include "signop.h" +#include "wide-int.h" +#include "double-int.h" +#include "real.h" +#include "fixed-value.h" +#endif /* GENERATOR_FILE */ + #include "statistics.h" -#include "machmode.h" #include "input.h" -#include "real.h" #include "vec.h" -#include "fixed-value.h" #include "alias.h" #include "hashtab.h" -#include "wide-int.h" #include "flags.h" #include "is-a.h" Index: target.h =================================================================== --- target.h (revision 223875) +++ target.h (working copy) @@ -48,9 +48,7 @@ #ifndef GCC_TARGET_H #define GCC_TARGET_H -#include "insn-modes.h" #include "insn-codes.h" -#include "wide-int.h" #include "tm.h" #include "hard-reg-set.h" Index: internal-fn.h =================================================================== --- internal-fn.h (revision 223875) +++ internal-fn.h (working copy) @@ -20,8 +20,6 @@ #ifndef GCC_INTERNAL_FN_H #define GCC_INTERNAL_FN_H -#include "coretypes.h" - /* Initialize internal function tables. */ extern void init_internal_fns ();