Commit 6b3a665c by Dodji Seketeli Committed by Dodji Seketeli

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
parent c466b2cd
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)
......
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.
......
// 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" }
}
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