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]
Other format: [Raw text]

IA64 HP-UX patch for C++


This is a change that was part of some earlier C++ changes that got
checked in.  It doesn't affect any platform except IA64 HP-UX because
that is the only platform that sets TARGET_VTABLE_DATA_ENTRY_DISTANCE to
a value other then 1.

Without this change I get errors when building libstdc++-v3 due
to type mismatches when accessing the vtable.

Steve Ellcey
sje@cup.hp.com


Steve Ellcey  <sje@cup.hp.com>

	* cp/class.c (build_vtbl_initializer): Ensure correct type
	for vtable pad entries.


*** gcc.orig/gcc/cp/class.c	Wed Sep 25 09:21:48 2002
--- gcc/gcc/cp/class.c	Wed Sep 25 09:25:32 2002
*************** build_vtbl_initializer (binfo, orig_binf
*** 7501,7507 ****
  	  int i;
  
  	  for (i = 1; i < TARGET_VTABLE_DATA_ENTRY_DISTANCE; ++i)
! 	    add = tree_cons (NULL_TREE, null_pointer_node, add);
  	  *prev = add;
  	}
      }
--- 7501,7511 ----
  	  int i;
  
  	  for (i = 1; i < TARGET_VTABLE_DATA_ENTRY_DISTANCE; ++i)
! 	    add = tree_cons (NULL_TREE,
! 			     build1 (NOP_EXPR,
! 				     vtable_entry_type,
! 				     size_zero_node),
! 			     add);
  	  *prev = add;
  	}
      }


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