This is the mail archive of the gcc@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]

Re: function.h/except.h problems


| I think you understand the problem just fine.  I'm just looking
| for opinions for how folks want to solve this problem.
|
| Hacking the definitions of tree & rtx is certainly one approach.
|
| The other would be to make sure the definitions we need are
| available and kill the #ifndef NULL_TREE/GET_CODE stuff.

As far as I can tell, my message this morning about this never got sent to egcs
(either I forgot to add it, the mail server is really backed up, or it lost).
I checked the following change this morning which should clear things up (note,
you can't just include rtl.h or treee.h, because it blows up in compiling
cp/pt.c -- which seems to have its own macro 'RETURN' which conflicts with the
insn of that name):

Thu May 28 09:36:39 1998  Michael Meissner  <meissner@cygnus.com>

	* except.h (rtx): Define rtx type correctly if needed.
	* function.h (rtx): Ditto.
	(tree): Define tree type correctly if needed.

	* c-pragma.c (toplevel): Include rtl.h.

	* stor-layout.c (toplevel): Move include of rtl.h before
	except.h.

	* Makefile.in (c-pragma.o): Add except.h, rtl.h dependencies.
	(tree.o): Add except.h dependency.

*** except.h.~1~	Tue May 19 04:42:22 1998
--- except.h	Thu May 28 09:15:32 1998
*************** along with GNU CC; see the file COPYING.
*** 19,27 ****
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.  */
  
! 
! #ifndef GET_CODE
! #define rtx int *
  #endif
  
  #ifdef TREE_CODE
--- 19,27 ----
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.  */
  
! #if !defined(NULL_RTX) && !defined(rtx)
! typedef struct rtx_def *_except_rtx;
! #define rtx _except_rtx
  #endif
  
  #ifdef TREE_CODE
*************** rtx expand_builtin_dwarf_reg_size	PROTO(
*** 388,390 ****
--- 388,394 ----
  int in_same_eh_region                   PROTO((rtx, rtx));
  void free_insn_eh_region                PROTO((void));
  void init_insn_eh_region                PROTO((rtx, int));
+ 
+ #ifdef rtx
+ #undef rtx
+ #endif
*** function.h.~1~	Thu May 14 09:39:02 1998
--- function.h	Thu May 28 09:15:02 1998
*************** the Free Software Foundation, 59 Temple 
*** 19,29 ****
  Boston, MA 02111-1307, USA.  */
  
  
! #ifndef NULL_TREE
! #define tree int *
  #endif
! #ifndef GET_CODE
! #define rtx int *
  #endif
  
  struct var_refs_queue
--- 19,31 ----
  Boston, MA 02111-1307, USA.  */
  
  
! #if !defined(NULL_TREE) && !defined(tree)
! typedef union union_node *_function_tree;
! #define tree _function_tree
  #endif
! #if !defined(NULL_RTX) && !defined(rtx)
! typedef struct rtx_def *_function_rtx;
! #define rtx _function_rtx
  #endif
  
  struct var_refs_queue
*** c-pragma.c.~1~	Wed May  6 00:45:45 1998
--- c-pragma.c	Thu May 28 08:44:55 1998
*************** Boston, MA 02111-1307, USA.  */
*** 20,25 ****
--- 20,26 ----
  
  #include "config.h"
  #include "system.h"
+ #include "rtl.h"
  #include "tree.h"
  #include "except.h"
  #include "function.h"
*** stor-layout.c.~1~	Mon May 18 09:21:12 1998
--- stor-layout.c	Thu May 28 08:55:26 1998
*************** Boston, MA 02111-1307, USA.  */
*** 23,32 ****
  #include "system.h"
  
  #include "tree.h"
  #include "flags.h"
  #include "except.h"
  #include "function.h"
- #include "rtl.h"
  #include "expr.h"
  #include "toplev.h"
  
--- 23,32 ----
  #include "system.h"
  
  #include "tree.h"
+ #include "rtl.h"
  #include "flags.h"
  #include "except.h"
  #include "function.h"
  #include "expr.h"
  #include "toplev.h"
  
*** Makefile.in.~1~	Thu May 28 08:33:19 1998
--- Makefile.in	Thu May 28 09:19:01 1998
*************** c-lex.o : c-lex.c $(CONFIG_H) system.h $
*** 1259,1266 ****
      toplev.h output.h
  c-aux-info.o : c-aux-info.c  $(CONFIG_H) system.h $(TREE_H) c-tree.h flags.h
  c-convert.o : c-convert.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h
! c-pragma.o: c-pragma.c $(CONFIG_H) system.h $(TREE_H) except.h function.h \
!     defaults.h c-pragma.h toplev.h
  c-iterate.o: c-iterate.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-tree.h \
      flags.h toplev.h 
  
--- 1259,1266 ----
      toplev.h output.h
  c-aux-info.o : c-aux-info.c  $(CONFIG_H) system.h $(TREE_H) c-tree.h flags.h
  c-convert.o : c-convert.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h
! c-pragma.o: c-pragma.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) except.h \
!     function.h defaults.h c-pragma.h toplev.h
  c-iterate.o: c-iterate.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-tree.h \
      flags.h toplev.h 
  
*************** prefix.o: prefix.c $(CONFIG_H) system.h 
*** 1341,1347 ****
  
  convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h toplev.h
  
! tree.o : tree.c $(CONFIG_H) system.h $(TREE_H) flags.h function.h toplev.h
  print-tree.o : print-tree.c $(CONFIG_H) system.h $(TREE_H)
  stor-layout.o : stor-layout.c $(CONFIG_H) system.h $(TREE_H) flags.h \
     function.h expr.h insn-codes.h $(RTL_H) toplev.h except.h
--- 1341,1347 ----
  
  convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h toplev.h
  
! tree.o : tree.c $(CONFIG_H) system.h $(TREE_H) flags.h function.h toplev.h except.h
  print-tree.o : print-tree.c $(CONFIG_H) system.h $(TREE_H)
  stor-layout.o : stor-layout.c $(CONFIG_H) system.h $(TREE_H) flags.h \
     function.h expr.h insn-codes.h $(RTL_H) toplev.h except.h


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