Commit b057bff4 by Dodji Seketeli Committed by Dodji Seketeli

re PR c++/46824 (chromium-compile failed because error: no match for ‘operator*’ in)

PR c++/46824

gcc/cp/

	* call.c (add_builtin_candidate)<case INDIRECT_REF>: The type
	of the argument of the indirection operator should not be
	dependent.  Fix the comment.

gcc/testsuite/

	* g++.dg/conversion/cast3.C: New test.

From-SVN: r170897
parent ba7d31f6
2011-03-11 Dodji Seketeli <dodji@redhat.com>
* call.c (add_builtin_candidate)<case INDIRECT_REF>: The type of
the argument of the indirection operator should not be dependent.
Fix the comment.
2011-03-11 Jason Merrill <jason@redhat.com>
PR c++/47125
......
......@@ -2150,7 +2150,7 @@ add_builtin_candidate (struct z_candidate **candidates, enum tree_code code,
}
return;
/* 7 For every cv-qualified or cv-unqualified complete object type T, there
/* 7 For every cv-qualified or cv-unqualified object type T, there
exist candidate operator functions of the form
T& operator*(T*);
......@@ -2161,7 +2161,7 @@ add_builtin_candidate (struct z_candidate **candidates, enum tree_code code,
case INDIRECT_REF:
if (TREE_CODE (type1) == POINTER_TYPE
&& is_complete (TREE_TYPE (type1))
&& !uses_template_parms (TREE_TYPE (type1))
&& (TYPE_PTROB_P (type1)
|| TREE_CODE (TREE_TYPE (type1)) == FUNCTION_TYPE))
break;
......
2011-03-11 Dodji Seketeli <dodji@redhat.com>
* g++.dg/conversion/cast3.C: New test.
2011-03-11 Jason Merrill <jason@redhat.com>
* g++.dg/template/error45.C: New.
......
// Origin: PR c++/46824
class Incomplete;
struct Ptr
{
operator Incomplete*();
};
int
main()
{
Ptr p;
*p;
}
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