[PATCH]: Fix loop-invariant.c on ARM

Richard Earnshaw rearnsha@gcc.gnu.org
Mon Nov 14 14:55:00 GMT 2005


On ARM REGNO_REG_CLASS is a function call to the MD files, so we were
dying with an error on native builds because there was no prototype in
scope for the called function.  Fixed by including tm_p.h

Built on arm-elf to verify that we now compile correctly with no
warnings.

R.


-------------- next part --------------
----------------------------------------------------------------------
r106890 (orig r106887):  rearnsha | 2005-11-14 14:52:15 +0000

	* loop-invariant.c: Include tm_p.h.
	* Makefile.in: Updated.
----------------------------------------------------------------------
=== gcc/trunk/gcc/loop-invariant.c
==================================================================
--- gcc/trunk/gcc/loop-invariant.c	(revision 106889)
+++ gcc/trunk/gcc/loop-invariant.c	(revision 106890)
@@ -40,6 +40,7 @@
 #include "coretypes.h"
 #include "tm.h"
 #include "rtl.h"
+#include "tm_p.h"
 #include "hard-reg-set.h"
 #include "obstack.h"
 #include "basic-block.h"
=== gcc/trunk/gcc/Makefile.in
==================================================================
--- gcc/trunk/gcc/Makefile.in	(revision 106889)
+++ gcc/trunk/gcc/Makefile.in	(revision 106890)
@@ -2321,7 +2321,7 @@
    output.h intl.h
 loop-invariant.o : loop-invariant.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
    $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) coretypes.h \
-   $(TM_H) function.h $(FLAGS_H) $(DF_H) $(OBSTACK_H) output.h
+   $(TM_H) $(TM_P_H) function.h $(FLAGS_H) $(DF_H) $(OBSTACK_H) output.h
 cfgloopmanip.o : cfgloopmanip.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
    $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) output.h \
    coretypes.h $(TM_H) cfghooks.h $(OBSTACK_H)


More information about the Gcc-patches mailing list