Commit b8887b63 by Jason Merrill Committed by Jason Merrill

tree.c (is_overloaded_fn): Don't abort on placeholders from push_class_decls.

	* tree.c (is_overloaded_fn): Don't abort on placeholders from
	push_class_decls.

From-SVN: r19888
parent f85c8be7
Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
* tree.c (is_overloaded_fn): Don't abort on placeholders from
push_class_decls.
Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com> Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
* class.c (is_empty_class): Return 0 if TYPE is an error_mark_node. * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
......
...@@ -3495,7 +3495,11 @@ dfs_pushdecls (binfo) ...@@ -3495,7 +3495,11 @@ dfs_pushdecls (binfo)
If we can't do that, keep a TREE_LIST with possibly ambiguous If we can't do that, keep a TREE_LIST with possibly ambiguous
decls in there. */ decls in there. */
maybe_push_cache_obstack (); maybe_push_cache_obstack ();
envelope_add_decl (type, OVL_CURRENT (*methods), &TREE_PURPOSE (class_value)); /* Arbitrarily choose the first function in the list. This is OK
because this is only used for initial lookup; anything that
actually uses the function will look it up again. */
envelope_add_decl (type, OVL_CURRENT (*methods),
&TREE_PURPOSE (class_value));
pop_obstacks (); pop_obstacks ();
methods++; methods++;
......
...@@ -1311,10 +1311,13 @@ int ...@@ -1311,10 +1311,13 @@ int
is_overloaded_fn (x) is_overloaded_fn (x)
tree x; tree x;
{ {
/* XXX A baselink is also considered an overloaded function. */ /* XXX A baselink is also considered an overloaded function.
As is a placeholder from push_class_decls. */
if (TREE_CODE (x) == TREE_LIST) if (TREE_CODE (x) == TREE_LIST)
{ {
my_friendly_assert (TREE_CODE (TREE_PURPOSE (x)) == TREE_VEC, 388); my_friendly_assert (TREE_CODE (TREE_PURPOSE (x)) == TREE_VEC
|| TREE_CODE (TREE_PURPOSE (x)) == IDENTIFIER_NODE,
388);
x = TREE_VALUE (x); x = TREE_VALUE (x);
} }
return (TREE_CODE (x) == FUNCTION_DECL return (TREE_CODE (x) == FUNCTION_DECL
......
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