PR c++/17501
* parser.c (cp_parser_nested_name_specifier): Do not resolve
typename types if the user explicitly said "typename".
PR c++/17501
* g++.dg/template/typename7.C: New test.
From-SVN: r87616
+2004-09-16 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/17501
+ * parser.c (cp_parser_nested_name_specifier): Do not resolve
+ typename types if the user explicitly said "typename".
+
2004-09-16 Andrew MacLeod <amacleod@redhat.com>
* error.c (dump_decl): Make sure there is lang_specific info before
look up names in "X<T>::I" in order to determine that "Y" is
a template. So, if we have a typename at this point, we make
an effort to look through it. */
- if (is_declaration && parser->scope
+ if (is_declaration
+ && !typename_keyword_p
+ && parser->scope
&& TREE_CODE (parser->scope) == TYPENAME_TYPE)
parser->scope = resolve_typename_type (parser->scope,
/*only_current_p=*/false);
+2004-09-16 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/17501
+ * g++.dg/template/typename7.C: New test.
+
2004-09-16 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
* gcc.dg/tree-ssa/copy-headers.c: Update outcome.
--- /dev/null
+// PR c++/17501
+
+template<int> struct A;
+
+template<> struct A<0>
+{
+ struct B
+ {
+ struct C
+ {
+ typedef int D;
+ };
+ };
+};
+
+template<int I> struct E
+{
+ typename A<I>::B::C::D i;
+};