This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: PR 19755
Eric Botcazou wrote:
Tested on x86_64-unknown-linux-gnu, applied on the mainline and on the
3.4 branch.
It doesn't work correctly on the 3.4 branch:
FAIL: g++.old-deja/g++.jason/rfg12.C (test for excess errors)
FAIL: g++.old-deja/g++.law/init4.C (test for excess errors)
Thanks. I forgot to switch "%q" for the old-style quoting.
Fixed with the attached patch.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304
2005-02-14 Mark Mitchell <mark@codesourcery.com>
* decl.c (reshape_init): Use explicit quotes in error message
instead of %q.
Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1174.2.30
diff -c -5 -p -r1.1174.2.30 decl.c
*** decl.c 11 Feb 2005 17:20:01 -0000 1.1174.2.30
--- decl.c 14 Feb 2005 18:59:28 -0000
*************** reshape_init (tree type, tree *initp)
*** 4445,4455 ****
/* If there are more initializers than necessary, issue a
diagnostic. */
if (*initp)
{
if (brace_enclosed_p)
! error ("too many initializers for %qT", type);
else if (warn_missing_braces)
warning ("missing braces around initializer");
}
return new_init;
--- 4445,4455 ----
/* If there are more initializers than necessary, issue a
diagnostic. */
if (*initp)
{
if (brace_enclosed_p)
! error ("too many initializers for `%T'", type);
else if (warn_missing_braces)
warning ("missing braces around initializer");
}
return new_init;