aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2013-03-28 10:00:05 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2013-03-28 10:00:05 +0000
commit129677c1cf80e2fe333d21dbcfec8ca4e0a39d4e (patch)
tree25f7029eb5c55cf70bef65e257ea1c7614a325ec /gcc/cp/call.c
parenta64b9c261d9d2c12b98bd14f5f1bf27e3bcb6bdd (diff)
downloadgcc-129677c1cf80e2fe333d21dbcfec8ca4e0a39d4e.zip
gcc-129677c1cf80e2fe333d21dbcfec8ca4e0a39d4e.tar.gz
gcc-129677c1cf80e2fe333d21dbcfec8ca4e0a39d4e.tar.bz2
call.c (joust): Don't call inform for a permerror returning false.
2013-03-28 Paolo Carlini <paolo.carlini@oracle.com> * call.c (joust): Don't call inform for a permerror returning false. * parser.c (cp_parser_check_class_key): Likewise. * pt.c (tsubst_copy_and_build): Likewise. From-SVN: r197190
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 67d8b81..cff653f 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -8650,13 +8650,15 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn,
{
if (complain & tf_error)
{
- permerror (input_location,
- "default argument mismatch in "
- "overload resolution");
- inform (input_location,
- " candidate 1: %q+#F", cand1->fn);
- inform (input_location,
- " candidate 2: %q+#F", cand2->fn);
+ if (permerror (input_location,
+ "default argument mismatch in "
+ "overload resolution"))
+ {
+ inform (input_location,
+ " candidate 1: %q+#F", cand1->fn);
+ inform (input_location,
+ " candidate 2: %q+#F", cand2->fn);
+ }
}
else
return 0;