[Bug c++/49458] [C++0x] Obvious candidate for conversion to function lvalue rejected

2011-09-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49458

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org 2011-09-05 
04:33:54 UTC ---
Author: jason
Date: Mon Sep  5 04:33:48 2011
New Revision: 178520

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=178520
Log:
PR c++/49267
PR c++/49458
DR 1328
* call.c (reference_binding): Set rvaluedness_matches_p properly
for reference to function conversion ops.
(compare_ics): Adjust.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/rv-conv1.C
trunk/gcc/testsuite/g++.dg/cpp0x/rv-func3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/49458] [C++0x] Obvious candidate for conversion to function lvalue rejected

2011-06-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49458

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.06.17 20:44:28
 CC||jason at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #1 from Jason Merrill jason at gcc dot gnu.org 2011-06-17 
20:44:28 UTC ---
I agree that #2 should be a candidate, since it returns a function lvalue, and
frvref can bind to a function lvalue.  That is a bug.

I also agree with your interpretation of the standard on the other points, but
that seems unintentional, so I'm going to raise the issue with the committee.


[Bug c++/49458] [C++0x] Obvious candidate for conversion to function lvalue rejected

2011-06-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49458

--- Comment #2 from Jason Merrill jason at gcc dot gnu.org 2011-06-18 
05:58:42 UTC ---
Author: jason
Date: Sat Jun 18 05:58:38 2011
New Revision: 175164

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=175164
Log:
PR c++/49458
* call.c (convert_class_to_reference_1): Allow binding function
lvalue to rvalue reference.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/rv-func2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog