PR c++/55670
* parser.c (cp_parser_member_declaration): Check the declarator
form when detecting a function declaration via typedef.
From-SVN: r196043
2013-02-13 Jason Merrill <jason@redhat.com>
+ PR c++/55670
+ * parser.c (cp_parser_member_declaration): Check the declarator
+ form when detecting a function declaration via typedef.
+
PR c++/55680
* pt.c (maybe_process_partial_specialization): A lambda
isn't what's being specialized.
if (function_declarator_p (declarator)
|| (decl_specifiers.type
&& TREE_CODE (decl_specifiers.type) == TYPE_DECL
+ && declarator->kind == cdk_id
&& (TREE_CODE (TREE_TYPE (decl_specifiers.type))
== FUNCTION_TYPE)))
initializer = cp_parser_pure_specifier (parser);
--- /dev/null
+// PR c++/55670
+// { dg-do compile { target c++11 } }
+
+template <class T> using F = T;
+struct X {
+ F<void ()>* fp = nullptr;
+};
+int main () { return 0; }