aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2017-09-30 17:00:32 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2017-09-30 17:00:32 +0000
commit333cb61200ca99b916a71e989e25cf68a6ab597a (patch)
tree4563be93ea2887cfdfbf160bdea3cacbdca47b12 /gcc/cp/method.c
parent15c77315001af0842a537ff748d1a0995ad38545 (diff)
downloadgcc-333cb61200ca99b916a71e989e25cf68a6ab597a.zip
gcc-333cb61200ca99b916a71e989e25cf68a6ab597a.tar.gz
gcc-333cb61200ca99b916a71e989e25cf68a6ab597a.tar.bz2
re PR c++/68754 (Explicitly defaulted constexpr assignment operator fails to compile)
/cp 2017-09-30 Paolo Carlini <paolo.carlini@oracle.com> PR c++/68754 * method.c (defaulted_late_check): Early return if the defaulted declaration does not match the expected signature. /testsuite 2017-09-30 Paolo Carlini <paolo.carlini@oracle.com> PR c++/68754 * g++.dg/cpp1y/constexpr-68754.C: Move... * g++.dg/cpp0x/constexpr-68754.C: ... here, adjust. From-SVN: r253321
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index b83a6f2..7788afb 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -2191,9 +2191,11 @@ defaulted_late_check (tree fn)
|| !compparms (TYPE_ARG_TYPES (TREE_TYPE (fn)),
TYPE_ARG_TYPES (TREE_TYPE (implicit_fn))))
{
- error ("defaulted declaration %q+D", fn);
- error_at (DECL_SOURCE_LOCATION (fn),
- "does not match expected signature %qD", implicit_fn);
+ error ("defaulted declaration %q+D does not match the "
+ "expected signature", fn);
+ inform (DECL_SOURCE_LOCATION (fn),
+ "expected signature: %qD", implicit_fn);
+ return;
}
if (DECL_DELETED_FN (implicit_fn))