aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-06-20 18:55:47 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-06-20 18:55:47 +0000
commit66d418e6579367dfd66dbbfe9f40314967962e45 (patch)
treecbcc2ec661fb3fe235fb8ac1014fe7072ee8094e
parenta3424f5c1e409cf8d7e9c0d7372a0a223a33eade (diff)
downloadgcc-66d418e6579367dfd66dbbfe9f40314967962e45.zip
gcc-66d418e6579367dfd66dbbfe9f40314967962e45.tar.gz
gcc-66d418e6579367dfd66dbbfe9f40314967962e45.tar.bz2
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
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/parser.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/template/memclass2.C20
4 files changed, 30 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8ed6d9c..88c91db 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2003-06-20 Mark Mitchell <mark@codesourcery.com>
+ 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 ffb0bf8..4799944 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 dbb89db..9d8e410 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,4 +1,9 @@
2003-06-20 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/10749
+ * g++.dg/template/memclass2.C: New test.
+
+2003-06-20 Mark Mitchell <mark@codesourcery.com>
Eric Botcazou <ebotcazou@libertysurf.fr>
* lib/gcc-dg.exp (dg-xfail-if): Do not process conditional xfail
diff --git a/gcc/testsuite/g++.dg/template/memclass2.C b/gcc/testsuite/g++.dg/template/memclass2.C
new file mode 100644
index 0000000..da79d6a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/memclass2.C
@@ -0,0 +1,20 @@
+namespace ns {
+ template<typename T>
+ struct Foo {
+ template<typename U> struct Bar;
+ };
+
+ template<typename T>
+ template<typename U>
+ struct Foo<T>::Bar {
+ template<typename V> struct Baz;
+ };
+
+ template<typename T>
+ template<typename U>
+ template<typename V>
+ struct Foo<T>::Bar<U>::Baz {
+ Foo<T> chokes;
+ ns::Foo<T> works;
+ };
+}