aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2015-05-21 20:50:45 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2015-05-21 20:50:45 +0000
commit9ab2fcc16d674a876364159f5daa2258b42e6bb0 (patch)
treed1c5107042dee7795f8c4d6735e86e94315b20b6 /gcc/cp
parentd51a6714b93b8a3c85e69003d74782140cd9b763 (diff)
downloadgcc-9ab2fcc16d674a876364159f5daa2258b42e6bb0.zip
gcc-9ab2fcc16d674a876364159f5daa2258b42e6bb0.tar.gz
gcc-9ab2fcc16d674a876364159f5daa2258b42e6bb0.tar.bz2
re PR c++/60943 ([C++14] Return type deduction interferes with ref-qualifiers)
cp/ PR c++/60943 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED. testsuite/ * g++.dg/cpp1y/pr60943.C: New. From-SVN: r223502
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/decl2.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6460314..f9ede2d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-21 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/60943
+ * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
+
2015-05-21 Marek Polacek <polacek@redhat.com>
* typeck.c (warn_args_num): Don't print "declare here" for builtins.
@@ -14,7 +19,7 @@
(build_op_delete_call): Warn about size_t placement delete with
-Wc++14-compat.
-2015-05-19 Nathan sidwell <nathan@acm.org>
+2015-05-19 Nathan Sidwell <nathan@acm.org>
PR c++/65954
* typeck.c (finish_class_member_access_expr): Diagnose failed
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 27bacab..f1b3d0c 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -195,6 +195,8 @@ change_return_type (tree new_ret, tree fntype)
else
newtype = build_method_type_directly
(class_of_this_parm (fntype), new_ret, TREE_CHAIN (args));
+ if (FUNCTION_REF_QUALIFIED (fntype))
+ newtype = build_ref_qualified_type (newtype, type_memfn_rqual (fntype));
if (raises)
newtype = build_exception_variant (newtype, raises);
if (attrs)