Commit 879fb1de by Jason Merrill Committed by Jason Merrill

typeck.c (convert_arguments): Don't handle pmf references specially.

	* typeck.c (convert_arguments): Don't handle pmf references
	specially.
	* init.c (build_member_call): Don't try to convert to the base type
	if it's ambiguous.
	* typeck2.c (check_for_new_type): Don't depend on pedantic.

From-SVN: r23338
parent 083c24ed
1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
* typeck.c (convert_arguments): Don't handle pmf references
specially.
* init.c (build_member_call): Don't try to convert to the base type
if it's ambiguous.
* typeck2.c (check_for_new_type): Don't depend on pedantic.
1998-10-25 Mark Mitchell <mark@markmitchell.com>
* decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
......
......@@ -1417,8 +1417,11 @@ build_member_call (type, name, parmlist)
decl = maybe_dummy_object (type, &basetype_path);
/* Convert 'this' to the specified type to disambiguate conversion
to the function's context. */
if (decl == current_class_ref)
to the function's context. Apparently Standard C++ says that we
shouldn't do this. */
if (decl == current_class_ref
&& ! pedantic
&& ACCESSIBLY_UNIQUELY_DERIVED_P (type, current_class_type))
{
tree olddecl = current_class_ptr;
tree oldtype = TREE_TYPE (TREE_TYPE (olddecl));
......
......@@ -3063,12 +3063,6 @@ convert_arguments (typelist, values, fndecl, flags)
error ("insufficient type information in parameter list");
val = integer_zero_node;
}
else if (TREE_CODE (val) == OFFSET_REF
&& TREE_CODE (TREE_TYPE (val)) == METHOD_TYPE)
{
/* This is unclean. Should be handled elsewhere. */
val = build_unary_op (ADDR_EXPR, val, 0);
}
else if (TREE_CODE (val) == OFFSET_REF)
val = resolve_offset_ref (val);
......
......@@ -1659,6 +1659,6 @@ check_for_new_type (string, inptree)
char *string;
flagged_type_tree inptree;
{
if (pedantic && inptree.new_type_flag)
if (inptree.new_type_flag)
pedwarn ("ANSI C++ forbids defining types within %s",string);
}
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