re PR c++/42766 (tree check fail in build_expr_type_conversion)
Fix PR c++/42766 gcc/cp/ChangeLog: PR c++/42766 * cvt.c (build_expr_type_conversion): Look through OVERLOAD. gcc/testsuite/ChangeLog: PR c++/42766 * g++.dg/conversion/op6.C: New test. From-SVN: r156020
This commit is contained in:
parent
3b9e834309
commit
a5cf630e39
@ -1,3 +1,8 @@
|
|||||||
|
2010-01-18 Dodji Seketeli <dodji@redhat.com>
|
||||||
|
|
||||||
|
PR c++/42766
|
||||||
|
* cvt.c (build_expr_type_conversion): Look through OVERLOAD.
|
||||||
|
|
||||||
2010-01-17 Dodji Seketeli <dodji@redhat.com>
|
2010-01-17 Dodji Seketeli <dodji@redhat.com>
|
||||||
|
|
||||||
PR c++/42697
|
PR c++/42697
|
||||||
|
@ -1203,6 +1203,7 @@ build_expr_type_conversion (int desires, tree expr, bool complain)
|
|||||||
int win = 0;
|
int win = 0;
|
||||||
tree candidate;
|
tree candidate;
|
||||||
tree cand = TREE_VALUE (conv);
|
tree cand = TREE_VALUE (conv);
|
||||||
|
cand = OVL_CURRENT (cand);
|
||||||
|
|
||||||
if (winner && winner == cand)
|
if (winner && winner == cand)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2010-01-18 Dodji Seketeli <dodji@redhat.com>
|
||||||
|
|
||||||
|
PR c++/42766
|
||||||
|
* g++.dg/conversion/op6.C: New test.
|
||||||
|
|
||||||
2010-01-18 Uros Bizjak <ubizjak@gmail.com>
|
2010-01-18 Uros Bizjak <ubizjak@gmail.com>
|
||||||
|
|
||||||
PR target/42774
|
PR target/42774
|
||||||
|
18
gcc/testsuite/g++.dg/conversion/op6.C
Normal file
18
gcc/testsuite/g++.dg/conversion/op6.C
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// Origin: PR c++/42766
|
||||||
|
// { dg-do compile }
|
||||||
|
|
||||||
|
template<class T> class smart_pointer {
|
||||||
|
public:
|
||||||
|
operator T* () const { }
|
||||||
|
operator bool () const { }
|
||||||
|
operator bool () { }
|
||||||
|
};
|
||||||
|
class Context { };
|
||||||
|
typedef smart_pointer<Context> ContextP;
|
||||||
|
class SvnClient {
|
||||||
|
~SvnClient();
|
||||||
|
ContextP svnContext;
|
||||||
|
};
|
||||||
|
SvnClient::~SvnClient() {
|
||||||
|
delete svnContext;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user