aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2018-07-16 17:36:43 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2018-07-16 17:36:43 +0000
commit99422caabd1d46992de8e373f3131efe84e03bcc (patch)
treecf62dbc86063eab7deb46035983acf122527bfc7 /gcc/cp/class.c
parent20b47be02cc8a1bde28519b496a5acea5419c995 (diff)
downloadgcc-99422caabd1d46992de8e373f3131efe84e03bcc.zip
gcc-99422caabd1d46992de8e373f3131efe84e03bcc.tar.gz
gcc-99422caabd1d46992de8e373f3131efe84e03bcc.tar.bz2
class.c (resolve_address_of_overloaded_function): Don't emit an inform if the matching permerror returns false.
/cp 2018-07-16 Paolo Carlini <paolo.carlini@oracle.com> * class.c (resolve_address_of_overloaded_function): Don't emit an inform if the matching permerror returns false. * pt.c (check_specialization_namespace): Likewise. /testsuite 2018-07-16 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/template/spec40.C: New. * g++.dg/parse/ptrmem8.C: Likewise. From-SVN: r262740
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 8d8339c..3d155a5 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -7919,10 +7919,11 @@ resolve_address_of_overloaded_function (tree target_type,
if (!(complain & tf_error))
return error_mark_node;
- permerror (input_location, "assuming pointer to member %qD", fn);
- if (!explained)
+ if (permerror (input_location, "assuming pointer to member %qD", fn)
+ && !explained)
{
- inform (input_location, "(a pointer to member can only be formed with %<&%E%>)", fn);
+ inform (input_location, "(a pointer to member can only be "
+ "formed with %<&%E%>)", fn);
explained = 1;
}
}