Commit d1f45df5 by Jason Merrill Committed by Jason Merrill

decl.c (grokdeclarator): Assert that we won't see a pointer to METHOD_TYPE.

	* decl.c (grokdeclarator): Assert that we won't see a pointer to
	METHOD_TYPE.

From-SVN: r196748
parent bab5167f
2013-03-16 Jason Merrill <jason@redhat.com> 2013-03-16 Jason Merrill <jason@redhat.com>
* decl.c (grokdeclarator): Assert that we won't see a pointer to
METHOD_TYPE.
PR c++/54277 PR c++/54277
* cp-tree.h (WILDCARD_TYPE_P): Split out from... * cp-tree.h (WILDCARD_TYPE_P): Split out from...
(MAYBE_CLASS_TYPE_P): ...here. (MAYBE_CLASS_TYPE_P): ...here.
......
...@@ -9630,9 +9630,11 @@ grokdeclarator (const cp_declarator *declarator, ...@@ -9630,9 +9630,11 @@ grokdeclarator (const cp_declarator *declarator,
but to the target of the pointer. */ but to the target of the pointer. */
type_quals = TYPE_UNQUALIFIED; type_quals = TYPE_UNQUALIFIED;
/* This code used to handle METHOD_TYPE, but I don't think it's
possible to get it here anymore. */
gcc_assert (TREE_CODE (type) != METHOD_TYPE);
if (declarator->kind == cdk_ptrmem if (declarator->kind == cdk_ptrmem
&& (TREE_CODE (type) == FUNCTION_TYPE && TREE_CODE (type) == FUNCTION_TYPE)
|| (memfn_quals && TREE_CODE (type) == METHOD_TYPE)))
{ {
memfn_quals |= type_memfn_quals (type); memfn_quals |= type_memfn_quals (type);
type = build_memfn_type (type, type = build_memfn_type (type,
......
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