From: Mark Mitchell Date: Fri, 20 Jun 2003 18:55:47 +0000 (+0000) Subject: re PR c++/10749 (triple nested template classes in namespace need to qualify ns) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=66d418e6579367dfd66dbbfe9f40314967962e45;p=gcc.git re PR c++/10749 (triple nested template classes in namespace need to qualify ns) PR c++/10749 * parser.c (cp_parser_class_head): See through dependent names when parsing a class-head. PR c++/10749 * g++.dg/template/memclass2.C: New test. From-SVN: r68276 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8ed6d9c2260..88c91dbe873 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2003-06-20 Mark Mitchell + PR c++/10749 + * parser.c (cp_parser_class_head): See through dependent names + when parsing a class-head. + PR c++/10845 * pt.c (try_class_unification): Correct handling of member class templates. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index ffb0bf876e1..4799944b994 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -11634,7 +11634,7 @@ cp_parser_class_head (cp_parser* parser, nested_name_specifier = cp_parser_nested_name_specifier_opt (parser, /*typename_keyword_p=*/false, - /*check_dependency_p=*/true, + /*check_dependency_p=*/false, /*type_p=*/false); /* If there was a nested-name-specifier, then there *must* be an identifier. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dbb89db6347..9d8e41097e2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-06-20 Mark Mitchell + + PR c++/10749 + * g++.dg/template/memclass2.C: New test. + 2003-06-20 Mark Mitchell Eric Botcazou diff --git a/gcc/testsuite/g++.dg/template/memclass2.C b/gcc/testsuite/g++.dg/template/memclass2.C new file mode 100644 index 00000000000..da79d6afe02 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/memclass2.C @@ -0,0 +1,20 @@ +namespace ns { + template + struct Foo { + template struct Bar; + }; + + template + template + struct Foo::Bar { + template struct Baz; + }; + + template + template + template + struct Foo::Bar::Baz { + Foo chokes; + ns::Foo works; + }; +}