[C++ PATCH]: two checking ICE's

Nathan Sidwell nathan@codesourcery.com
Sat Mar 18 02:30:00 GMT 2000


Hi,
I've installed the attached which fixes two ICE's in the testsuite
which a checking compiler.

[Jeff, I did the checkin before reading your stability mail]

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>

	* class.c (build_base_field): Use TYPE_ALIGN to examine a type.
	(note_name_declared_in_class): Use OVL_CURRENT to get at a
	potential overload.

Index: cp/class.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/class.c,v
retrieving revision 1.269
diff -c -3 -p -r1.269 class.c
*** class.c	2000/03/15 00:16:21	1.269
--- class.c	2000/03/18 10:10:56
*************** build_base_field (rli, binfo, empty_p, b
*** 4292,4298 ****
        /* This code assumes that zero-sized classes have one-byte
  	 alignment.  There might someday be a system where that's not
  	 true.  */
!       my_friendly_assert (DECL_ALIGN (basetype) == BITS_PER_UNIT, 
  			  20000314);
  
        /* This is an empty base class.  We first try to put it at
--- 4292,4298 ----
        /* This code assumes that zero-sized classes have one-byte
  	 alignment.  There might someday be a system where that's not
  	 true.  */
!       my_friendly_assert (TYPE_ALIGN (basetype) == BITS_PER_UNIT, 
  			  20000314);
  
        /* This is an empty base class.  We first try to put it at
*************** note_name_declared_in_class (name, decl)
*** 6518,6524 ****
  	 S.  */
        cp_error ("declaration of `%#D'", decl);
        cp_error_at ("changes meaning of `%s' from `%+#D'", 
! 		   IDENTIFIER_POINTER (DECL_NAME (decl)),
  		   (tree) n->value);
      }
  }
--- 6518,6524 ----
  	 S.  */
        cp_error ("declaration of `%#D'", decl);
        cp_error_at ("changes meaning of `%s' from `%+#D'", 
! 		   IDENTIFIER_POINTER (DECL_NAME (OVL_CURRENT (decl))),
  		   (tree) n->value);
      }
  }


More information about the Gcc-patches mailing list