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
This commit is contained in:
parent
9e0baa6041
commit
144e414d26
|
@ -1,5 +1,9 @@
|
||||||
2004-01-16 Mark Mitchell <mark@codesourcery.com>
|
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
|
PR c++/13478
|
||||||
* call.c (initialize_reference): Pass -1 for inner parameter to
|
* call.c (initialize_reference): Pass -1 for inner parameter to
|
||||||
convert_like_real.
|
convert_like_real.
|
||||||
|
|
|
@ -4986,6 +4986,15 @@ name_as_c_string (tree name, tree type, bool *free_p)
|
||||||
*free_p = true;
|
*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
|
else
|
||||||
pretty_name = (char *) IDENTIFIER_POINTER (name);
|
pretty_name = (char *) IDENTIFIER_POINTER (name);
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2004-01-16 J"orn Rennecke <joern.rennecke@superh.com>
|
||||||
|
|
||||||
PR 10392
|
PR 10392
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
class C
|
||||||
|
{
|
||||||
|
template<typename U>
|
||||||
|
operator U();
|
||||||
|
};
|
||||||
|
|
||||||
|
int fn (C c)
|
||||||
|
{
|
||||||
|
return C::operator float(c); // { dg-error "operator U" }
|
||||||
|
}
|
Loading…
Reference in New Issue