diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-18 22:13:51 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-18 22:13:51 +0000 |
commit | 0ff56b20f7bbad1d5eb3b6ecc87892f4a599dc84 (patch) | |
tree | ecc843095e07dc1b31017b5dac0be52d6a946934 /gcc/cp | |
parent | 28459b250ab813f193810fd6c112556db1578909 (diff) | |
download | gcc-0ff56b20f7bbad1d5eb3b6ecc87892f4a599dc84.tar.gz |
PR c++/59296
* call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
ref-qualifier handling.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211809 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/call.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 74eefeaec1d..7e7521b750c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2014-06-18 Jason Merrill <jason@redhat.com> + PR c++/59296 + * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for + ref-qualifier handling. + PR c++/61507 * pt.c (resolve_overloaded_unification): Preserve ARGUMENT_PACK_EXPLICIT_ARGS. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 1d4c4f99e2f..b4adf363be9 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -2025,6 +2025,8 @@ add_function_candidate (struct z_candidate **candidates, object parameter has reference type. */ bool rv = FUNCTION_RVALUE_QUALIFIED (TREE_TYPE (fn)); parmtype = cp_build_reference_type (parmtype, rv); + /* Don't bind an rvalue to a const lvalue ref-qualifier. */ + lflags |= LOOKUP_NO_RVAL_BIND; } else { |