PR c++/33969
* decl.c (grokdeclarator): Don't call build_memfn_type if type
is neither FUNCTION_TYPE nor METHOD_TYPE.
* g++.dg/other/ptrmem9.C: New test.
From-SVN: r129895
+2007-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/33969
+ * decl.c (grokdeclarator): Don't call build_memfn_type if type
+ is neither FUNCTION_TYPE nor METHOD_TYPE.
+
2007-11-02 Jakub Jelinek <jakub@redhat.com>
PR c++/33516
type_quals = TYPE_UNQUALIFIED;
if (declarator->kind == cdk_ptrmem
- && (TREE_CODE (type) == FUNCTION_TYPE || memfn_quals))
+ && (TREE_CODE (type) == FUNCTION_TYPE
+ || (memfn_quals && TREE_CODE (type) == METHOD_TYPE)))
{
memfn_quals |= cp_type_quals (type);
type = build_memfn_type (type,
+2007-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/33969
+ * g++.dg/other/ptrmem9.C: New test.
+
2007-11-04 Andrew Pinski <pinskia@gmail.com>
PR middle-end/32931
--- /dev/null
+// PR c++/33969
+// { dg-do compile }
+
+struct A;
+void (*A::* fp)() const; // { dg-error "invalid in variable declaration" }