hooks.h (hook_reg_class_void_no_regs): Only declare if tm.h has been included.
authorJ"orn Rennecke <joern.rennecke@superh.com>
Thu, 19 Jun 2003 10:44:44 +0000 (10:44 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Thu, 19 Jun 2003 10:44:44 +0000 (11:44 +0100)
* hooks.h (hook_reg_class_void_no_regs): Only declare if tm.h
has been included.

From-SVN: r68188

gcc/ChangeLog
gcc/hooks.h

index 69201748a53f01cbddf85c6b7f79cf72de96117b..fd7fd9cbebcd5e14ec9950e5ed607f6cc254a6bf 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-19  J"orn Rennecke <joern.rennecke@superh.com>
+
+       * hooks.h (hook_reg_class_void_no_regs): Only declare if tm.h
+       has been included.
+
 2003-06-18  James A Morrison <ja2morri@student.math.uwaterloo.ca>
 
        * config/sparc/sparc.c: Update copyright year.
index d0abf889b9590ebf5c0bc3cb0b8c627d7707022d..e5dbcc6eebc90be3d449c4515e4c6c4cdb6b4c51 100644 (file)
@@ -23,7 +23,15 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #define GCC_HOOKS_H
 
 bool hook_bool_void_false PARAMS ((void));
+
+/* Check if tm.h has been included, since ISO C does not allow forward
+   definitions for enums, and making hooks.h dependent on tm.h would create
+   unnecessary dependencies where no hook declaration involving
+   enum_reg_class is needed.  */
+#ifdef REG_CLASS_CONTENTS
 enum reg_class hook_reg_class_void_no_regs (void);
+#endif
+
 bool hook_bool_bool_false (bool);
 bool hook_bool_tree_false PARAMS ((tree));
 bool hook_bool_tree_hwi_hwi_tree_false