2008-07-18 Dodji Seketeli <dseketel@redhat.com>
PR c++/36407
* call.c (convert_like_real): Don't take the error code path
when a rvalue or base conversion has the bad_p field set.
From-SVN: r137966
+2008-07-18 Dodji Seketeli <dseketel@redhat.com>
+
+ PR c++/36407
+ * call.c (convert_like_real): Don't take the error code path
+ when a rvalue or base conversion has the bad_p field set.
+
2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
* rtti.c (emit_support_tinfos): Add char16_type_node and
if (convs->bad_p
&& convs->kind != ck_user
&& convs->kind != ck_ambig
- && convs->kind != ck_ref_bind)
+ && convs->kind != ck_ref_bind
+ && convs->kind != ck_rvalue
+ && convs->kind != ck_base)
{
conversion *t = convs;
for (; t; t = convs->u.next)
+2008-07-18 Dodji Seketeli <dseketel@redhat.com>
+
+ PR c++/36407
+ * g++.dg/conversion/op5.C: New testcase.
+
2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
Tests for char16_t and char32_t support.
--- /dev/null
+// Contributed by Dodji Seketeli <dseketel@redhat.com>
+// Origin: PR c++/36407
+// { dg-do compile }
+
+struct A
+{
+ A (const A&);
+};
+
+struct B
+{
+ operator A&();
+};
+
+void
+foo (const B& b)
+{
+ const A a = b; // { dg-error "conversion from 'const B' to non-scalar type 'const A' requested" }
+}
+