diff options
author | Marco Poletti <poletti.marco@gmail.com> | 2010-03-04 16:17:07 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2010-03-04 16:17:07 +0000 |
commit | 83ff92fb26e8ca8c4552fd0e038a15b64c2a0cea (patch) | |
tree | fe0c4666b99036eed2c6ea40e19f2996a1760fef /gcc/cp | |
parent | b2d244d15f85aafbdb040a4f46882a92e07ccf06 (diff) | |
download | gcc-83ff92fb26e8ca8c4552fd0e038a15b64c2a0cea.zip gcc-83ff92fb26e8ca8c4552fd0e038a15b64c2a0cea.tar.gz gcc-83ff92fb26e8ca8c4552fd0e038a15b64c2a0cea.tar.bz2 |
pt.c (process_partial_specialization): Use error_n instead of error.
2010-03-04 Marco Poletti <poletti.marco@gmail.com>
* pt.c (process_partial_specialization): Use error_n instead of
error.
From-SVN: r157229
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/pt.c | 17 |
2 files changed, 15 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 926bb7b..1e07230 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2010-03-04 Marco Poletti <poletti.marco@gmail.com> + + * pt.c (process_partial_specialization): Use error_n instead of + error. + 2010-03-03 Jason Merrill <jason@redhat.com> PR c++/12909 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index f5d3851..66e7d73 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -3987,16 +3987,19 @@ process_partial_specialization (tree decl) If they are fully specialized in the specialization, that's OK. */ int j; + int count = 0; for (j = 0; j < nargs; ++j) if (tpd2.parms[j] != 0 && tpd.arg_uses_template_parms [j]) - { - error ("type %qT of template argument %qE depends " - "on template parameter(s)", - type, - arg); - break; - } + ++count; + if (count != 0) + error_n (input_location, count, + "type %qT of template argument %qE depends " + "on a template parameter", + "type %qT of template argument %qE depends " + "on template parameters", + type, + arg); } } } |