aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-01-14 16:26:47 -0500
committerJason Merrill <jason@gcc.gnu.org>2011-01-14 16:26:47 -0500
commitaeb459fbd1216642787784587ed45bac5c3f17c3 (patch)
tree07dcec49609ebb9f1cc807b0eee8af71bc90c416 /gcc/cp
parenteb5bb0fd0b6c96b1be18145c0134860fedac2b1a (diff)
downloadgcc-aeb459fbd1216642787784587ed45bac5c3f17c3.zip
gcc-aeb459fbd1216642787784587ed45bac5c3f17c3.tar.gz
gcc-aeb459fbd1216642787784587ed45bac5c3f17c3.tar.bz2
re PR c++/47289 ([C++0x] ICE in tsubst_pack_expansion (triggered by decltype))
PR c++/47289 * pt.c (coerce_template_parms): Fix error recovery. From-SVN: r168822
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/pt.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 428ec29b..22f5bf0 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2011-01-14 Jason Merrill <jason@redhat.com>
+ PR c++/47289
+ * pt.c (coerce_template_parms): Fix error recovery.
+
PR c++/46903
* typeck2.c (check_narrowing): Only check arithmetic types.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 54c1a59..16bd2a0 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -6410,7 +6410,7 @@ coerce_template_parms (tree parms,
sorry ("cannot expand %<%T%> into a fixed-length "
"argument list", arg);
}
- return error_mark_node;
+ ++lost;
}
}
else if (require_all_args)
@@ -6438,7 +6438,7 @@ coerce_template_parms (tree parms,
reported) that we are trying to recover from, e.g., a class
template with a parameter list such as
template<typename..., typename>. */
- return error_mark_node;
+ ++lost;
else
arg = convert_template_argument (TREE_VALUE (parm),
arg, new_args, complain,