re PR c++/27665 (ICE writing class instead of typename)

PR c++/27665
	* parser.c (cp_parser_unqualified_id): Use constructor_name_p to
	identify destructors.
	(cp_parser_nested_name_specifier_opt): Remove invalid
	optimization.
	(cp_parser_template_id): Refine heuristic for determining whether
	we are entering a scope.
	PR c++/27665
	* g++.dg/template/crash52.C: New test.

From-SVN: r114669
This commit is contained in:
Mark Mitchell 2006-06-15 03:51:51 +00:00 committed by Mark Mitchell
parent 0c926bff30
commit 4c4e648c76
3 changed files with 30 additions and 0 deletions

View File

@ -1,5 +1,13 @@
2006-06-14 Mark Mitchell <mark@codesourcery.com>
PR c++/27665
* parser.c (cp_parser_unqualified_id): Use constructor_name_p to
identify destructors.
(cp_parser_nested_name_specifier_opt): Remove invalid
optimization.
(cp_parser_template_id): Refine heuristic for determining whether
we are entering a scope.
PR c++/27648
* parser.c (cp_parser_declarator): Robustify.

View File

@ -1,5 +1,8 @@
2006-06-14 Mark Mitchell <mark@codesourcery.com>
PR c++/27665
* g++.dg/template/crash52.C: New test.
PR c++/27648
* g++.dg/ext/attrib22.C: New test.

View File

@ -0,0 +1,19 @@
// PR c++/27665
template<int> struct A
{
struct B
{
struct C {};
};
};
template<int N> void foo()
{
class A<N>::B::C X;
}
void bar()
{
foo<0>();
}