This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56725] extra spaces in error message
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Mar 2013 22:55:48 +0000
- Subject: [Bug c++/56725] extra spaces in error message
- Auto-submitted: auto-generated
- References: <bug-56725-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56725
Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-03-25
CC| |manu at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2013-03-25 22:55:48 UTC ---
This is because the second error is not an error but a note clarifying with
first error. In g++, some notes are "indented" because the output is such a
mess it is hard to find out stuff. The fix is to replace the second permerror
by inform like: (totally untested)
Index: gcc/cp/call.c
===================================================================
--- gcc/cp/call.c (revision 197018)
+++ gcc/cp/call.c (working copy)
@@ -5834,15 +5834,15 @@ convert_like_real (conversion *convs, tr
complain);
else if (t->kind == ck_identity)
break;
}
- permerror (loc, "invalid conversion from %qT to %qT",
- TREE_TYPE (expr), totype);
- if (fn)
- permerror (DECL_SOURCE_LOCATION (fn),
- " initializing argument %P of %qD", argnum, fn);
+ if (permerror (loc, "invalid conversion from %qT to %qT",
+ TREE_TYPE (expr), totype)
+ && fn)
+ inform (DECL_SOURCE_LOCATION (fn),
+ "when initializing argument %P of %qD", argnum, fn);
return cp_convert (totype, expr, complain);
}
if (issue_conversion_warnings && (complain & tf_warning))