re PR c++/60065 ([c++1y] ICE with auto parameter pack)
authorAdam Butcher <adam@jessamine.co.uk>
Tue, 25 Feb 2014 03:47:24 +0000 (03:47 +0000)
committerAdam Butcher <abutcher@gcc.gnu.org>
Tue, 25 Feb 2014 03:47:24 +0000 (03:47 +0000)
commit81493f78875ef6e1714d51cb2f3864689835e0e2
tree5d4911d0be0ea6573b033ff26f5357862efa7b19
parent325fefe0464b35ded3747e5a77f1e005562392ee
re PR c++/60065 ([c++1y] ICE with auto parameter pack)

Fix PR c++/60065.

PR c++/60065
* parser.c (cp_parser_direct_declarator): Don't save and
restore num_template_parameter_lists around call to
cp_parser_parameter_declaration_list.
(function_being_declared_is_template_p): New predicate.
(cp_parser_parameter_declaration_list): Use
function_being_declared_is_template_p as predicate for
inspecting current function template parameter list length
rather than num_template_parameter_lists.

PR c++/60065
* g++.dg/cpp1y/pr60065.C: New testcase.

From-SVN: r208106
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/pr60065.C [new file with mode: 0644]