PR c++/49823
* parser.c (cp_parser_qualifying_entity): Handle templates.
From-SVN: r176732
+2011-07-23 Jason Merrill <jason@redhat.com>
+
+ PR c++/49823
+ * parser.c (cp_parser_qualifying_entity): Handle templates.
+
2011-07-22 Jason Merrill <jason@redhat.com>
PR c++/49793
cp_parser_simulate_error (parser);
return error_mark_node;
}
- return TYPE_NAME (scope);
+ if (TYPE_NAME (scope))
+ scope = TYPE_NAME (scope);
+ return scope;
}
/* Before we try to parse the class-name, we must save away the
+2011-07-23 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/decltype21.C: Add 49823 examples.
+
2011-07-22 Jason Merrill <jason@redhat.com>
PR c++/49793
decltype(make<p>())::t t;
+// PR c++/49823
+
+template < typename T >
+auto f( const T &x )
+ -> typename decltype( x )::type; // ICE on here
+
+template < typename T >
+typename decltype( T{} )::type // ICE on here
+f( T );
+
+template < typename T >
+void f( T x )
+{ typename decltype( x )::type t; } // ICE on here
+
+// Negative tests
+
int f();
decltype(f())::t t2; // { dg-error "not a class" }