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

java patch: lazy superclass layout fix



I came across this while building gnome-gcj.  maybe_layout_super_class
says:

	  if (!super_class)
	    return NULL_TREE;	/* FIXME, NULL_TREE not checked by caller. */

This patch is intended to fix one of the callers.


2000-09-10  Anthony Green  <green@redhat.com>

	* class.c (layout_class): Handle case where superclass can't be
	layed out yet.

Index: gcc/java/class.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/class.c,v
retrieving revision 1.74
diff -p -r1.74 class.c
*** class.c	2000/08/11 22:01:37	1.74
--- class.c	2000/09/11 00:43:33
*************** layout_class (this_class)
*** 1811,1818 ****
  
    if (super_class)
      {
!       super_class = maybe_layout_super_class (super_class, this_class);
!       if (TREE_CODE (TYPE_SIZE (super_class)) == ERROR_MARK)
  	{
  	  TYPE_SIZE (this_class) = error_mark_node;
  	  CLASS_BEING_LAIDOUT (this_class) = 0;
--- 1811,1820 ----
  
    if (super_class)
      {
!       tree maybe_super_class 
! 	= maybe_layout_super_class (super_class, this_class);
!       if (maybe_super_class == NULL
! 	  || TREE_CODE (TYPE_SIZE (maybe_super_class)) == ERROR_MARK)
  	{
  	  TYPE_SIZE (this_class) = error_mark_node;
  	  CLASS_BEING_LAIDOUT (this_class) = 0;

-- 
Anthony Green                                                        Red Hat
                                                       Sunnyvale, California

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