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]

C++ PATCH for HP/vtable confusion



Jeff --

  Here's a patch that fixes the problem you reported in compiling
libio on HP.  At least, it fixes the problem for me when using an HP
cross-compiler.  I didn't test building all of libio or libstdc++; let
me know if you run into any further difficulties.

  I didn't see this problem on my system because it uses thunks for
virtual functions; the HP port does not.

-- 
Mark Mitchell 			mark@markmitchell.com
Mark Mitchell Consulting	http://www.markmitchell.com

1998-10-09  Mark Mitchell  <mark@markmitchell.com>

	* search.c (expand_upcast_fixups): Tweak to match 1998-10-07
	change to vtable types.

Index: search.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/search.c,v
retrieving revision 1.56
diff -c -p -r1.56 search.c
*** search.c	1998/10/06 14:20:15	1.56
--- search.c	1998/10/09 17:58:39
*************** expand_upcast_fixups (binfo, addr, orig_
*** 2557,2564 ****
  		(build_indirect_ref (addr, NULL_PTR),
  		 DECL_CONTEXT (CLASSTYPE_VFIELD (BINFO_TYPE (binfo))));
  	      expand_expr_stmt
! 		(build_modify_expr (ref, NOP_EXPR,
! 				    build_unary_op (ADDR_EXPR, nvtbl, 0)));
  	    }
  	  assemble_external (vtbl);
  	  aref = build_array_ref (vtbl, idx);
--- 2557,2563 ----
  		(build_indirect_ref (addr, NULL_PTR),
  		 DECL_CONTEXT (CLASSTYPE_VFIELD (BINFO_TYPE (binfo))));
  	      expand_expr_stmt
! 		(build_modify_expr (ref, NOP_EXPR, nvtbl));
  	    }
  	  assemble_external (vtbl);
  	  aref = build_array_ref (vtbl, idx);


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