This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] gcse.c: Fix the header ordering.
Hi Richard,
> > >>I think rtl.h should include insn-config.h
> > It would also need be guarded by ifndef GENERATOR_FILE and also
> > added to RTL_BASE_H list in Makefile.in
>
> I would go for this.
Somthing like this? I am about to run the testsuite.
What should I do with gcc/*.c that include both rtl.h and
insn-config.h? Should I remove #include "insn-config.h" from those
files?
Thanks,
Kazu Hirata
2003-01-31 Kazu Hirata <kazu@cs.umass.edu>
* Makefile.in (RTL_BASE_H): Add insn-config.h
* rtl.h: Include insn-config.h if GENERATOR_FILE is not defined.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.984
diff -u -r1.984 Makefile.in
--- Makefile.in 31 Jan 2003 01:42:33 -0000 1.984
+++ Makefile.in 31 Jan 2003 22:24:20 -0000
@@ -592,7 +592,7 @@
LANGHOOKS_DEF_H = langhooks-def.h $(HOOKS_H)
TARGET_DEF_H = target-def.h $(HOOKS_H)
MACHMODE_H = machmode.h machmode.def @extra_modes_file@
-RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H)
+RTL_BASE_H = rtl.h rtl.def insn-config.h $(MACHMODE_H)
RTL_H = $(RTL_BASE_H) genrtl.h
PARAMS_H = params.h params.def
TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.def \
Index: rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.382
diff -u -r1.382 rtl.h
--- rtl.h 24 Jan 2003 22:45:57 -0000 1.382
+++ rtl.h 31 Jan 2003 22:24:21 -0000
@@ -24,6 +24,11 @@
struct function;
+/* We need to include insn-config.h for HAVE_cc0. */
+#ifndef GENERATOR_FILE
+#include "insn-config.h"
+#endif GENERATOR_FILE
+
#include "machmode.h"
#undef FFS /* Some systems predefine this symbol; don't let it interfere. */