summaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-18 23:14:01 +0000
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-18 23:14:01 +0000
commit9e0a6903b2dd0d75f4ae17b64c4a47aac37ee03a (patch)
treefa4e131e26a1ce6f2f7de411de613d597b36a2f7 /gcc/cp/error.c
parent2c5df29d851452254c74c1a86f749a7e2813b8d3 (diff)
downloadgcc-9e0a6903b2dd0d75f4ae17b64c4a47aac37ee03a.tar.gz
Revert fix of PR c++/
gcc/cp/ChangeLog: * error.c (dump_template_parms, count_non_default_template_args): Revert fix of PR c++/42634. gcc/testsuite/ChangeLog: * g++.dg/template/error45.C: reverted as part of reverting the fix of PR c++/42634. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156026 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 54e96810f9b..e0e5ae52ceb 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -165,7 +165,8 @@ dump_template_argument (tree arg, int flags)
static int
count_non_default_template_args (tree args, tree params, int flags)
{
- int n = TREE_VEC_LENGTH (args);
+ tree inner_args = INNERMOST_TEMPLATE_ARGS (args);
+ int n = TREE_VEC_LENGTH (inner_args);
int last;
if (params == NULL_TREE
@@ -194,7 +195,7 @@ count_non_default_template_args (tree args, tree params, int flags)
NULL_TREE, false, true);
--processing_template_decl;
}
- if (!cp_tree_equal (TREE_VEC_ELT (args, last), def))
+ if (!cp_tree_equal (TREE_VEC_ELT (inner_args, last), def))
break;
}
@@ -1491,9 +1492,9 @@ dump_template_parms (tree info, int primary, int flags)
? DECL_INNERMOST_TEMPLATE_PARMS (TI_TEMPLATE (info))
: NULL_TREE);
- args = INNERMOST_TEMPLATE_ARGS (args);
len = count_non_default_template_args (args, params, flags);
+ args = INNERMOST_TEMPLATE_ARGS (args);
for (ix = 0; ix != len; ix++)
{
tree arg = TREE_VEC_ELT (args, ix);