commit 96ded20a00ed98805f6ffb5b1b7babcb15d246c5
Author: Jason Merrill <jason@redhat.com>
Date: Wed Feb 13 13:30:05 2013 -0500
PR c++/55670
* parser.c (cp_parser_member_declaration): Check the declarator
form when detecting a function declaration via typedef.
@@ -19366,6 +19366,7 @@ cp_parser_member_declaration (cp_parser* parser)
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);
new file mode 100644
@@ -0,0 +1,8 @@
+// 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; }