Commit 144e414d by Mark Mitchell Committed by Mark Mitchell

re PR c++/13178 (Bogus C++ error message referring to operator 1)

	PR c++/13178
	* call.c (name_as_c_string): Print conversion operator names
	correctly.

	PR c++/13178
	* g++.dg/conversion/op1.C: New test.

From-SVN: r75986
parent 9e0baa60
2004-01-16 Mark Mitchell <mark@codesourcery.com>
PR c++/13178
* call.c (name_as_c_string): Print conversion operator names
correctly.
PR c++/13478
* call.c (initialize_reference): Pass -1 for inner parameter to
convert_like_real.
......
......@@ -4986,6 +4986,15 @@ name_as_c_string (tree name, tree type, bool *free_p)
*free_p = true;
}
}
else if (IDENTIFIER_TYPENAME_P (name))
{
pretty_name = concat ("operator ",
type_as_string (TREE_TYPE (name),
TFF_PLAIN_IDENTIFIER),
NULL);
/* Remember that we need to free the memory allocated. */
*free_p = true;
}
else
pretty_name = (char *) IDENTIFIER_POINTER (name);
......
2004-01-16 Mark Mitchell <mark@codesourcery.com>
PR c++/13178
* g++.dg/conversion/op1.C: New test.
2004-01-16 J"orn Rennecke <joern.rennecke@superh.com>
PR 10392
......
class C
{
template<typename U>
operator U();
};
int fn (C c)
{
return C::operator float(c); // { dg-error "operator U" }
}
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