search.c (expand_upcast_vtables): In addition to unsetting TREE_READONLY, remove top-level const type qualifier.

* search.c (expand_upcast_vtables): In addition to unsetting
	TREE_READONLY, remove top-level const type qualifier.

From-SVN: r22808
This commit is contained in:
Mark Mitchell 1998-10-04 11:17:08 +00:00 committed by Mark Mitchell
parent 295c5559cc
commit 6396c3a579
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
1998-10-04 Mark Mitchell <mark@markmitchell.com>
* search.c (expand_upcast_vtables): In addition to unsetting
TREE_READONLY, remove top-level const type qualifier.
1998-10-03 Mark Mitchell <mark@markmitchell.com>
* class.c (current_class_ptr, current_class_ref): Clarify

View File

@ -2588,6 +2588,9 @@ expand_upcast_fixups (binfo, addr, orig_addr, vbase, vbase_addr, t,
}
TREE_READONLY (new_delta) = 0;
TREE_TYPE (new_delta) =
cp_build_type_variant (TREE_TYPE (new_delta), /*constp=*/0,
TYPE_VOLATILE (TREE_TYPE (new_delta)));
expand_expr_stmt (build_modify_expr (new_delta, NOP_EXPR,
old_delta));
}