Commit e76e4a68 by Jason Merrill Committed by Jason Merrill

* search.c (covariant_return_p): Complain about ambiguous base.

From-SVN: r20420
parent d60ab851
1998-06-10 Jason Merrill <jason@yorick.cygnus.com> 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
* search.c (covariant_return_p): Complain about ambiguous base.
* typeck.c (build_component_ref): Diagnose ref to nested type. * typeck.c (build_component_ref): Diagnose ref to nested type.
1998-06-10 Brendan Kehoe <brendan@cygnus.com> 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
......
...@@ -2205,7 +2205,12 @@ covariant_return_p (brettype, drettype) ...@@ -2205,7 +2205,12 @@ covariant_return_p (brettype, drettype)
if (! IS_AGGR_TYPE (drettype) || ! IS_AGGR_TYPE (brettype)) if (! IS_AGGR_TYPE (drettype) || ! IS_AGGR_TYPE (brettype))
return -1; return -1;
binfo = get_binfo (brettype, drettype, 0); binfo = get_binfo (brettype, drettype, 1);
/* If we get an error_mark_node from get_binfo, it already complained,
so let's just succeed. */
if (binfo == error_mark_node)
return 1;
if (! BINFO_OFFSET_ZEROP (binfo) || TREE_VIA_VIRTUAL (binfo)) if (! BINFO_OFFSET_ZEROP (binfo) || TREE_VIA_VIRTUAL (binfo))
return 2; return 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment