diff options
author | Jason Merrill <jason@redhat.com> | 2013-03-16 23:11:07 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2013-03-16 23:11:07 -0400 |
commit | d1f45df55be8f73a75b878aa409aae1d8786759e (patch) | |
tree | 6d52b2eb23966cb8c8cd4a49dc00ee526d74b9d1 /gcc/cp | |
parent | bab5167fe640ee7596bb644035cad57f6c9160c0 (diff) | |
download | gcc-d1f45df55be8f73a75b878aa409aae1d8786759e.tar.gz |
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
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/decl.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ec7cd0f55e1..dc094f72848 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 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. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index b67978de7c0..facaae7ff19 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -9630,9 +9630,11 @@ grokdeclarator (const cp_declarator *declarator, 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, |