search.c (get_matching_virtual): Notice virtual bases when sorrying about covariant returns.

* search.c (get_matching_virtual): Notice virtual bases when sorrying
	about covariant returns.

From-SVN: r15732
This commit is contained in:
Jason Merrill 1997-09-26 15:42:46 +00:00 committed by Jason Merrill
parent c2b9a5c49d
commit 1052cd6573
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,8 @@
Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
* search.c (get_matching_virtual): Notice virtual bases when sorrying
about covariant returns.
* parse.y (member_init): Also imply typename here. Remove ancient
extension for initializing base members.

View File

@ -2197,7 +2197,8 @@ get_matching_virtual (binfo, fndecl, dtorp)
{
tree binfo = get_binfo (b, d, 1);
if (binfo != error_mark_node
&& ! BINFO_OFFSET_ZEROP (binfo))
&& (! BINFO_OFFSET_ZEROP (binfo)
|| TREE_VIA_VIRTUAL (binfo)))
sorry ("adjusting pointers for covariant returns");
}
if (TYPE_READONLY (d) > TYPE_READONLY (b))