diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2011-09-27 01:56:17 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2011-09-27 01:56:17 +0000 |
commit | ca17c07b4504b72788afdb4cb0d774264c2470b7 (patch) | |
tree | 587369bfe4822d2f41d58f39b04835d3af207110 /gcc/cp | |
parent | ab02e565e41ea6356b9e23fac196de6da787718f (diff) | |
download | gcc-ca17c07b4504b72788afdb4cb0d774264c2470b7.zip gcc-ca17c07b4504b72788afdb4cb0d774264c2470b7.tar.gz gcc-ca17c07b4504b72788afdb4cb0d774264c2470b7.tar.bz2 |
re PR c++/45487 (Request to change comma to semicolon in error message)
/cp
2011-09-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/45487
* error.c (dump_template_bindings): Separate bindings with semicolons
instead of commas.
/testsuite
2011-09-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/45487
* g++.dg/diagnostic/bindings1.C: New.
* g++.old-deja/g++.pt/memtemp77.C: Adjust.
From-SVN: r179226
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/error.c | 13 |
2 files changed, 13 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d1c7946..9de69c8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2011-09-26 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/45487 + * error.c (dump_template_bindings): Separate bindings with semicolons + instead of commas. + 2011-09-26 Jason Merrill <jason@redhat.com> PR c++/50512 diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 392f304..4d12a0d 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see #include "c-family/c-objc.h" #define pp_separate_with_comma(PP) pp_cxx_separate_with (PP, ',') +#define pp_separate_with_semicolon(PP) pp_cxx_separate_with (PP, ';') /* The global buffer where we dump everything. It is there only for transitional purpose. It is expected, in the near future, to be @@ -259,7 +260,7 @@ dump_template_parameter (tree parm, int flags) static void dump_template_bindings (tree parms, tree args, VEC(tree,gc)* typenames) { - int need_comma = 0; + bool need_semicolon = false; int i; tree t; @@ -283,8 +284,8 @@ dump_template_bindings (tree parms, tree args, VEC(tree,gc)* typenames) if (lvl_args && NUM_TMPL_ARGS (lvl_args) > arg_idx) arg = TREE_VEC_ELT (lvl_args, arg_idx); - if (need_comma) - pp_separate_with_comma (cxx_pp); + if (need_semicolon) + pp_separate_with_semicolon (cxx_pp); dump_template_parameter (TREE_VEC_ELT (p, i), TFF_PLAIN_IDENTIFIER); pp_cxx_whitespace (cxx_pp); pp_equal (cxx_pp); @@ -301,7 +302,7 @@ dump_template_bindings (tree parms, tree args, VEC(tree,gc)* typenames) pp_string (cxx_pp, M_("<missing>")); ++arg_idx; - need_comma = 1; + need_semicolon = true; } parms = TREE_CHAIN (parms); @@ -313,8 +314,8 @@ dump_template_bindings (tree parms, tree args, VEC(tree,gc)* typenames) FOR_EACH_VEC_ELT (tree, typenames, i, t) { - if (need_comma) - pp_separate_with_comma (cxx_pp); + if (need_semicolon) + pp_separate_with_semicolon (cxx_pp); dump_type (t, TFF_PLAIN_IDENTIFIER); pp_cxx_whitespace (cxx_pp); pp_equal (cxx_pp); |