https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60361
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Fri Aug 1 18:33:35 2014 New Revision: 213499 URL: https://gcc.gnu.org/viewcvs?rev=213499&root=gcc&view=rev Log: PR c++/60361 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID if re-parsing might succeed. * semantics.c (finish_id_expression): Use of a parameter outside the function body is a parse error. Added: branches/gcc-4_8-branch/gcc/testsuite/g++.dg/parse/ambig7.C Modified: branches/gcc-4_8-branch/gcc/cp/ChangeLog branches/gcc-4_8-branch/gcc/cp/parser.c branches/gcc-4_8-branch/gcc/cp/semantics.c branches/gcc-4_8-branch/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C branches/gcc-4_8-branch/gcc/testsuite/g++.dg/parse/typename7.C