This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch to cp/search.c checked in
- To: gcc-patches at gcc dot gnu dot org
- Subject: patch to cp/search.c checked in
- From: Joern Rennecke <amylaar at cambridge dot redhat dot com>
- Date: Thu, 5 Apr 2001 17:03:13 +0100 (BST)
- Cc: amylaar at cambridge dot redhat dot com
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