Commit 2d1a618e by Jason Merrill Committed by Jason Merrill

re PR c++/42655 (! causes the qualified types for rvalue)

	PR c++/42655
	* call.c (convert_like_real): Do full decay_conversion for ck_rvalue.

From-SVN: r155913
parent 5f3e3df6
2010-01-14 Jason Merrill <jason@redhat.com>
PR c++/42655
* call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
2010-01-13 Dodji Seketeli <dodji@redhat.com> 2010-01-13 Dodji Seketeli <dodji@redhat.com>
PR c++/42634 PR c++/42634
......
...@@ -5013,7 +5013,7 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum, ...@@ -5013,7 +5013,7 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
switch (convs->kind) switch (convs->kind)
{ {
case ck_rvalue: case ck_rvalue:
expr = convert_bitfield_to_declared_type (expr); expr = decay_conversion (expr);
if (! MAYBE_CLASS_TYPE_P (totype)) if (! MAYBE_CLASS_TYPE_P (totype))
return expr; return expr;
/* Else fall through. */ /* Else fall through. */
......
2010-01-14 Jason Merrill <jason@redhat.com>
PR c++/42655
* g++.dg/overload/rvalue1.C: New.
2010-01-14 Martin Jambor <mjambor@suse.cz> 2010-01-14 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/42706 PR tree-optimization/42706
......
// PR c++/42655
void unused(const bool &) { }
int main() {
volatile bool x = false;
unused(!!x); // type of "!x" is bool
unused(!x); // type of "!x" is bool
}
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