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]

patch to cp/search.c checked in


This patch fixes a bug in dynamic cast on hosts where an integer has a
smaller size than a pointer.

Approved by Jason Merrill / Richard Henderson.

Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>

	* search.c (get_dynamic_cast_base_type): When building a new
	constant, set its type to ssizetype.

Index: search.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/search.c,v
retrieving revision 1.206
diff -p -r1.206 search.c
*** search.c	2001/03/23 12:04:10	1.206
--- search.c	2001/04/05 15:56:26
*************** get_dynamic_cast_base_type (subtype, tar
*** 561,567 ****
    
    if (!boff)
      return offset;
!   return build_int_2 (boff, -1);
  }
  
  /* Search for a member with name NAME in a multiple inheritance lattice
--- 561,569 ----
    
    if (!boff)
      return offset;
!   offset = build_int_2 (boff, -1);
!   TREE_TYPE (offset) = ssizetype;
!   return offset;
  }
  
  /* Search for a member with name NAME in a multiple inheritance lattice


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