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
* cp-tree.h (WILDCARD_TYPE_P): Split out from...
(MAYBE_CLASS_TYPE_P): ...here.
but to the target of the pointer. */
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
- && (TREE_CODE (type) == FUNCTION_TYPE
- || (memfn_quals && TREE_CODE (type) == METHOD_TYPE)))
+ && TREE_CODE (type) == FUNCTION_TYPE)
{
memfn_quals |= type_memfn_quals (type);
type = build_memfn_type (type,