Commit 28d5c777 by Jason Merrill Committed by Jason Merrill

re PR c++/55670 ([C++11] This isn't a pure virtual method.)

	PR c++/55670
	* parser.c (cp_parser_member_declaration): Check the declarator
	form when detecting a function declaration via typedef.

From-SVN: r196043
parent e75e98f2
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.
......
......@@ -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);
......
// 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; }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment