re PR c++/36407 (ICE with conversion and -fpermissive)
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
This commit is contained in:
parent
c466b2cd13
commit
6b3a665caf
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -4510,7 +4510,9 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
|
|||
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)
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
// 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" }
|
||||
}
|
||||
|
Loading…
Reference in New Issue