+2005-10-08 James A. Morrison <phython@gcc.gnu.org>
+
+ PR c++/22172
+ * parser.c (cp_parser_postfix_expression) <RID_TYPENAME>: Treat nontype
+ scopes as nondependent.
+
2005-10-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* call.c (resolve_args): Remove redundant test.
return error_mark_node;
/* If we look up a template-id in a non-dependent qualifying
scope, there's no need to create a dependent type. */
- else if (TREE_CODE (id) == TYPE_DECL
- && !dependent_type_p (parser->scope))
+ if (TREE_CODE (id) == TYPE_DECL
+ && (!TYPE_P (scope)
+ || !dependent_type_p (parser->scope)))
type = TREE_TYPE (id);
/* Create a TYPENAME_TYPE to represent the type to which the
functional cast is being performed. */
+2005-10-08 James A. Morrison <phython@gcc.gnu.org>
+
+ PR c++/22172
+ * g++.dg/parse/crash30.C: New test.
+
2005-10-07 Richard Guenther <rguenther@suse.de>
PR middle-end/24227
--- /dev/null
+// { dg-do compile }
+namespace N { template<int> struct A { operator int() const; }; }
+namespace M { template<int> struct A {}; }
+namespace P { typedef int I; }
+
+template<typename> void foo()
+{
+ +typename N::A<0>(); // { dg-bogus "expected" }
+}
+
+template<typename> void bar()
+{
+ +typename M::A<0>; // { dg-error "expected" }
+}
+
+template<typename T> void baz() {
+ typename P::I i; // { dg-bogus "expected" }
+}